From 2826d14091e43ed3397d862dee79d09d0115c84e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 13 Feb 2013 15:09:36 +0100 Subject: log_error() if inotify_add_watch() fails [zj: Reworded message s/to watch/to add watch on/ to make it clear that it was the watch init action that failed, and not the "process of watching". I think this way it'll be clearer to people who don't know what inotify does.] --- src/login/sd-login.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/login') diff --git a/src/login/sd-login.c b/src/login/sd-login.c index b81dddf86b..865527f8dd 100644 --- a/src/login/sd-login.c +++ b/src/login/sd-login.c @@ -733,6 +733,7 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) { if (!category || streq(category, "seat")) { k = inotify_add_watch(fd, "/run/systemd/seats/", IN_MOVED_TO|IN_DELETE); if (k < 0) { + log_error("Failed to add watch on /run/systemd/seats/: %m"); close_nointr_nofail(fd); return -errno; } @@ -743,6 +744,7 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) { if (!category || streq(category, "session")) { k = inotify_add_watch(fd, "/run/systemd/sessions/", IN_MOVED_TO|IN_DELETE); if (k < 0) { + log_error("Failed to add watch on /run/systemd/sessions/: %m"); close_nointr_nofail(fd); return -errno; } @@ -753,6 +755,7 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) { if (!category || streq(category, "uid")) { k = inotify_add_watch(fd, "/run/systemd/users/", IN_MOVED_TO|IN_DELETE); if (k < 0) { + log_error("Failed to add watch on /run/systemd/users/: %m"); close_nointr_nofail(fd); return -errno; } -- cgit v1.2.3-54-g00ecf