From owner-freebsd-current Fri Sep 22 2:17:40 2000 Delivered-To: freebsd-current@freebsd.org Received: from roaming.cacheboy.net (gate.interxion.com [194.153.74.13]) by hub.freebsd.org (Postfix) with ESMTP id DD6AB37B422; Fri, 22 Sep 2000 02:17:34 -0700 (PDT) Received: (from adrian@localhost) by roaming.cacheboy.net (8.11.0/8.11.0) id eBNAKcT37595; Sat, 23 Dec 2000 11:20:38 +0100 (CET) (envelope-from adrian) Date: Sat, 23 Dec 2000 11:20:38 +0100 From: Adrian Chadd To: freebsd-fs@freebsd.org Cc: freebsd-current@freebsd.org Subject: Re: Fsck wrappers, revisited Message-ID: <20001223112038.A37548@roaming.cacheboy.net> References: <20001222191317.A7529@roaming.cacheboy.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20001222191317.A7529@roaming.cacheboy.net>; from adrian@FreeBSD.ORG on Fri, Dec 22, 2000 at 07:13:17PM +0100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Dec 22, 2000, Adrian Chadd wrote: > > > I've updated my fsck wrappers patchset to the latest netbsd and freebsd > fsck patches. I'd appreciate some feedback on them before I run off > and commit them (with my mentor, of course.) > > For those who aren't in the know, the general idea is that a single wrapper > program spawns a FS-specific fsck process a la mount and mount_*, making > multiple-FS support a lot easier. (Think about having fsck_ext2fs, fsck_msdos > and fsck_ffs doing your FSes on bootup..) > > They can be found at http://www.freebsd.org/~adrian/fsck/ . PLEASE read the > README before you use them, as there are a few gotchas. Thanks to some feedback from bp, I found a stupid mistake in my porting. Here's the patch: --- fsck.c.orig Sat Dec 23 11:13:30 2000 +++ fsck.c Sat Dec 23 11:13:34 2000 @@ -501,7 +501,7 @@ errx(1, "partition `%s' is not of a legal vfstype", str); - if ((vfstype = dktypenames[t]) == NULL) + if ((vfstype = fstypenames[t]) == NULL) errx(1, "vfstype `%s' on partition `%s' is not supported", fstypenames[t], str); So now is a problem which I'm sure the NetBSD people came up against. The fstypenames are names like 4.2BSD, vinum, ISO9660, etc. NetBSD fixed this by creating a new list 'mountnames[]', which maps the fs type to a string. http://cvsweb.netbsd.org/bsdweb.cgi/syssrc/sys/sys/disklabel.h.diff?r1=1.60&r2=1.61 What do people think about doing this as well? It would certainly make things a little tidier, but every time a new fs comes in the magic autodetection code will need to be updated (if appropriate, of course.) Adrian -- Adrian Chadd "The main reason Santa is so jolly is because he knows where all the bad girls live." -- Random IRC quote To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message