summaryrefslogtreecommitdiffstats
path: root/baseudev.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-01-30 13:45:28 +0100
committerHans de Goede <hdegoede@redhat.com>2010-02-01 17:20:42 +0100
commitfd9d8c2afdeffe1268e745396819faa6ae48e642 (patch)
tree6e59d636b26c5dc0f17b89a63bccc1499a35f430 /baseudev.py
parent7910d877e3a7ca6794336d218eb5152015284795 (diff)
downloadanaconda-fd9d8c2afdeffe1268e745396819faa6ae48e642.tar.gz
anaconda-fd9d8c2afdeffe1268e745396819faa6ae48e642.tar.xz
anaconda-fd9d8c2afdeffe1268e745396819faa6ae48e642.zip
pyudev: explicitly specify all return value and argument types (#559394)
We were relying on the ctypes behavior to default to int as return type for all functions. But most of the functions in question are not returning int's but pointers, which are 64 bit on s390x (and ppc64 and x86_64). Due to the fact that we were getting virtual addresses below 4G + the C calling conventions on x86_64 making it not matter when passing in an 32 bit int instead of a 64 bit one, as long as the 32 bit one represent the correct number, we got away with this on x86_64 (unfortunately really). This patch very likely also fixes #560035. Note I also threw in a traceback fix in the same codepath, baseudev assumes that devices always have a DEVLINKS property, which is not true for for example network devices.
Diffstat (limited to 'baseudev.py')
-rw-r--r--baseudev.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/baseudev.py b/baseudev.py
index 7266bc65a..cef6766f4 100644
--- a/baseudev.py
+++ b/baseudev.py
@@ -45,7 +45,7 @@ def udev_get_device(sysfs_path):
if dev:
dev["name"] = dev.sysname
- dev["symlinks"] = dev["DEVLINKS"]
+ dev["symlinks"] = dev.get("DEVLINKS", [])
dev["sysfs_path"] = sysfs_path
# now add in the contents of the uevent file since they're handy