summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-03-31 13:16:59 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-03-31 13:16:59 +0000
commitc793bece327123f1845215b8400ff78776b30f49 (patch)
tree0dda3072de7e87a05169d8124794f4d6c8239d72
parentb4080d65a209c2f93532e62b09803ecdcc96ddf5 (diff)
Make ffs_statfs() tag FFS2 file systems as such
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 0e1accb26a4..2e8737f0bfb 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.86 2006/03/31 12:55:04 pedro Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.87 2006/03/31 13:16:58 pedro Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -1068,7 +1068,14 @@ ffs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
bcopy(&mp->mnt_stat.mount_info.ufs_args,
&sbp->mount_info.ufs_args, sizeof(struct ufs_args));
}
- strncpy(sbp->f_fstypename, mp->mnt_vfc->vfc_name, MFSNAMELEN);
+
+#ifdef FFS2
+ if (fs->fs_magic == FS_UFS2_MAGIC)
+ strncpy(sbp->f_fstypename, MOUNT_FFS2, MFSNAMELEN);
+ else
+#endif
+ strncpy(sbp->f_fstypename, mp->mnt_vfc->vfc_name, MFSNAMELEN);
+
return (0);
}