However, on many configurations, /proc/mounts will list "/dev/root"
instead of the corresponding entry in /proc/partitions (such as /dev/hda1
How can I reliably map /dev/root to the corresponding entry in
/proc/partitions? Is there some /proc thing I'm missing, or is there an
ioctl that can give me the information I'm looking for?
The only way I've been able to do this so far is to read in the output of
the "mount" command, or read fstab or mtab. Reading fstab or mtab is
unreliable, because they don't necessarily contain accurate information.
Parsing the output of "mount" seems kludgy, and introduces a lot of
complexity because it might list /dev/hda1 instead of
/dev/ide/host0/.../part1, thus requiring an additional layer of mapping.
Plus, the "mount" command might not be available at all.
Whether devfs is running or not, I just want to be able to figure out
which device in /proc/partitions corresponds to /dev/root.
Thanks very much for your help!!
Please Cc me in your response.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/