That makes a lot of sense.
So it would return "block/sda/sda1" now, but one day that might change
to "class/block/sda/sda1" or some-such.
That too seems very sensible. Only it's harder to choose a 'generic'
ioctl request number than to choose a block-specific one :-)
We would also need a somewhat longer buffer. The longest
/sys/**/dev
path on my test machine is
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.1/usb_endpoint/usbdev2.2_ep82/dev
So at least 80 chars. Probably 256 would do....
#define SYSFSLOCATION _IOR(0, 0xff, char[256])
??
Thanks,
NeilBrown
-