Tango FileRoots
BCS
BCS at pathlink.com
Tue Mar 4 09:46:24 PST 2008
Ty Tower wrote:
> BCS wrote:
>
>
>>Reply to ty,
>>isn't there something in /proc that grovels in the kernel? I would
>>rather get info from the kernel than a state file updated by some
>>apps. (I don't have a *nux box handy to try with)
>
>
> Heh heh ! This is classic . Pardon my humorous response. When we
> grovel in the dirt we get down and dirty lying and squirming in the
> dirt.
>
> I don't know but you probably are saying that there is something in
> the kernel that returns that information as well.
Now that I have a Linux box handy...
take a look at the /proc/mounts file. Mine gives this:
$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
/proc /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
none /dev/pts devpts rw 0 0
none /dev/shm tmpfs rw 0 0
IIRC this is a file in a "fileystem" that is actually a device for
reading kernel and system state. This reflects the actual current state
of the system, not the last thing written to some file.
> I can't say . I am
> not that familiar with the kernel but my understanding is
> that /etc/mtab is updated by the kernel as each device is added or
> removed instantly.
Potentially someone could over wright /etc/mtab with junk. Not likely but...
> I don't think any applications act on it except
> maybe Hal.
>
> And did you mean "*nix" as Unix/Linux box ,I think so
>
yup
More information about the Digitalmars-d
mailing list