Date: Mon, 6 May 1996 01:00:46 +0200 (SAT) From: Robert Nordier <rnordier@iafrica.com> To: terry@lambert.org (Terry Lambert) Cc: joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.ORG, rnordier@iafrica.com Subject: Re: dosfsck anyone? Message-ID: <199605052300.BAA00250@eac.iafrica.com> In-Reply-To: <199605052105.OAA20101@phaeton.artisoft.com> from "Terry Lambert" at May 5, 96 02:05:15 pm
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 5 May 1996, Terry Lambert wrote: > > J"org writes: > > As Robert Nordier wrote: > > > > > A preen option is a Good Thing. 'fsck' itself has code to parse > > > /etc/fstab, skipping non-ufs filesystems. One solution would be > > > to incorporate equivalent code in 'dosfsck'. Possibly a more > > > elegant approach (which may be what you had in mind) would be to > > > handle the /etc/fstab parsing in a generic front-end. > > > > I rather thought of it the other way round: similar to mount(8), keep > > fsck(8) being the generic front-end that does the fstab parsing and > > dispatching. Much like mount(8), it could have builtin knowledge > > about some file system types (a builtin ufs checker, and the wisdom > > that procfs, swap, and cd9660 don't require checking at all), while it > > will call {/usr/sbin,/sbin}/fsck_${fstype} for all other file system > > types. > > Foo. > > man getfsent > > There are already parsing routines for that file; don't write your > own code to do it. I missed 'getfsent'. Comes of browsing the 'fsck' code too unquestioningly. > The things should be calling "fstyp" anyway, which should call an > ioctl on the device to return FS type from the list of recognized > types. > > The mount code for each FS needs this information anyway, so it can > tell if it should try mounting it to avoid a panic when you try to > mount an inappropriate device. The code should be broken out for > an iterative call "fstyp" interface. Presumably this sorts out the problem of doing a mount_msdos on (say) an HPFS and actually getting away with it, as has happened. I guess, for mount_msdos, DOS compatibility can't be pursued to the extent of not requiring a boot sector BPB at all, and just deriving all FS parameters. -- Robert Nordier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605052300.BAA00250>