daandemeyer / rpms / systemd

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