-
Committer:
Bazaar Package Importer
-
Author(s):
Scott James Remnant
-
Date:
2008-10-07 14:37:44 UTC
-
Revision ID:
james.westby@ubuntu.com-20081007143744-etyu9fahbi6aavf3
Tags: 124-6
Backport addition of /dev/{block,char}/maj:min symlinks from latest
udev rules; this mirrors the /sys/dev/{block,char}/maj:min symlinks
found in our current kernel.
If you have a device node, stat() it to obtain type, major and minor
and readlink /sys/dev/{block,char}/maj:min to obtain the sysfs path
of that device.
If you have a sysfs path, read the "dev" file to obtain major and minor
(it's char unless in the block subsystem), and then readlink
/dev/{block,char}/maj:min to obtain the device node.