Subject: Re: special-casing access to image files
To: None <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 08/19/2001 12:14:51
[ On Sunday, August 19, 2001 at 17:07:34 (+0200), Hubert Feyrer wrote: ]
> Subject: special-casing access to image files
> I see this -F added to ~all filesystem utilities. Is that really
> necessary? IIRC there's the Unix philosophy of "everything is a file", so
> why is there a difference when giving a filename over /dev/somedisk?
> Can't the fools be at least made auto-detect if th eunderlying thing is a
> disk image over a real disk?
The new logic in, for example, fsck_ffs is rather bizzare. The only
thing done by '-F' seems to be to change whether or not you get asked
(when it's running interactively) whether or not to continue when a file
of the "wrong" type is specified.
This does seem to be a little more "motherly" than most Unix utilities.
It's one thing to require a device file when that's the only thing that
can possibly work for whatever reason(s), but quite another to make
distinctions that are no longer relevant.
If '-F' is to remain, at least in fsck_ffs, it might be nice if it would
also short-circuit the logic to use ioctl(DIOCGDINFO) when the first
superblock is borked. I've not tried it yet, but I suspect the new
logic won't even work since the ioctl() failure will probably just cause
fsck to errx(EEXIT) out [[I don't see how the name of the device can
ever be NULL in the way getdisklabel() is currently called]].
Greg A. Woods
+1 416 218-0098 VE3TCP <firstname.lastname@example.org> <email@example.com>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>