mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
rfkill: include the device name in error message
This commit is contained in:
parent
551072321e
commit
78344935fd
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue