summaryrefslogtreecommitdiffstats
path: root/src/udev/udevadm-info.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-02-27 14:27:13 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-02-27 14:27:16 +0100
commitdf5a4889fe85fe6b1926736ea35e8ceec97c62f2 (patch)
tree10edb3f8c3d7f75c6285af8c67b68ce2b31583fe /src/udev/udevadm-info.c
parentnetwork: remove redundant %m in error message (diff)
downloadsystemd-df5a4889fe85fe6b1926736ea35e8ceec97c62f2.tar.xz
systemd-df5a4889fe85fe6b1926736ea35e8ceec97c62f2.zip
udevadm: show more error message during exporting database
Closes #14959.
Diffstat (limited to '')
-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;
}