chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
swap: don't add too many deps for swap files form /proc/swap
[elogind.git]
/
src
/
core
/
path.c
diff --git
a/src/core/path.c
b/src/core/path.c
index 93c51bb3bec5b0363003c7624e077f252bfd9b4a..f54c77f6c3980804ececcf23a1286221adf37a7c 100644
(file)
--- a/
src/core/path.c
+++ b/
src/core/path.c
@@
-99,7
+99,8
@@
int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
break;
}
break;
}
- log_warning("Failed to add watch on %s: %m", s->path);
+ log_warning("Failed to add watch on %s: %s", s->path,
+ errno == ENOSPC ? "too many watches" : strerror(-r));
r = -errno;
if (cut)
*cut = tmp;
r = -errno;
if (cut)
*cut = tmp;
@@
-152,11
+153,7
@@
void path_spec_unwatch(PathSpec *s) {
assert(s);
s->event_source = sd_event_source_unref(s->event_source);
assert(s);
s->event_source = sd_event_source_unref(s->event_source);
-
- if (s->inotify_fd >= 0) {
- close_nointr_nofail(s->inotify_fd);
- s->inotify_fd = -1;
- }
+ s->inotify_fd = safe_close(s->inotify_fd);
}
int path_spec_fd_event(PathSpec *s, uint32_t revents) {
}
int path_spec_fd_event(PathSpec *s, uint32_t revents) {