From df5a4889fe85fe6b1926736ea35e8ceec97c62f2 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 27 Feb 2020 22:27:13 +0900
Subject: [PATCH 1715/1760] udevadm: show more error message during exporting
 database

Closes #14959.
Reference: https://github.com/systemd/systemd/commit/df5a4889fe85fe6b1926736ea35e8ceec97c62f2
Conflict: NA
---
 src/udev/udevadm-info.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c
index 2d2bc00..1debdf2 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;
 }
-- 
1.8.3.1

