Revert "log_error() if inotify_add_watch() fails"

This reverts commit 2826d14091.

We never should generate log messages from a library.
This commit is contained in:
Lennart Poettering
2013-02-13 16:25:33 +01:00
parent 2826d14091
commit 092c4c437f
5 changed files with 1 additions and 8 deletions
-3
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
-1
View File
@@ -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;
}
-1
View File
@@ -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;
}
}
@@ -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;
}