Re: unify sysfs device tree

Mike Snitzer
2006-01-16T15:03:09Z

On 1/16/06, Kay Sievers <kay.sievers@vrfy.org> wrote:

> Here is an updated patch, that:
> o moves the devices in /sys/block to /sys/devices to match the
> class layout. Block devices will be childs of their physical
> device chain like every other class device too. Partitions
> will be childs of the disk device. A usual DEVPATH looks like:
> /devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/sda/sda1
>
> o flattens the block class view and moves the block symlinks to
> /sys/class/block. Disks and partitons like /sys/class/block/sda
> and /sys/class/block/sda1 will be at the same level. /sys/block
> does not longer exist.

What is the problem with maintaining compatibility by having
/sys/block be a symlink to /sys/class/block? Userspace applications
shouldn't have to now conditionalize the path to block devices
(/sys/block/... vs /sys/class/block/...). Forcing this kind of change
is what taints Linux for use in hardened applications.
Conditionalizing code for 2.4 vs 2.6 is understandable but having to
do so for minor 2.6.x revisions is rediculous. <insert ref to Linus'
views in the recent 'userspace breakage' thread here>.

Mike