summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/mount/Makefile2
-rw-r--r--sbin/mount/mount.c11
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c11
3 files changed, 9 insertions, 15 deletions
diff --git a/sbin/mount/Makefile b/sbin/mount/Makefile
index e9e4fdf..407abea 100644
--- a/sbin/mount/Makefile
+++ b/sbin/mount/Makefile
@@ -3,8 +3,6 @@
PROG= mount
SRCS= mount.c mount_ufs.c getmntopts.c vfslist.c
-DPADD= ${LIBUFS}
-LDADD= -lufs
WARNS?= 0
MAN= mount.8
# We do NOT install the getmntopts.3 man page.
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 5f6a950..df97adb 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -46,10 +46,6 @@ static const char rcsid[] =
#include <sys/stat.h>
#include <sys/wait.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/dinode.h>
-#include <ufs/ffs/fs.h>
-
#include <ctype.h>
#include <err.h>
#include <errno.h>
@@ -62,7 +58,6 @@ static const char rcsid[] =
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <libufs.h>
#include "extern.h"
#include "mntopts.h"
@@ -515,16 +510,10 @@ prmount(sfp)
int flags, i;
struct opt *o;
struct passwd *pw;
- struct uufsd disk;
(void)printf("%s on %s (%s", sfp->f_mntfromname, sfp->f_mntonname,
sfp->f_fstypename);
- if (strncmp(sfp->f_fstypename, "ufs", 3) == 0) {
- ufs_disk_fillout(&disk, sfp->f_mntonname);
- printf("%s", (disk.d_ufs == 2) ? "2" : "");
- }
-
flags = sfp->f_flags & MNT_VISFLAGMASK;
for (o = optnames; flags && o->o_opt; o++)
if (flags & o->o_opt) {
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 8f205db..951f0eb 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1062,6 +1062,9 @@ ffs_statfs(mp, sbp, td)
fs = ump->um_fs;
if (fs->fs_magic != FS_UFS1_MAGIC && fs->fs_magic != FS_UFS2_MAGIC)
panic("ffs_statfs");
+ if (fs->fs_magic == FS_UFS2_MAGIC)
+ bcopy((caddr_t)"ufs2",
+ (caddr_t)&sbp->f_fstypename[0], MFSNAMELEN);
sbp->f_version = STATFS_VERSION;
sbp->f_bsize = fs->fs_fsize;
sbp->f_iosize = fs->fs_bsize;
@@ -1082,8 +1085,12 @@ ffs_statfs(mp, sbp, td)
sbp->f_asyncreads = mp->mnt_stat.f_asyncreads;
sbp->f_owner = mp->mnt_stat.f_owner;
sbp->f_fsid = mp->mnt_stat.f_fsid;
- bcopy((caddr_t)mp->mnt_stat.f_fstypename,
- (caddr_t)&sbp->f_fstypename[0], MFSNAMELEN);
+ if (fs->fs_magic == FS_UFS2_MAGIC)
+ bcopy((caddr_t)"ufs2",
+ (caddr_t)&sbp->f_fstypename[0], MFSNAMELEN);
+ else
+ bcopy((caddr_t)mp->mnt_stat.f_fstypename,
+ (caddr_t)&sbp->f_fstypename[0], MFSNAMELEN);
bcopy((caddr_t)mp->mnt_stat.f_mntonname,
(caddr_t)&sbp->f_mntonname[0], MNAMELEN);
bcopy((caddr_t)mp->mnt_stat.f_mntfromname,
OpenPOWER on IntegriCloud