diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-27 01:24:25 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 03:15:39 +0100 |
commit | cc0bf5e148c8e18d57987e14385b1e60040fb014 (patch) | |
tree | 59a640ceecc6b6a05476c8aaa93e896635ba39a4 /src/udev/udev-watch.c | |
parent | udev-watch: make udev_watch_lookup() return 1 when device found (diff) | |
download | systemd-cc0bf5e148c8e18d57987e14385b1e60040fb014.tar.xz systemd-cc0bf5e148c8e18d57987e14385b1e60040fb014.zip |
udev-watch: adjust level of log messages
Diffstat (limited to 'src/udev/udev-watch.c')
-rw-r--r-- | src/udev/udev-watch.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index f63a5839d6..cf2faa0831 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -36,18 +36,18 @@ int udev_watch_restore(void) { int r; if (inotify_fd < 0) - return log_error_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(EINVAL, "Invalid inotify descriptor."); if (rename("/run/udev/watch", "/run/udev/watch.old") < 0) { if (errno != ENOENT) - return log_error_errno(errno, "Failed to move watches directory /run/udev/watch. Old watches will not be restored: %m"); + return log_warning_errno(errno, "Failed to move watches directory /run/udev/watch. Old watches will not be restored: %m"); return 0; } dir = opendir("/run/udev/watch.old"); if (!dir) - return log_error_errno(errno, "Failed to open old watches directory /run/udev/watch.old. Old watches will not be restored: %m"); + return log_warning_errno(errno, "Failed to open old watches directory /run/udev/watch.old. Old watches will not be restored: %m"); FOREACH_DIRENT_ALL(ent, dir, break) { _cleanup_(sd_device_unrefp) sd_device *dev = NULL; @@ -58,13 +58,13 @@ int udev_watch_restore(void) { r = readlinkat_malloc(dirfd(dir), ent->d_name, &device); if (r < 0) { - log_error_errno(r, "Failed to read link '/run/udev/watch.old/%s', ignoring: %m", ent->d_name); + log_debug_errno(r, "Failed to read link '/run/udev/watch.old/%s', ignoring: %m", ent->d_name); goto unlink; } r = sd_device_new_from_device_id(&dev, device); if (r < 0) { - log_error_errno(r, "Failed to create sd_device object for '%s', ignoring: %m", device); + log_debug_errno(r, "Failed to create sd_device object for '%s', ignoring: %m", device); goto unlink; } @@ -86,7 +86,7 @@ int udev_watch_begin(sd_device *dev) { int wd, r; if (inotify_fd < 0) - return log_error_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(EINVAL, "Invalid inotify descriptor."); r = sd_device_get_devname(dev, &devnode); if (r < 0) @@ -120,13 +120,13 @@ int udev_watch_end(sd_device *dev) { int wd, r; if (inotify_fd < 0) - return log_error_errno(EINVAL, "Invalid inotify descriptor."); + return log_debug_errno(EINVAL, "Invalid inotify descriptor."); r = device_get_watch_handle(dev, &wd); if (r == -ENOENT) return 0; if (r < 0) - return log_device_error_errno(dev, r, "Failed to get watch handle, ignoring: %m"); + return log_device_debug_errno(dev, r, "Failed to get watch handle, ignoring: %m"); log_device_debug(dev, "Removing watch"); (void) inotify_rm_watch(inotify_fd, wd); |