From: Zbigniew Jędrzejewski-Szmek Date: Wed, 18 Oct 2017 15:31:51 +0000 (+0200) Subject: rfkill: include the device name in error message X-Git-Tag: v236~291^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7127%2Fhead;p=thirdparty%2Fsystemd.git rfkill: include the device name in error message --- diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index 3aa468f40ba..c14b5ea3eea 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -88,7 +88,8 @@ static int find_device( device = udev_device_new_from_subsystem_sysname(udev, "rfkill", sysname); if (!device) - return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, "Failed to open device: %m"); + return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, + "Failed to open device %s: %m", sysname); name = udev_device_get_sysattr_value(device, "name"); if (!name) { @@ -146,7 +147,8 @@ static int wait_for_initialized( /* Check again, maybe things changed */ d = udev_device_new_from_subsystem_sysname(udev, "rfkill", sysname); if (!d) - return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, "Failed to open device: %m"); + return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, + "Failed to open device %s: %m", sysname); if (udev_device_get_is_initialized(d) != 0) { *ret = d;