]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: logs error in udev_builtin_add_property()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Oct 2018 03:04:33 +0000 (12:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 23 Oct 2018 09:28:38 +0000 (18:28 +0900)
src/udev/udev-builtin.c

index 53f70dbfb4bd8b99566e967bad287b8fb3e5b933..3a61be10caa32fe1731a2069b81f33eba5cff9ea 100644 (file)
@@ -5,6 +5,7 @@
 #include <string.h>
 
 #include "device-private.h"
+#include "device-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "udev-builtin.h"
@@ -134,9 +135,11 @@ int udev_builtin_add_property(sd_device *dev, bool test, const char *key, const
 
         r = device_add_property(dev, key, val);
         if (r < 0)
-                return r;
+                return log_device_debug_errno(dev, r, "Failed to add property '%s%s%s'",
+                                              key, val ? "=" : "", strempty(val));
 
         if (test)
                 printf("%s=%s\n", key, val);
+
         return 0;
 }