cvs commit: src/sbin/newfs mkfs.c
Ollivier Robert
roberto at keltia.freenix.fr
Tue May 27 08:31:16 PDT 2003
According to Doug Barton:
> I think that's a very valid second step, and I hope someone takes it on. I
> felt that this step was much more important to accomplish prior to the
> release however.
Untested -- because don't have any UFS2 FS yet -- follows:
Index: sys/ufs/ffs/fs.h
===================================================================
RCS file: /home/ncvs/src/sys/ufs/ffs/fs.h,v
retrieving revision 1.14.2.3
diff -u -2 -I.*$Id:.* -r1.14.2.3 fs.h
--- sys/ufs/ffs/fs.h 21 Sep 2001 19:15:22 -0000 1.14.2.3
+++ sys/ufs/ffs/fs.h 27 May 2003 15:29:40 -0000
@@ -285,5 +285,8 @@
* Filesystem identification
*/
-#define FS_MAGIC 0x011954 /* the fast filesystem magic number */
+#define FS_UFS1_MAGIC 0x011954 /* UFS1 fast filesystem magic number */
+#define FS_UFS2_MAGIC 0x19540119 /* UFS2 fast filesystem magic number */
+
+#define FS_MAGIC FS_UFS1_MAGIC /* the fast filesystem magic number */
#define FS_OKAY 0x7c269d38 /* superblock checksum */
#define FS_42INODEFMT -1 /* 4.2BSD inode format */
Index: sbin/fsck/setup.c
===================================================================
RCS file: /home/ncvs/src/sbin/fsck/Attic/setup.c,v
retrieving revision 1.17.2.4
diff -u -2 -I.*$Id:.* -r1.17.2.4 setup.c
--- sbin/fsck/setup.c 24 Jun 2002 05:10:41 -0000 1.17.2.4
+++ sbin/fsck/setup.c 27 May 2003 15:24:58 -0000
@@ -333,4 +333,6 @@
* run a few consistency checks of the super block
*/
+ if (sblock.fs_magic == FS_UFS2_MAGIC)
+ { badsb(listerr, "UFS2 FS DETECTED, IGNORING"); return (0); }
if (sblock.fs_magic != FS_MAGIC)
{ badsb(listerr, "MAGIC NUMBER WRONG"); return (0); }
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto at keltia.freenix.fr
Darwin snuadh.freenix.org Kernel Version 6.6: Thu May 1 21:48:54 PDT 2003
More information about the cvs-all
mailing list