udevadm: show more error message during exporting database

Closes #14959.
This commit is contained in:
Yu Watanabe 2020-02-27 22:27:13 +09:00
parent 81eb5bc5cc
commit df5a4889fe
1 changed files with 4 additions and 4 deletions

View File

@ -177,18 +177,18 @@ static int export_devices(void) {
r = sd_device_enumerator_new(&e);
if (r < 0)
return r;
return log_oom();
r = sd_device_enumerator_allow_uninitialized(e);
if (r < 0)
return r;
return log_error_errno(r, "Failed to set allowing uninitialized flag: %m");
r = device_enumerator_scan_devices(e);
if (r < 0)
return r;
return log_error_errno(r, "Failed to scan devices: %m");
FOREACH_DEVICE_AND_SUBSYSTEM(e, d)
print_record(d);
(void) print_record(d);
return 0;
}