summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-08-07 15:49:52 +0200
committerHans de Goede <hdegoede@redhat.com>2009-08-07 15:49:52 +0200
commit2694e31a34d7f89ab84d59fbdfcffd3986cc1fcb (patch)
treedefe62e52170b68e109b8dcdcce6c58f2776fa2a /isys
parent6c6d1551a5e02f17ad8da30eec98b65706f088ae (diff)
downloadanaconda-2694e31a34d7f89ab84d59fbdfcffd3986cc1fcb.tar.gz
anaconda-2694e31a34d7f89ab84d59fbdfcffd3986cc1fcb.tar.xz
anaconda-2694e31a34d7f89ab84d59fbdfcffd3986cc1fcb.zip
Make all sysfs path's be _without_ /sys prefix (#516168)
Most sysfs path handling code expects / uses sysfs path's without the /sys prefix (as udev does internally). There were 4 functions which were exceptions to this: udev_enumerate_devices udev_enumerate_block_devices udev_get_device udev_get_block_device These expected resp. returned sysfs path's with /sys prefix. This inconsistency causes the backtrace in bug 516168. Rather then applying a simple fix for this, this patch makes the sysfs path usage consistent everywhere, to avoid issues like this in the future. This patch adjust the above 4 functions and all callers.
Diffstat (limited to 'isys')
-rwxr-xr-xisys/isys.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 13ba807d8..79959d0ac 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -599,7 +599,7 @@ def getNetDevDesc(dev):
if dev == device_props['Interface']:
# This is the sysfs path (for now).
udev_path = device_props['Udi']
- dev = udev_get_device(udev_path)
+ dev = udev_get_device(udev_path[4:])
if dev is None:
log.debug("weird, we have a None dev with path %s" % path)