Subject: Re: Filesystems that don't support devices
To: Gavan Fantom <gavan@coolfactor.org>
From: Alfred Perlstein <bright@mu.org>
List: tech-kern
Date: 12/19/2001 14:12:23
* Gavan Fantom <gavan@coolfactor.org> [011219 14:00] wrote:
> On Wed, 19 Dec 2001, Ben Harris wrote:
>
> > How about just checking if /dev/console exists and is a device, or if there
> > are any devices at all in /dev?
>
>
> The code currently looks like this:
>
> if (statfs("/", &sfs) == -1)
> return;
>
> if (strcmp(sfs.f_fstypename, MOUNT_MSDOS) != 0)
> return;
>
> /* If we have devices, we cannot be on msdosfs */
> if (access(_PATH_CONSOLE, F_OK) != -1)
> return;
>
> So /dev/console already has to exist, but actually on an msdos filesystem.
>
> Maybe removing the check for an msdos filesystem and just checking for
> existence of a console device would be enough?
Ok, perhaps this is missing feature for statfs:
long f_flags; /* copy of mount flags */
Shouldn't an FS that doesn't support devices implicitly set MNT_NODEV?
Or maybe not?
--
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
http://www.morons.org/rants/gpl-harmful.php3