]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: suppress too many debugging log when enumerating devices 22283/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jan 2022 01:56:38 +0000 (10:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jan 2022 01:58:15 +0000 (10:58 +0900)
Follow-up for d7cb60daf6d3769f1e26753195d62e8fcee025fa.

src/libsystemd/sd-device/sd-device.c

index 92a7ededf6d9979bdfd3277ea1f013eb5dfeac4c..27c91ea724f93a453997dd96d12f6bcca2c8aa85 100644 (file)
@@ -188,8 +188,11 @@ int device_set_syspath(sd_device *device, const char *_syspath, bool verify) {
                         path = strjoina(syspath, "/uevent");
                         if (access(path, F_OK) < 0) {
                                 if (errno == ENOENT)
-                                        /* this is not a valid device */
-                                        return log_debug_errno(SYNTHETIC_ERRNO(ENODEV),
+                                        /* This is not a valid device.
+                                         * Note, this condition is quite often satisfied when
+                                         * enumerating devices or finding a parent device.
+                                         * Hence, use log_trace_errno() here. */
+                                        return log_trace_errno(SYNTHETIC_ERRNO(ENODEV),
                                                                "sd-device: the uevent file \"%s\" does not exist.", path);
 
                                 return log_debug_errno(errno, "sd-device: cannot access uevent file for %s: %m", syspath);