KenD00
7th September 2007, 03:25
I'm a linux n00b and try to do the following from c / c++ code:
I have a path where a device is mounted, e.g. /media/cdrom and need to get the underlying device, e.g. /dev/hdb. Calling mount and parsing its output doesn't count ;). I've looked at the source of mount but its way too much work to understand how it works. Is there a sort of API call to get this type of information that works across (almost) all linux distros?
:rolleyes:
I have a path where a device is mounted, e.g. /media/cdrom and need to get the underlying device, e.g. /dev/hdb. Calling mount and parsing its output doesn't count ;). I've looked at the source of mount but its way too much work to understand how it works. Is there a sort of API call to get this type of information that works across (almost) all linux distros?
:rolleyes: