Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 70a79fa ("zgetdump: Avoid using PATH_MAX") Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
- Loading branch information
Showing
1 changed file
with
36 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters