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;
}
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;
}
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;
}
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;
}
}
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;
}
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;
}
}
}
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;
}
}
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;
}