29 Jan 2008 00:47
Getting the System Device Name for a sysfs_device
John Powell <jpowell <at> vmware.com>
2008-01-28 23:47:44 GMT
2008-01-28 23:47:44 GMT
Is there a 'pretty' way to get the system device name for a given
sysfs_device?
For example I do the following...
device_bus = sysfs_open_bus("usb");
devices = sysfs_get_bus_devices(device_bus);
dlist_for_each_data(devices, device, struct sysfs_devices) {
printf('Name: %s\n', device->name);
}
device-name isn't what I want at all. I want something in the form of 'sdX'
('sda' for example).
Regards,
John Powell
-- _______
| _____|_
_|_|___ | |
| | | John Powell jpowell at vmware dot com
| |_|__VMware Kernel Applications direct: (650) 427-1777
| |___|___|
|_______|
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
(Continue reading)
RSS Feed