Re: /sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-17 Thread Michael Tokarev
Michael Tokarev wrote: > Kay Sievers wrote: >> On Mon, 2007-12-17 at 08:29 +0300, Michael Tokarev wrote: > [] >>> How to distinguish char devices from block devices in sysfs? >>> Is the only way to read a symlink `subsystem' in the device >>> directory? >> By its subsystem value (block), from the

Re: /sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-17 Thread Michael Tokarev
Kay Sievers wrote: > On Mon, 2007-12-17 at 08:29 +0300, Michael Tokarev wrote: [] >> How to distinguish char devices from block devices in sysfs? >> Is the only way to read a symlink `subsystem' in the device >> directory? > > By its subsystem value (block), from the symlink, from the

Re: /sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-17 Thread Kay Sievers
On Mon, 2007-12-17 at 08:29 +0300, Michael Tokarev wrote: > Kay Sievers wrote: > > On Mon, 2007-12-17 at 09:43 +1100, Neil Brown wrote: > >> On Saturday December 15, [EMAIL PROTECTED] wrote: > >>> On Dec 14, 2007 7:26 AM, NeilBrown <[EMAIL PROTECTED]> wrote: > Given an fd on a block device,

Re: /sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-17 Thread Kay Sievers
On Mon, 2007-12-17 at 08:29 +0300, Michael Tokarev wrote: Kay Sievers wrote: On Mon, 2007-12-17 at 09:43 +1100, Neil Brown wrote: On Saturday December 15, [EMAIL PROTECTED] wrote: On Dec 14, 2007 7:26 AM, NeilBrown [EMAIL PROTECTED] wrote: Given an fd on a block device, returns a string

Re: /sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-17 Thread Michael Tokarev
Kay Sievers wrote: On Mon, 2007-12-17 at 08:29 +0300, Michael Tokarev wrote: [] How to distinguish char devices from block devices in sysfs? Is the only way to read a symlink `subsystem' in the device directory? By its subsystem value (block), from the symlink, from the environment, or

Re: /sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-17 Thread Michael Tokarev
Michael Tokarev wrote: Kay Sievers wrote: On Mon, 2007-12-17 at 08:29 +0300, Michael Tokarev wrote: [] How to distinguish char devices from block devices in sysfs? Is the only way to read a symlink `subsystem' in the device directory? By its subsystem value (block), from the symlink, from

/sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-16 Thread Michael Tokarev
Kay Sievers wrote: > On Mon, 2007-12-17 at 09:43 +1100, Neil Brown wrote: >> On Saturday December 15, [EMAIL PROTECTED] wrote: >>> On Dec 14, 2007 7:26 AM, NeilBrown <[EMAIL PROTECTED]> wrote: Given an fd on a block device, returns a string like /block/sda/sda1

Re: [PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-16 Thread Kay Sievers
On Mon, 2007-12-17 at 09:43 +1100, Neil Brown wrote: > On Saturday December 15, [EMAIL PROTECTED] wrote: > > On Dec 14, 2007 7:26 AM, NeilBrown <[EMAIL PROTECTED]> wrote: > > > > > > Given an fd on a block device, returns a string like > > > > > > /block/sda/sda1 > > > > > > which can be

Re: [PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-16 Thread Neil Brown
On Saturday December 15, [EMAIL PROTECTED] wrote: > On Dec 14, 2007 7:26 AM, NeilBrown <[EMAIL PROTECTED]> wrote: > > > > Given an fd on a block device, returns a string like > > > > /block/sda/sda1 > > > > which can be used to find related information in /sys. > > As pointed out to

Re: [PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-16 Thread Neil Brown
On Saturday December 15, [EMAIL PROTECTED] wrote: On Dec 14, 2007 7:26 AM, NeilBrown [EMAIL PROTECTED] wrote: Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find related information in /sys. As pointed out to when you came up

Re: [PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-16 Thread Kay Sievers
On Mon, 2007-12-17 at 09:43 +1100, Neil Brown wrote: On Saturday December 15, [EMAIL PROTECTED] wrote: On Dec 14, 2007 7:26 AM, NeilBrown [EMAIL PROTECTED] wrote: Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find related

/sys/block [was: [PATCH 007 of 7] md: Get name for block device in sysfs]

2007-12-16 Thread Michael Tokarev
Kay Sievers wrote: On Mon, 2007-12-17 at 09:43 +1100, Neil Brown wrote: On Saturday December 15, [EMAIL PROTECTED] wrote: On Dec 14, 2007 7:26 AM, NeilBrown [EMAIL PROTECTED] wrote: Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find

Re: [PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-15 Thread Kay Sievers
On Dec 14, 2007 7:26 AM, NeilBrown <[EMAIL PROTECTED]> wrote: > > Given an fd on a block device, returns a string like > > /block/sda/sda1 > > which can be used to find related information in /sys. > > Ideally we should have an ioctl that works on char devices as well, > but that seems far

Re: [PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-15 Thread Kay Sievers
On Dec 14, 2007 7:26 AM, NeilBrown [EMAIL PROTECTED] wrote: Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find related information in /sys. Ideally we should have an ioctl that works on char devices as well, but that seems far from

[PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-13 Thread NeilBrown
Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find related information in /sys. Ideally we should have an ioctl that works on char devices as well, but that seems far from trivial, so it seems reasonable to have this until the later can be

[PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-13 Thread NeilBrown
Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find related information in /sys. Ideally we should have an ioctl that works on char devices as well, but that seems far from trivial, so it seems reasonable to have this until the later can be