diff options
author | bde <bde@FreeBSD.org> | 1998-01-20 15:12:24 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-01-20 15:12:24 +0000 |
commit | 06cd7b53233f0fea5cb03caf053b5704baccc434 (patch) | |
tree | 49447ecb02e64c79cb175c9b4624d9b59ab48692 | |
parent | 28b1a9b7397f7ccc7bb251e8e4e3dafeeb13a142 (diff) | |
download | FreeBSD-src-06cd7b53233f0fea5cb03caf053b5704baccc434.zip FreeBSD-src-06cd7b53233f0fea5cb03caf053b5704baccc434.tar.gz |
Merged from Lite2. Get the filesystem type name directly from the
statfs struct instead of converting from the filesystem type number.
-rw-r--r-- | usr.sbin/amd/config/mtab_bsd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/amd/config/mtab_bsd.c b/usr.sbin/amd/config/mtab_bsd.c index 39b4228..9d17b41 100644 --- a/usr.sbin/amd/config/mtab_bsd.c +++ b/usr.sbin/amd/config/mtab_bsd.c @@ -35,9 +35,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)mtab_bsd.c 8.1 (Berkeley) 6/6/93 + * @(#)mtab_bsd.c 8.2 (Berkeley) 5/10/95 * - * $Id$ + * $Id: mtab_bsd.c,v 1.3 1997/02/22 16:02:26 peter Exp $ * */ @@ -55,12 +55,16 @@ struct statfs *mp; new_mp->mnt_fsname = strdup(mp->f_mntfromname); new_mp->mnt_dir = strdup(mp->f_mntonname); +#if BSD >= 199506 + ty = mp->f_fstypename; +#else switch (mp->f_type) { case MOUNT_UFS: ty = MTAB_TYPE_UFS; break; case MOUNT_NFS: ty = MTAB_TYPE_NFS; break; case MOUNT_MFS: ty = MTAB_TYPE_MFS; break; default: ty = "unknown"; break; } +#endif new_mp->mnt_type = strdup(ty); new_mp->mnt_opts = strdup("unset"); new_mp->mnt_freq = 0; |