summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-03-09 13:21:13 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-03-09 13:21:13 +0000
commitb9576f8b9de9e045ae66a7d44f478d5432d7903f (patch)
tree77dd5630ef5740e5fa2f03fc45cc112edab2afb5
parent4182232e4937de30232cfb0b7291b63860a7f935 (diff)
Better handling of ancient file systems that still have 4.2 BSD
rotational layout tables. Okay krw@
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 81a97968223..f6009eda3e9 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.80 2006/02/14 12:42:11 mickey Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.81 2006/03/09 13:21:12 pedro Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -731,11 +731,16 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
goto out;
}
}
- /* XXX updating 4.2 FFS superblocks trashes rotational layout tables */
- if (fs->fs_postblformat == FS_42POSTBLFMT && !ronly) {
- error = EROFS; /* XXX what should be returned? */
+
+ if (fs->fs_postblformat == FS_42POSTBLFMT) {
+#ifndef SMALL_KERNEL
+ printf("ffs_mountfs(): obsolete rotational table format, "
+ "please use fsck -c\n");
+#endif
+ error = EFTYPE;
goto out;
}
+
ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK);
bzero(ump, sizeof *ump);
ump->um_fs = malloc((u_long)fs->fs_sbsize, M_UFSMNT,