summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-02-13 16:25:33 +0100
committerLennart Poettering <lennart@poettering.net>2013-02-13 16:25:33 +0100
commit092c4c437f30bb030deae89cc81109a624898b36 (patch)
tree31e0b055aa9410d6128195b8684ed5a1f0b12e85
parent2826d14091e43ed3397d862dee79d09d0115c84e (diff)
Revert "log_error() if inotify_add_watch() fails"
This reverts commit 2826d14091e43ed3397d862dee79d09d0115c84e. We never should generate log messages from a library.
-rw-r--r--src/login/sd-login.c3
-rw-r--r--src/readahead/readahead-common.c2
-rw-r--r--src/shared/ask-password-api.c1
-rw-r--r--src/shared/util.c1
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c2
5 files changed, 1 insertions, 8 deletions
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index 865527f8dd..b81dddf86b 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -733,7 +733,6 @@ _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;
}
@@ -744,7 +743,6 @@ _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;
}
@@ -755,7 +753,6 @@ _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;
}
diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c
index 1599ac15a4..41aaff0a3d 100644
--- a/src/readahead/readahead-common.c
+++ b/src/readahead/readahead-common.c
@@ -227,7 +227,7 @@ int open_inotify(void) {
mkdir("/run/systemd/readahead", 0755);
if (inotify_add_watch(fd, "/run/systemd/readahead", IN_CREATE) < 0) {
- log_error("Failed to add watch on /run/systemd/readahead: %m");
+ log_error("Failed to watch /run/systemd/readahead: %m");
close_nointr_nofail(fd);
return -errno;
}
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index 10e6ae0614..8a0fb89a84 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -78,7 +78,6 @@ 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 6ef191422c..d754c836f2 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2220,7 +2220,6 @@ 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;
}
}
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 276ccf9780..99a626c6c5 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -81,7 +81,6 @@ static int ask_password_plymouth(
}
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;
}
@@ -578,7 +577,6 @@ static int watch_passwords(void) {
}
if (inotify_add_watch(notify, "/run/systemd/ask-password", IN_CLOSE_WRITE|IN_MOVED_TO) < 0) {
- log_error("Failed to add watch on /run/systemd/ask-password: %m");
r = -errno;
goto finish;
}