Files
Jan Höppner d55b787d05 zgetdump: Fix device node determination via sysfs
When using zgetdump on a multi-volume device dump, the sysfs path to
determine the device node is incomplete, resulting in the following
error:

$ zgetdump -i /dev/dasdb1
zgetdump: Could not open "/sys/bus/ccw/devices/0.0.9300/dasdb/dev" (No
such file or directory)

A simple fix would be to add the missing "block" part in the sysfs path.
However, the logic still assumes sysfs links like "block:" that have
been deprecated a decade ago and are no longer present on modern
systems anyway.
Therefore, the logic can greatly be improved. Create a separate function
to determine whether a device is online, remove the logic for "block:"
entries, and use libutil functions to reduce the complexity even further.

Fixes: 70a79fab3c ("zgetdump: Avoid using PATH_MAX")
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-10-28 13:22:45 +01:00
..
2019-12-12 18:04:32 +01:00
2019-12-12 18:04:32 +01:00
2019-12-12 18:04:32 +01:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2019-12-12 18:04:32 +01:00
2017-08-21 10:55:40 +02:00
2019-12-12 18:04:32 +01:00
2017-08-21 10:55:40 +02:00
2019-12-12 18:04:32 +01:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2018-05-07 13:42:03 +02:00
2017-08-21 10:55:40 +02:00
2018-05-07 13:42:03 +02:00