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/shared/ask-password-api.c | 1 + src/shared/util.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src/shared') diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 8a0fb89a84..10e6ae0614 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -78,6 +78,7 @@ int ask_password_tty( } if (inotify_add_watch(notify, flag_file, IN_ATTRIB /* for the link count */) < 0) { + log_error("Failed to add watch on %s: %m", flag_file); r = -errno; goto finish; } diff --git a/src/shared/util.c b/src/shared/util.c index d754c836f2..6ef191422c 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -2220,6 +2220,7 @@ int acquire_terminal( wd = inotify_add_watch(notify, name, IN_CLOSE); if (wd < 0) { r = -errno; + log_error("Failed to add watch on %s: %m", name); goto fail; } } -- cgit v1.2.3-54-g00ecf