teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0285-udev-downgrade-a-few-warnings-to-debug-messages.patch

803fb7
From 95a6f0f1b2a24e40380af5db1797ee60c8763ca2 Mon Sep 17 00:00:00 2001
803fb7
From: Lennart Poettering <lennart@poettering.net>
803fb7
Date: Tue, 14 Apr 2015 15:48:26 +0200
803fb7
Subject: [PATCH] udev: downgrade a few warnings to debug messages
803fb7
803fb7
https://bugs.freedesktop.org/show_bug.cgi?id=89885
803fb7
803fb7
Cherry-picked from: 8d8ce9e2
803fb7
Resolves: #1289461
803fb7
---
803fb7
 src/udev/udev-builtin-blkid.c  | 2 +-
803fb7
 src/udev/udev-builtin-usb_id.c | 6 ++----
803fb7
 2 files changed, 3 insertions(+), 5 deletions(-)
803fb7
803fb7
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c
803fb7
index 89995831b..2b2c3dad6 100644
803fb7
--- a/src/udev/udev-builtin-blkid.c
803fb7
+++ b/src/udev/udev-builtin-blkid.c
803fb7
@@ -263,7 +263,7 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
803fb7
 
803fb7
         fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC);
803fb7
         if (fd < 0) {
803fb7
-                fprintf(stderr, "error: %s: %m\n", udev_device_get_devnode(dev));
803fb7
+                err = log_debug_errno(errno, "Failure opening block device %s: %m", udev_device_get_devnode(dev));
803fb7
                 goto out;
803fb7
         }
803fb7
 
803fb7
diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c
803fb7
index ab0d96e37..64b763c1e 100644
803fb7
--- a/src/udev/udev-builtin-usb_id.c
803fb7
+++ b/src/udev/udev-builtin-usb_id.c
803fb7
@@ -168,10 +168,8 @@ static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len
803fb7
                 return log_oom();
803fb7
 
803fb7
         fd = open(filename, O_RDONLY|O_CLOEXEC);
803fb7
-        if (fd < 0) {
803fb7
-                fprintf(stderr, "error opening USB device 'descriptors' file\n");
803fb7
-                return -errno;
803fb7
-        }
803fb7
+        if (fd < 0)
803fb7
+                return log_debug_errno(errno, "Error opening USB device 'descriptors' file: %m");
803fb7
 
803fb7
         size = read(fd, buf, sizeof(buf));
803fb7
         if (size < 18 || size == sizeof(buf))