summaryrefslogtreecommitdiff
path: root/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-29 06:04:08 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-29 06:04:08 +0100
commitef734fd6c2ec4e5602bbfe2a0d26dcf39c14d2bf (patch)
tree4fb6422913f35cd3fb925aaaae0b56c78c30e075 /manager.c
parent38a4d4f089df02ff79b5f560f2b11631e0a6a4f9 (diff)
watch mount status file
Diffstat (limited to 'manager.c')
-rw-r--r--manager.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/manager.c b/manager.c
index 06a171ff2e..ac1c79c5f6 100644
--- a/manager.c
+++ b/manager.c
@@ -36,7 +36,7 @@ static int manager_setup_signals(Manager *m) {
assert_se(sigaddset(&mask, SIGPIPE) == 0);
assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
- m->signal_watch.type = WATCH_SIGNAL_FD;
+ m->signal_watch.type = WATCH_SIGNAL;
if ((m->signal_watch.fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC)) < 0)
return -errno;
@@ -56,7 +56,7 @@ Manager* manager_new(void) {
if (!(m = new0(Manager, 1)))
return NULL;
- m->signal_watch.fd = m->epoll_fd = -1;
+ m->signal_watch.fd = m->mount_watch.fd = m->epoll_fd = -1;
if (!(m->units = hashmap_new(string_hash_func, string_compare_func)))
goto fail;
@@ -1123,7 +1123,7 @@ static int process_event(Manager *m, struct epoll_event *ev, bool *quit) {
switch (w->type) {
- case WATCH_SIGNAL_FD:
+ case WATCH_SIGNAL:
/* An incoming signal? */
if (ev->events != POLLIN)
@@ -1157,6 +1157,11 @@ static int process_event(Manager *m, struct epoll_event *ev, bool *quit) {
break;
}
+ case WATCH_MOUNT:
+ /* Some mount table change, intended for the mount subsystem */
+ mount_fd_event(m, ev->events);
+ break;
+
default:
assert_not_reached("Unknown epoll event type.");
}