Files
kernel-tenderloin-3.0/include/linux
Dan Williams e105b8bfc7 sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor
Why?:
There are occasions where userspace would like to access sysfs
attributes for a device but it may not know how sysfs has named the
device or the path.  For example what is the sysfs path for
/dev/disk/by-id/ata-ST3160827AS_5MT004CK?  With this change a call to
stat(2) returns the major:minor then userspace can see that
/sys/dev/block/8:32 links to /sys/block/sdc.

What are the alternatives?:
1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
   the need to proliferate ioctl interfaces into the kernel, so this
   seems counter productive.

2/ Use udev to create these symlinks: Also doable, but it adds a
   udev dependency to utilities that might be running in a limited
   environment like an initramfs.

3/ Do a full-tree search of sysfs.

[kay.sievers@vrfy.org: fix duplicate registrations]
[kay.sievers@vrfy.org: cleanup suggestions]

Cc: Neil Brown <neilb@suse.de>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Reviewed-by: SL Baur <steve@xemacs.org>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Mark Lord <lkml@rtr.ca>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 21:54:40 -07:00
..
2008-06-23 13:02:50 -04:00
2008-07-14 14:52:56 -04:00
2008-07-21 15:16:27 -07:00
2008-07-01 11:28:06 +10:00
2008-06-19 10:42:17 +10:00
2008-06-19 10:42:17 +10:00
2008-04-29 08:06:00 -07:00
2008-07-03 13:21:14 +02:00
2008-04-29 08:11:16 -07:00
2008-06-06 11:29:10 -07:00
2008-05-29 01:38:46 -07:00
2008-04-29 08:06:01 -07:00
2008-07-04 10:40:05 -07:00
2008-05-01 08:03:59 -07:00
2008-07-04 10:40:09 -07:00
2008-07-20 17:12:38 -07:00
2008-07-11 10:46:50 +02:00
2008-07-21 12:00:37 +01:00
2008-07-21 12:00:37 +01:00
2008-05-07 09:48:23 +02:00
2008-05-16 17:22:26 -04:00
2008-05-01 13:08:16 -04:00
2008-07-08 17:55:41 +02:00
2008-07-16 23:27:03 +02:00
2008-07-11 15:49:21 +02:00
2008-05-13 08:02:26 -07:00
2008-07-20 17:12:36 -07:00
2008-05-24 09:56:13 -07:00
2008-07-20 17:12:36 -07:00
2008-05-20 16:44:43 +02:00
2008-05-20 16:44:43 +02:00
2008-07-16 20:33:48 +02:00
2008-04-29 08:06:25 -07:00
2008-06-11 21:00:38 -07:00
2008-07-18 18:05:19 -07:00
2008-06-11 21:00:38 -07:00
2008-07-14 22:49:06 -07:00
2008-07-03 17:51:57 +09:00
2008-07-16 18:02:33 -07:00
2008-04-29 08:06:03 -07:00
2008-05-05 16:47:14 +10:00
2008-07-16 23:27:07 +02:00
2008-06-11 21:00:38 -07:00
2008-04-29 08:06:15 -07:00
2008-07-20 17:12:37 -07:00
2008-05-01 08:03:58 -07:00
2008-05-20 12:17:39 -04:00
2008-07-10 08:17:14 +02:00
2008-07-04 10:40:05 -07:00
2008-07-20 12:42:32 +03:00
2008-05-23 22:26:03 +02:00
2008-04-29 08:06:01 -07:00
2008-06-06 11:29:12 -07:00
2008-06-16 11:21:27 +02:00
2008-06-10 14:37:03 -07:00
2008-07-07 16:26:50 -07:00
2008-04-29 08:06:02 -07:00
2008-04-29 08:06:02 -07:00
2008-05-06 12:01:41 -04:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-05-19 16:25:39 +01:00
2008-05-19 10:01:36 +02:00
2008-07-04 10:40:07 -07:00
2008-05-19 10:01:36 +02:00
2008-04-30 08:29:51 -07:00
2008-04-29 08:05:59 -07:00
2008-05-25 07:09:47 +02:00
2008-07-16 18:02:33 -07:00
2008-07-20 17:12:35 -07:00
2008-07-14 22:49:06 -07:00
2008-07-04 10:40:04 -07:00
2008-07-04 10:40:04 -07:00
2008-06-20 14:05:53 -06:00
2008-07-04 11:26:40 +02:00
2008-07-20 17:12:37 -07:00
2008-06-12 14:25:09 -07:00
2008-05-04 17:07:03 -07:00
2008-06-12 10:48:00 +02:00
2008-05-01 08:03:59 -07:00
2008-07-20 17:12:34 -07:00
2008-07-20 17:12:38 -07:00
2008-07-21 15:15:55 -07:00
2008-05-09 07:45:18 -07:00