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

2007-08-09 Thread Kay Sievers
On Thu, 2007-08-09 at 16:50 +1000, Neil Brown wrote: > On Tuesday August 7, [EMAIL PROTECTED] wrote: > > On 8/7/07, Neil Brown <[EMAIL PROTECTED]> wrote: > > > On Monday August 6, [EMAIL PROTECTED] wrote: > > > > On Tue, 2007-08-07 at 16:07 +1000, Neil Brown wrote: > > > > > Suppose that in a progr

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

2007-08-08 Thread Neil Brown
On Tuesday August 7, [EMAIL PROTECTED] wrote: > On 8/7/07, Neil Brown <[EMAIL PROTECTED]> wrote: > > On Monday August 6, [EMAIL PROTECTED] wrote: > > > On Tue, 2007-08-07 at 16:07 +1000, Neil Brown wrote: > > > > Suppose that in a program I have an open file descriptor for a device, > > > > and I w

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

2007-08-07 Thread Kay Sievers
On 8/7/07, Neil Brown <[EMAIL PROTECTED]> wrote: > On Monday August 6, [EMAIL PROTECTED] wrote: > > On Tue, 2007-08-07 at 16:07 +1000, Neil Brown wrote: > > > Suppose that in a program I have an open file descriptor for a device, > > > and I want to find the /sys/block information for this device.

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

2007-08-07 Thread Neil Brown
On Monday August 6, [EMAIL PROTECTED] wrote: > On Tue, 2007-08-07 at 16:07 +1000, Neil Brown wrote: > > Suppose that in a program I have an open file descriptor for a device, > > and I want to find the /sys/block information for this device. > > There is currently no direct way to do this. I need

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

2007-08-06 Thread Arjan van de Ven
On Tue, 2007-08-07 at 16:07 +1000, Neil Brown wrote: > Suppose that in a program I have an open file descriptor for a device, > and I want to find the /sys/block information for this device. > There is currently no direct way to do this. I need to read >/sys/block/*/dev, /sys/block/*/*/dev > a

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

2007-08-06 Thread Neil Brown
Suppose that in a program I have an open file descriptor for a device, and I want to find the /sys/block information for this device. There is currently no direct way to do this. I need to read /sys/block/*/dev, /sys/block/*/*/dev and match major/minor numbers with the result from fstat. I wo