summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-18 23:09:09 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-18 23:09:09 +0200
commit4e4343146ade25b1ccfc927e2807d854be863ec4 (patch)
treee33d93110852b91bdf43732a538283c651346894 /src/manager.c
parent5a33f657b52f30a77fac41feb8854b563d77382e (diff)
swap: listen for POLLPRI events on /proc/swaps if available
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index e4559ffcb8..fb2656eb3d 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -216,7 +216,7 @@ int manager_new(ManagerRunningAs running_as, Manager **_m) {
m->audit_fd = -1;
#endif
- m->signal_watch.fd = m->mount_watch.fd = m->udev_watch.fd = m->epoll_fd = m->dev_autofs_fd = -1;
+ m->signal_watch.fd = m->mount_watch.fd = m->udev_watch.fd = m->epoll_fd = m->dev_autofs_fd = m->swap_watch.fd = -1;
m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */
if (!(m->environment = strv_copy(environ)))
@@ -2171,6 +2171,11 @@ static int process_event(Manager *m, struct epoll_event *ev) {
mount_fd_event(m, ev->events);
break;
+ case WATCH_SWAP:
+ /* Some swap table change, intended for the swap subsystem */
+ swap_fd_event(m, ev->events);
+ break;
+
case WATCH_UDEV:
/* Some notification from udev, intended for the device subsystem */
device_fd_event(m, ev->events);