From baa30fbc2c04b23209d0b8fb3c86cd15ef9ea81a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 8 Apr 2012 16:06:20 +0200 Subject: udev: switch to systemd logging functions --- src/udev/udev-watch.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/udev/udev-watch.c') diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 228d18fedf..968728eba9 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); -- cgit v1.2.3-54-g00ecf