Subject: Re: Filesystems that don't support devices
To: Gavan Fantom <email@example.com>
From: Alfred Perlstein <firstname.lastname@example.org>
Date: 12/19/2001 14:12:23
* Gavan Fantom <email@example.com> [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)
> if (strcmp(sfs.f_fstypename, MOUNT_MSDOS) != 0)
> /* If we have devices, we cannot be on msdosfs */
> if (access(_PATH_CONSOLE, F_OK) != -1)
> 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 [firstname.lastname@example.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'