X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-watch.c;h=968728eba9e84c6ddd317daec506a3d7008fb802;hb=8ea5c07b1c527b6885ac5debaacd823b87f10d05;hp=228d18fedf4935707abaa20f11c558004f2dfca7;hpb=6df831f25ebc9f55cd939f04392dad9237706e45;p=elogind.git diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 228d18fed..968728eba 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Kay Sievers + * Copyright (C) 2004-2012 Kay Sievers * Copyright (C) 2009 Canonical Ltd. * Copyright (C) 2009 Scott James Remnant * @@ -40,7 +40,7 @@ int udev_watch_init(struct udev *udev) { inotify_fd = inotify_init1(IN_CLOEXEC); if (inotify_fd < 0) - err(udev, "inotify_init failed: %m\n"); + log_error("inotify_init failed: %m\n"); return inotify_fd; } @@ -62,7 +62,7 @@ void udev_watch_restore(struct udev *udev) dir = opendir(oldname); if (dir == NULL) { - err(udev, "unable to open old watches dir '%s', old watches will not be restored: %m", oldname); + log_error("unable to open old watches dir '%s', old watches will not be restored: %m", oldname); return; } @@ -87,7 +87,7 @@ void udev_watch_restore(struct udev *udev) if (dev == NULL) goto unlink; - info(udev, "restoring old watch on '%s'\n", udev_device_get_devnode(dev)); + log_debug("restoring old watch on '%s'\n", udev_device_get_devnode(dev)); udev_watch_begin(udev, dev); udev_device_unref(dev); unlink: @@ -98,7 +98,7 @@ unlink: rmdir(oldname); } else if (errno != ENOENT) { - err(udev, "unable to move watches dir '%s', old watches will not be restored: %m", filename); + log_error("unable to move watches dir '%s', old watches will not be restored: %m", filename); } } @@ -110,10 +110,10 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev) if (inotify_fd < 0) return; - info(udev, "adding watch on '%s'\n", udev_device_get_devnode(dev)); + log_debug("adding watch on '%s'\n", udev_device_get_devnode(dev)); wd = inotify_add_watch(inotify_fd, udev_device_get_devnode(dev), IN_CLOSE_WRITE); if (wd < 0) { - err(udev, "inotify_add_watch(%d, %s, %o) failed: %m\n", + log_error("inotify_add_watch(%d, %s, %o) failed: %m\n", inotify_fd, udev_device_get_devnode(dev), IN_CLOSE_WRITE); return; } @@ -138,7 +138,7 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev) if (wd < 0) return; - info(udev, "removing watch on '%s'\n", udev_device_get_devnode(dev)); + log_debug("removing watch on '%s'\n", udev_device_get_devnode(dev)); inotify_rm_watch(inotify_fd, wd); snprintf(filename, sizeof(filename), "%s/watch/%d", udev_get_run_path(udev), wd);