From owner-freebsd-hackers Sun May 5 14:14:21 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA10333 for hackers-outgoing; Sun, 5 May 1996 14:14:21 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA10328 for ; Sun, 5 May 1996 14:14:20 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA20101; Sun, 5 May 1996 14:05:15 -0700 From: Terry Lambert Message-Id: <199605052105.OAA20101@phaeton.artisoft.com> Subject: Re: dosfsck anyone? To: joerg_wunsch@uriah.heep.sax.de Date: Sun, 5 May 1996 14:05:15 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG, rnordier@iafrica.com In-Reply-To: <199605051501.RAA28990@uriah.heep.sax.de> from "J Wunsch" at May 5, 96 05:01:35 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. 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. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.