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-07-14 22:38:35 +02:00
2008-07-15 16:11:29 -04:00
2008-07-20 19:56:44 +02:00
2008-07-14 23:48:48 -07:00
2008-07-16 15:17:52 -07:00
2008-07-21 10:11:00 -07:00
2008-06-23 13:02:50 -04:00
2008-07-21 17:05:25 +10:00
2008-07-15 14:14:41 +02:00
2008-07-14 14:52:56 -04:00
2008-07-20 21:21:46 -07:00
2008-07-21 15:16:27 -07:00
2008-06-16 10:20:58 -07:00
2008-07-16 17:25:46 -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-06-24 23:36:35 -04:00
2008-07-03 13:21:14 +02:00
2008-07-16 14:51:41 -07:00
2008-07-03 13:21:12 +02:00
2008-07-08 10:36:17 +02:00
2008-07-04 10:40:08 -07:00
2008-07-04 10:40:05 -07:00
2008-07-17 15:21:29 -07:00
2008-07-04 10:40:09 -07:00
2008-07-12 08:22:32 -05:00
2008-07-10 20:35:18 +08:00
2008-07-20 17:12:38 -07:00
2008-07-11 10:46:50 +02:00
2008-07-13 11:51:40 +01:00
2008-07-05 13:10:50 -07:00
2008-07-18 17:22:04 -07:00
2008-06-24 13:53:46 +02:00
2008-07-21 12:00:37 +01:00
2008-07-21 21:54:40 -07:00
2008-06-24 22:58:07 -04:00
2008-07-21 12:00:37 +01:00
2008-07-01 14:47:09 +10:00
2008-07-02 03:47:41 -07:00
2008-07-08 17:55:41 +02:00
2008-07-10 14:30:13 +01:00
2008-07-16 23:27:03 +02:00
2008-07-20 21:21:46 -07:00
2008-07-11 15:49:21 +02:00
2008-07-20 17:12:36 -07:00
2008-07-03 13:21:14 +02:00
2008-07-20 17:12:36 -07:00
2008-07-04 08:47:41 -04:00
2008-07-14 22:38:31 +02:00
2008-07-20 07:18:38 -03:00
2008-07-14 22:38:36 +02:00
2008-07-16 20:33:48 +02:00
2008-07-08 14:15:59 -04:00
2008-07-18 18:05:19 -07:00
2008-07-14 22:18:19 -07:00
2008-06-16 16:48:20 -07:00
2008-07-14 22:49:06 -07:00
2008-07-03 17:51:57 +09:00
2008-07-10 14:47:38 +01:00
2008-06-27 20:09:00 -07:00
2008-07-09 12:09:28 -04:00
2008-07-16 18:02:33 -07:00
2008-07-21 00:55:14 -04:00
2008-07-15 10:39:22 -07:00
2008-07-03 13:21:14 +02:00
2008-07-16 23:27:07 +02:00
2008-07-03 17:51:56 +09:00
2008-07-20 17:12:37 -07:00
2008-07-11 19:27:31 -04:00
2008-06-27 23:13:54 +02:00
2008-07-10 08:17:14 +02:00
2008-06-23 22:10:57 +02:00
2008-07-04 10:40:05 -07:00
2008-07-20 12:42:40 +03:00
2008-07-20 12:42:32 +03:00
2008-07-14 15:59:33 -04:00
2008-07-14 16:11:52 +02:00
2008-06-27 09:39:47 +01:00
2008-06-24 13:43:07 +02:00
2008-07-15 15:44:51 +10:00
2008-07-09 16:30:45 +10:00
2008-07-14 10:02:12 +02:00
2008-07-11 19:27:31 -04:00
2008-07-03 17:51:57 +09:00
2008-07-03 17:51:57 +09:00
2008-07-08 03:03:01 -07:00
2008-07-18 22:50:15 -07:00
2008-07-08 02:36:40 -07:00
2008-06-23 13:02:48 -04:00
2008-07-09 12:09:40 -04:00
2008-07-09 12:09:17 -04:00
2008-07-09 12:09:24 -04:00
2008-07-09 12:09:16 -04:00
2008-06-27 09:09:17 -04:00
2008-06-17 23:59:41 -04:00
2008-06-16 11:21:27 +02:00
2008-07-18 02:39:39 -07:00
2008-07-07 16:26:50 -07:00
2008-07-16 17:25:46 -07:00
2008-07-11 19:27:31 -04:00
2008-07-14 20:36:32 -07:00
2008-07-20 00:08:47 -07:00
2008-07-14 14:30:21 -07:00
2008-07-16 23:27:07 +02:00
2008-06-12 18:05:40 -07:00
2008-07-14 15:01:47 +10:00
2008-07-03 13:25:05 +01:00
2008-07-04 10:40:07 -07:00
2008-06-26 14:21:22 -04:00
2008-07-20 00:08:47 -07:00
2008-07-16 18:02:33 -07:00
2008-07-04 10:40:08 -07:00
2008-07-14 15:04:06 +10:00
2008-07-18 04:07:44 -07:00
2008-07-20 17:12:35 -07:00
2008-07-08 10:33:01 -04: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-19 22:35:47 -07:00
2008-06-17 16:19:24 -07:00
2008-07-20 17:12:37 -07:00
2008-06-12 14:25:09 -07:00
2008-07-19 00:07:02 -07:00
2008-07-08 02:38:40 -07:00
2008-06-25 19:25:42 -04:00
2008-06-12 10:48:00 +02:00
2008-06-13 10:09:46 +02:00
2008-06-23 10:36:47 -07:00
2008-07-20 17:12:34 -07:00
2008-07-20 17:12:38 -07:00
2008-06-16 17:14:11 -07:00
2008-07-21 15:16:40 -07:00
2008-07-21 15:15:55 -07:00
2008-07-20 07:17:02 -03:00
2008-06-16 18:50:49 -07:00
2008-07-15 08:36:38 -07:00
2008-07-10 16:55:37 -07:00