mirror of
https://github.com/systemd/systemd.git
synced 2026-08-12 22:17:19 +00:00
udevadm: info: also show parent devices by --tree
This commit is contained in:
committed by
Luca Boccassi
parent
ee5b175b8c
commit
bd4297e761
@@ -637,6 +637,13 @@ static int print_tree(sd_device* below) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to scan for devices and subsystems: %m");
|
||||
|
||||
if (below) {
|
||||
/* This must be called after device_enumerator_scan_devices_and_subsystems(). */
|
||||
r = device_enumerator_add_parent_devices(e, below);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to add parent devices: %m");
|
||||
}
|
||||
|
||||
assert_se(array = device_enumerator_get_devices(e, &n));
|
||||
|
||||
if (n == 0) {
|
||||
|
||||
Reference in New Issue
Block a user