Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Dec 2000 11:20:38 +0100
From:      Adrian Chadd <adrian@freebsd.org>
To:        freebsd-fs@freebsd.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: Fsck wrappers, revisited
Message-ID:  <20001223112038.A37548@roaming.cacheboy.net>
In-Reply-To: <20001222191317.A7529@roaming.cacheboy.net>; from adrian@FreeBSD.ORG on Fri, Dec 22, 2000 at 07:13:17PM %2B0100
References:  <20001222191317.A7529@roaming.cacheboy.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<adrian@freebsd.org>		   because he knows where all the bad girls
				    live." -- Random IRC quote



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001223112038.A37548>