diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-21 08:23:20 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-22 10:54:38 +0100 |
commit | 886cf317c4cace1874e251e54bfe5d1e01d6591a (patch) | |
tree | 5befb8cce9b07e1975783309ea1529d4fe5b80b0 /src/udev/udev-watch.c | |
parent | coccinelle: make use of SYNTHETIC_ERRNO (diff) | |
download | systemd-886cf317c4cace1874e251e54bfe5d1e01d6591a.tar.xz systemd-886cf317c4cace1874e251e54bfe5d1e01d6591a.zip |
coccinelle: also mark previous synthetic errnos as such
Diffstat (limited to 'src/udev/udev-watch.c')
-rw-r--r-- | src/udev/udev-watch.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 3f8715709a..68b51d04a3 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -36,7 +36,8 @@ int udev_watch_restore(void) { int r; if (inotify_fd < 0) - return log_debug_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), + "Invalid inotify descriptor."); if (rename("/run/udev/watch", "/run/udev/watch.old") < 0) { if (errno != ENOENT) @@ -86,7 +87,8 @@ int udev_watch_begin(sd_device *dev) { int wd, r; if (inotify_fd < 0) - return log_debug_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), + "Invalid inotify descriptor."); r = sd_device_get_devname(dev, &devnode); if (r < 0) @@ -123,7 +125,8 @@ int udev_watch_end(sd_device *dev) { int wd, r; if (inotify_fd < 0) - return log_debug_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), + "Invalid inotify descriptor."); r = device_get_watch_handle(dev, &wd); if (r == -ENOENT) @@ -150,10 +153,12 @@ int udev_watch_lookup(int wd, sd_device **ret) { assert(ret); if (inotify_fd < 0) - return log_debug_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), + "Invalid inotify descriptor."); if (wd < 0) - return log_debug_errno(EINVAL, "Invalid watch handle."); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), + "Invalid watch handle."); xsprintf(filename, "/run/udev/watch/%d", wd); r = readlink_malloc(filename, &device); |