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.]
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
f04e95ba6b
commit
2826d14091
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user