diff options
author | Neil Brown <neilb@suse.de> | 2007-03-16 18:26:37 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-16 18:26:37 +1100 |
commit | a64b65aac7af65f96a24cd89fc07a31dbb5980ab (patch) | |
tree | 4e073cd23713829f0a3548f8bc4ddcbb651255fe /support | |
parent | ae5ec51e0ddc99dc5552e51bd5c095084dbb61aa (diff) | |
download | nfs-utils-a64b65aac7af65f96a24cd89fc07a31dbb5980ab.tar.gz nfs-utils-a64b65aac7af65f96a24cd89fc07a31dbb5980ab.tar.xz nfs-utils-a64b65aac7af65f96a24cd89fc07a31dbb5980ab.zip |
Remove nfs_mntent_t in favour of struct mntent
They are identical and the later allows us to use hasmntent.
Diffstat (limited to 'support')
-rw-r--r-- | support/include/fstab.h | 4 | ||||
-rw-r--r-- | support/include/nfs_mntent.h | 14 | ||||
-rw-r--r-- | support/nfs/fstab.c | 4 | ||||
-rw-r--r-- | support/nfs/nfs_mntent.c | 6 |
4 files changed, 10 insertions, 18 deletions
diff --git a/support/include/fstab.h b/support/include/fstab.h index ab30c5a..64c8355 100644 --- a/support/include/fstab.h +++ b/support/include/fstab.h @@ -12,7 +12,7 @@ int mtab_does_not_exist(void); struct mntentchn { struct mntentchn *nxt, *prev; - nfs_mntent_t m; + struct mntent m; }; struct mntentchn *getmntoptfile (const char *file); @@ -24,7 +24,7 @@ struct mntentchn *getfsspec (const char *spec); 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 */ diff --git a/support/include/nfs_mntent.h b/support/include/nfs_mntent.h index 76f348e..010df24 100644 --- a/support/include/nfs_mntent.h +++ b/support/include/nfs_mntent.h @@ -5,15 +5,7 @@ #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; +#include <mntent.h> #define ERR_MAX 5 @@ -27,8 +19,8 @@ typedef struct mntFILEstruct { 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); -nfs_mntent_t *nfs_getmntent (mntFILE *mfp); +struct mntent *nfs_getmntent (mntFILE *mfp); #endif /* _NFS_MNTENT_H */ diff --git a/support/nfs/fstab.c b/support/nfs/fstab.c index ba7e580..c900f3c 100644 --- a/support/nfs/fstab.c +++ b/support/nfs/fstab.c @@ -124,7 +124,7 @@ discard_mntentchn(struct mntentchn *mc0) { static void read_mntentchn(mntFILE *mfp, const char *fnam, struct mntentchn *mc0) { struct mntentchn *mc = mc0; - nfs_mntent_t *mnt; + struct mntent *mnt; while ((mnt = nfs_getmntent(mfp)) != NULL) { if (!streq(mnt->mnt_type, MNTTYPE_IGNORE)) { @@ -444,7 +444,7 @@ lock_mtab (void) { */ void -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 */ diff --git a/support/nfs/nfs_mntent.c b/support/nfs/nfs_mntent.c index d1d124b..a3fecfc 100644 --- a/support/nfs/nfs_mntent.c +++ b/support/nfs/nfs_mntent.c @@ -124,7 +124,7 @@ nfs_endmntent (mntFILE *mfp) { } int -nfs_addmntent (mntFILE *mfp, nfs_mntent_t *mnt) { +nfs_addmntent (mntFILE *mfp, struct mntent *mnt) { char *m1, *m2, *m3, *m4; int res; @@ -147,10 +147,10 @@ nfs_addmntent (mntFILE *mfp, nfs_mntent_t *mnt) { } /* Read the next entry from the file fp. Stop reading at an incorrect entry. */ -nfs_mntent_t * +struct mntent * nfs_getmntent (mntFILE *mfp) { static char buf[4096]; - static nfs_mntent_t me; + static struct mntent me; char *s; again: |