diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-03-24 13:50:50 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-03-24 16:19:48 +0100 |
commit | 3f2ada89f3a277625390bf6789ccd4e7aba08743 (patch) | |
tree | 60e1d90242675275354e9e0cfabb14e10e2186a9 /src/rfkill | |
parent | udev: remove /run/udev/queue in on_post() (diff) | |
download | systemd-3f2ada89f3a277625390bf6789ccd4e7aba08743.tar.xz systemd-3f2ada89f3a277625390bf6789ccd4e7aba08743.zip |
errno-util: add ERRNO_IS_DEVICE_ABSENT() macro
Inspired by: https://github.com/systemd/systemd/pull/22717#discussion_r834254495
Diffstat (limited to 'src/rfkill')
-rw-r--r-- | src/rfkill/rfkill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index 656afa06ac..a833771d97 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -80,7 +80,7 @@ static int find_device( r = sd_device_new_from_subsystem_sysname(&device, "rfkill", sysname); if (r < 0) - return log_full_errno(IN_SET(r, -ENOENT, -ENXIO, -ENODEV) ? LOG_DEBUG : LOG_ERR, r, + return log_full_errno(ERRNO_IS_DEVICE_ABSENT(r) ? LOG_DEBUG : LOG_ERR, r, "Failed to open device '%s': %m", sysname); r = sd_device_get_sysattr_value(device, "name", &name); |