Subject: Re: NetBSD master CVS tree commits
To: Jason Thorpe <>
From: Chris G Demetriou <>
List: tech-userlevel
Date: 09/11/1996 18:42:16
> It's awesome that we have the fsck wrapper now!


> Hmm, but I can't help but wonder if it would be better to but the fstab 
> goo into the wrapper, and simply have it invoke the appropriate fsck_xxx 
> for each line it finds?  Then we could rip all that code out of the 
> back-ends.  I think this is how mount(8) does it.

hey, i was going to say that!  8-)

You actually want to do that for several reasons.  For example, if you
don't, you can't handle the '-l' flag and parallel checking properly.

I'm also not entirely sure i understand how '-o' works.

For instance, what if you want to check all file systems of type 'ffs'
with the option '-f' and all file systems of type 'msdos' with the
options '-f' and '-y'?  (I guess an example in the Makefile would
work, if that's reasonable possible...)

If that example is not possible to do with the current implementation,
i'd suggest something like:

	fsck [common options] [file systems] \
	    [-T type [fs options] [file systems]]  

i.e. to preen all file systems with -y, you'd just do:

	fsck -fy

to do the example above you'd do:

	fsck -T ffs -f -T msdos -f,-y

if no file system type for a FS is specified, it should be determined
via the disklabel, /etc/fstab, or a default (ffs, probably).

if no file systems are specified, that means all.

I suppose there are additions to this (e.g. a -t-like option) that
make sense, but it quickly gets hard to describe coherently.  8-)