2005-09-16 19:36:18

by Bill Nottingham

[permalink] [raw]
Subject: [PATCH] fix class symlinks in sysfs

The class symlinks in sysfs don't properly handle changing device names.

To demonstrate, rename your network device from eth0 to eth1. Your
pci (or usb, or whatever) device will still have a 'net:eth0' link,
except now it points to /sys/class/net/eth1.

The attached patch makes sure the class symlink name changes when
the class device name changes. It isn't 100% correct, it should be
using sysfs_rename_link. Unfortunately, sysfs_rename_link doesn't exist.

Signed-off-by: Bill Nottingham <[email protected]>

Bill


Attachments:
(No filename) (520.00 B)
linux-sysfs.patch (1.03 kB)
Download all attachments