Re: [PATCH/RFC] allow mapping from block-device-file to sysfs entry.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Neil Brown
Date: Tuesday, August 7, 2007 - 12:13 am

On Monday August 6, arjan@infradead.org wrote:

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
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH/RFC] allow mapping from block-device-file to sy ..., Neil Brown, (Tue Aug 7, 12:13 am)