digitalmars.D - Tango FileRoots
- Jesse Phillips (5/5) Mar 01 2008 I'm interested in knowing why FileRoots.list() uses /etc/mtab for its
- Jesse Phillips (2/7) Mar 02 2008 BTW, it may sound like I'm angry, but really just confused.
- Lars Ivar Igesund (8/13) Mar 02 2008 The unix root / isn't the most useful thing to ask for, thus mtab is use...
- Ty Tower (4/20) Mar 02 2008 ftab mounts the original devices and empowers them
- Jesse Phillips (6/29) Mar 02 2008 it can't, it reads the file when called, so it will only get already
- Kris (7/36) Mar 15 2008 Jesse,
- Ty Tower (5/37) Mar 03 2008 Probably should add (perhaps you already know)
- BCS (4/7) Mar 03 2008 isn't there something in /proc that grovels in the kernel? I would rathe...
- BCS (15/39) Mar 04 2008 Now that I have a Linux box handy...
- Ty Tower (2/32) Mar 04 2008 Good stuff - I am learning each day Thanks
- BCS (2/4) Mar 04 2008 your wecome :)
- Anders Bergh (4/7) Mar 04 2008 On Linux, sure. But that wouldn't be portable at all, /proc is quite
I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.
Mar 01 2008
On Sun, 02 Mar 2008 07:45:46 +0000, Jesse Phillips wrote:I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.BTW, it may sound like I'm angry, but really just confused.
Mar 02 2008
Jesse Phillips wrote:I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.The unix root / isn't the most useful thing to ask for, thus mtab is used to show all mounted devices. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 02 2008
Lars Ivar Igesund Wrote:Jesse Phillips wrote:ftab mounts the original devices and empowers them mtab looks after the devices added later ie plugging in the usb stick or something like that is the file used in that sort of context?I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.The unix root / isn't the most useful thing to ask for, thus mtab is used to show all mounted devices. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 02 2008
On Sun, 02 Mar 2008 17:02:33 -0500, Ty Tower wrote:Lars Ivar Igesund Wrote:it can't, it reads the file when called, so it will only get already mounted devices, a file change listener of some sort would have to be created to track later mounted devices. For me must of the mounted items in mtab are useless, but it can be easily version'd out as needed.Jesse Phillips wrote:ftab mounts the original devices and empowers them mtab looks after the devices added later ie plugging in the usb stick or something like that is the file used in that sort of context?I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.The unix root / isn't the most useful thing to ask for, thus mtab is used to show all mounted devices. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 02 2008
Jesse, Would you mind jumping on irc to discuss this one, please? There's an easy way to hookup irc noted at the bottom of this page: http://dsource.org/projects/tango/wiki/Contact Thanks; "Jesse Phillips" <jessekphillips gmail.com> wrote in message news:fqfhfj$ed9$2 digitalmars.com...On Sun, 02 Mar 2008 17:02:33 -0500, Ty Tower wrote:Lars Ivar Igesund Wrote:it can't, it reads the file when called, so it will only get already mounted devices, a file change listener of some sort would have to be created to track later mounted devices. For me must of the mounted items in mtab are useless, but it can be easily version'd out as needed.Jesse Phillips wrote:ftab mounts the original devices and empowers them mtab looks after the devices added later ie plugging in the usb stick or something like that is the file used in that sort of context?I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.The unix root / isn't the most useful thing to ask for, thus mtab is used to show all mounted devices. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 15 2008
Jesse Phillips Wrote:On Sun, 02 Mar 2008 17:02:33 -0500, Ty Tower wrote:Probably should add (perhaps you already know) /etc/fstab Lists the filesystems mounted automatically at startup by the mount -a command (in /etc/rc or equivalent startup file). /etc/mtab A list of currently mounted file systems. Setup by boot scripts and updated by the mount command. So if you want a list of what's mounted right now mtab is the place to goLars Ivar Igesund Wrote:it can't, it reads the file when called, so it will only get already mounted devices, a file change listener of some sort would have to be created to track later mounted devices. For me must of the mounted items in mtab are useless, but it can be easily version'd out as needed.Jesse Phillips wrote:ftab mounts the original devices and empowers them mtab looks after the devices added later ie plugging in the usb stick or something like that is the file used in that sort of context?I'm interested in knowing why FileRoots.list() uses /etc/mtab for its root folders in linux? To my knowledge Linux only has one root and if anything its sub directories would be considered the roots. I just don't see the point of using mtab, but then again I'm looking at it from how file managers look at the system.The unix root / isn't the most useful thing to ask for, thus mtab is used to show all mounted devices. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 03 2008
Reply to ty,So if you want a list of what's mounted right now mtab is the place to goisn'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)
Mar 03 2008
Ty Tower wrote:BCS wrote: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.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.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 soyup
Mar 04 2008
BCS Wrote: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.Good stuff - I am learning each day ThanksI 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 exceptmaybe Hal. And did you mean "*nix" as Unix/Linux box ,I think soyup
Mar 04 2008
Reply to ty,Good stuff - I am learning each day Thanksyour wecome :)
Mar 04 2008
On Tue, Mar 4, 2008 at 7:04 AM, BCS <ao pathlink.com> wrote: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)On Linux, sure. But that wouldn't be portable at all, /proc is quite Linux-specific. Anders
Mar 04 2008