From owner-cvs-all@FreeBSD.ORG Tue May 27 08:31:15 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0A6237B401; Tue, 27 May 2003 08:31:15 -0700 (PDT) Received: from tara.freenix.org (keltia.freenix.org [62.4.20.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 762DD43F85; Tue, 27 May 2003 08:31:14 -0700 (PDT) (envelope-from roberto@tara.freenix.org) Received: by tara.freenix.org (Postfix/TLS, from userid 101) id 7E2312A96; Tue, 27 May 2003 17:31:13 +0200 (CEST) Date: Tue, 27 May 2003 17:31:13 +0200 From: Ollivier Robert To: Doug Barton Message-ID: <20030527153113.GB22682@tara.freenix.org> Mail-Followup-To: Doug Barton , Andrea Campi , Nate Lawson , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <20030522183930.564EF37B49D@hub.freebsd.org> <20030522161035.X95941@root.org> <20030522235524.GB6396@webcom.it> <20030522165905.R2984@znfgre.qbhto.arg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030522165905.R2984@znfgre.qbhto.arg> X-Operating-System: MacOS X / PowerBook G4 - FreeBSD 5.0 / 2x PIII/800 SMP User-Agent: Mutt/1.5.3i cc: cvs-src@FreeBSD.org cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org cc: Nate Lawson Subject: Re: cvs commit: src/sbin/newfs mkfs.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2003 15:31:16 -0000 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@keltia.freenix.fr Darwin snuadh.freenix.org Kernel Version 6.6: Thu May 1 21:48:54 PDT 2003