1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

Merge pull request #14960 from yuwata/udevadm-info-export-db-error-message

udevadm: show more error message during exporting database
This commit is contained in:
Anita Zhang 2020-02-27 17:10:19 -08:00 committed by GitHub
commit 8f7d2c89c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}