summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-02-27 22:27:13 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-02-27 22:27:16 +0900
commitdf5a4889fe85fe6b1926736ea35e8ceec97c62f2 (patch)
tree10edb3f8c3d7f75c6285af8c67b68ce2b31583fe
parent81eb5bc5cc7e7b9147de50e2cdb7454e527d8ef3 (diff)
downloadsystemd-df5a4889fe85fe6b1926736ea35e8ceec97c62f2.tar.gz
udevadm: show more error message during exporting database
Closes #14959.
-rw-r--r--src/udev/udevadm-info.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c
index 2d2bc0026e..1debdf2b31 100644
--- a/src/udev/udevadm-info.c
+++ b/src/udev/udevadm-info.c
@@ -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;
}