Another FileSystem-ish Question

Started by
2 comments, last by Null and Void 22 years, 6 months ago
Does anyone know a method of enumerating available Floppy and CDROM (SCSI and IDE) drives? Is there a way to do it for only mounted devices and/or all devices regardless of whether or not they''re mounted? Is there a way to check if it''s mounted (for the second option in the last question)? Thanks in advance . [Resist Windows XP''s Invasive Production Activation Technology!]
Advertisement
Well, I guess I''ll just parse /etc/fstab by hand, but I still need a way to test if the devices are already mounted.

[Resist Windows XP''s Invasive Production Activation Technology!]
You could either read /proc/mounts if the system supports the proc filesystem, or you could spawn 'df' and parse its output to see which devices are mounted. Those are the only ways I can think of, but then again; I don't know much about programming under linux

Edited by - Dactylos on September 23, 2001 7:39:10 PM
Hi,

If you want to parse something, parse mount.
Else best option is to use /proc/mounts
Hello from my world

This topic is closed to new replies.

Advertisement