diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-18 17:31:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-18 17:39:54 +0200 |
commit | 78344935fd21e1eedac962f305efc76ac69b5b19 (patch) | |
tree | 0f3589288576797408b813d48ffaaed23d209e10 /src/rfkill | |
parent | 551072321e2beb97e2fb6a195c40bdc7612cbb51 (diff) | |
download | systemd-78344935fd21e1eedac962f305efc76ac69b5b19.tar.gz |
rfkill: include the device name in error message
Diffstat (limited to 'src/rfkill')
-rw-r--r-- | src/rfkill/rfkill.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index 3aa468f40b..c14b5ea3ee 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; |