They are identical and the later allows us to use hasmntent.
struct mntentchn {
struct mntentchn *nxt, *prev;
struct mntentchn {
struct mntentchn *nxt, *prev;
};
struct mntentchn *getmntoptfile (const char *file);
};
struct mntentchn *getmntoptfile (const char *file);
void lock_mtab (void);
void unlock_mtab (void);
void lock_mtab (void);
void unlock_mtab (void);
-void update_mtab (const char *special, nfs_mntent_t *with);
+void update_mtab (const char *special, struct mntent *with);
#endif /* _NFS_FSTAB_H */
#endif /* _NFS_FSTAB_H */
#ifndef _NFS_MNTENT_H
#define _NFS_MNTENT_H
#ifndef _NFS_MNTENT_H
#define _NFS_MNTENT_H
-
-typedef struct nfs_mntent_s {
- const char *mnt_fsname;
- const char *mnt_dir;
- const char *mnt_type;
- const char *mnt_opts;
- int mnt_freq;
- int mnt_passno;
-} nfs_mntent_t;
mntFILE *nfs_setmntent (const char *file, char *mode);
void nfs_endmntent (mntFILE *mfp);
mntFILE *nfs_setmntent (const char *file, char *mode);
void nfs_endmntent (mntFILE *mfp);
-int nfs_addmntent (mntFILE *mfp, nfs_mntent_t *mnt);
+int nfs_addmntent (mntFILE *mfp, struct mntent *mnt);
struct nfs_mntent *my_getmntent (mntFILE *mfp);
struct nfs_mntent *my_getmntent (mntFILE *mfp);
-nfs_mntent_t *nfs_getmntent (mntFILE *mfp);
+struct mntent *nfs_getmntent (mntFILE *mfp);
#endif /* _NFS_MNTENT_H */
#endif /* _NFS_MNTENT_H */
static void
read_mntentchn(mntFILE *mfp, const char *fnam, struct mntentchn *mc0) {
struct mntentchn *mc = mc0;
static void
read_mntentchn(mntFILE *mfp, const char *fnam, struct mntentchn *mc0) {
struct mntentchn *mc = mc0;
while ((mnt = nfs_getmntent(mfp)) != NULL) {
if (!streq(mnt->mnt_type, MNTTYPE_IGNORE)) {
while ((mnt = nfs_getmntent(mfp)) != NULL) {
if (!streq(mnt->mnt_type, MNTTYPE_IGNORE)) {
-update_mtab (const char *dir, nfs_mntent_t *instead) {
+update_mtab (const char *dir, struct mntent *instead) {
mntFILE *mfp, *mftmp;
const char *fnam = MOUNTED;
struct mntentchn mtabhead; /* dummy */
mntFILE *mfp, *mftmp;
const char *fnam = MOUNTED;
struct mntentchn mtabhead; /* dummy */
-nfs_addmntent (mntFILE *mfp, nfs_mntent_t *mnt) {
+nfs_addmntent (mntFILE *mfp, struct mntent *mnt) {
char *m1, *m2, *m3, *m4;
int res;
char *m1, *m2, *m3, *m4;
int res;
}
/* Read the next entry from the file fp. Stop reading at an incorrect entry. */
}
/* Read the next entry from the file fp. Stop reading at an incorrect entry. */
nfs_getmntent (mntFILE *mfp) {
static char buf[4096];
nfs_getmntent (mntFILE *mfp) {
static char buf[4096];
- static nfs_mntent_t me;
+ static struct mntent me;
res = mount(spec, node, NULL,
MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
if (res == 0) {
res = mount(spec, node, NULL,
MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
if (res == 0) {
fprintf(stderr,
_("umount: %s busy - remounted read-only\n"),
spec);
fprintf(stderr,
_("umount: %s busy - remounted read-only\n"),
spec);