| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Some udev properties which should be a string were
wrongly converted to a list of words.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent base_udev.py changes to switch over to
global_udev.enumerate_devices(), move the removing of the /sys prefix to
udev_get_device(). But in various places in the devicetree we call
udev_get_device() (through udev_get_block_device) to get information from
parents which are not yet in the tree (ie when we scan a partition
before its disk).
All these calls are broken now, as all those pass in a path without /sys
at the front and the new udev_get_device() wants it with /sys in front.
This patch makes udev_enumerate_devices() return paths without the /sys
prefix, and reverses the changes to udev_get_device() to expect a full path,
so that we use sysfs paths without /sys in front consistently everywhere.
|
|
|
|
|
| |
Do not list the directories in sys, but use the libudev's
enumerate_devices function to get the sysfs paths.
|
|
|
|
|
| |
iutil.execWithRedirect() stopped doing anything with searchPath in 2006
when clumens committed d0dec24. Remove these silly vestigal bits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) centralize the setting of the timeout parameter inside the
udev_settle function. I do realize that the time needed for
initially scanning all disks is much larger, then the time for
scanning a single new partition when we are creating partitions.
But since this is a timeout, and udevadm settle will exit as soon
as the scanning is done, I see no reason not to have a single place
to configure the timeout assuming the worst case scenario (the initial
disk scan). This way we won't have these magic values sprinkled all
over the code.
2) Given that in the past we've had bugs filed
about anaconda taking many minutes to scan hardware on big iron machine
and that our initial udev settle call will scan all disks, I think
that udevadm's default timeout of 1 minutes is too low, so this patch
sets the timeout to 5 minutes.
|
|
|
|
|
| |
Also rewrote the baseudev.py to use the bindings instead of parsing
the udev db file
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
The udev code can be used for more than just storage - it can be used for
networking as well. Moving these methods out makes that a little more clear.
|