Greg KH wrote:.. So have we. sysfs is a total nightmare to extract information from under program / script control. The idea presented in this thread, is to have it cross-index the contents with a method that actually makes it easy to access in many common scenarios, without requiring huge gobs of code in user space. Or in kernel space. And it's not just a few 10s of lines of code currently, but rather about 80-100 lines just to find the correct device subdir, and *then* a few more 10s of lines of code to retrieve the value. In a bulletproof fashion, that is. Sure it can be slightly smaller if niceties such as error checking/handling are omitted. There's no guarantee that udev is present, and even if it were present, there's no guarantee that the names in /dev/ will match /sysfs/ pathnames, since udev is very configurable to do otherwise. So lookups are by dev_t, which sysfs has no simple or even easy way of accomplishing. O(n) at a minimum. If we make it easier to access, then more programs will use it rather than us having to expand our tricky binary ioctl interfaces. Isn't that part of the idea of sysfs -- to limit the need for new ioctls ? Cheers --
| Jeff Garzik | [PATCH 1/9] irq-remove: core |
| Jamie Lokier | Re: POHMELFS high performance network filesystem. Transactions, failover, performa... |
| Dave Young | Re: 2.6.24-rc3-mm1 |
| Willy Tarreau | Re: From 2.4 to 2.6 to 2.7? |
git: | |
| Dan Miner | Compilation speeds (was Re: No patchlevel 3.} |
| Ian Jackson | RFD: comp.os.linux split |
| X X | X11 GIf viewer somewhere? |
| root | Broken pipe when using reboot/halt, etc. |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
