X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmount.c;h=a0cea1e7d492ee1bf50a5a6f8eec2dd608f79051;hb=151b9b9662a90455262ce575a8a8ae74bf4ff336;hp=90da88382606593d2c38d51c4b42c42b10bc76f3;hpb=68db7a3bd9b2f8640c7297382b6d20eb995f7e1e;p=elogind.git diff --git a/src/core/mount.c b/src/core/mount.c index 90da88382..a0cea1e7d 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -181,7 +181,7 @@ static int mount_arm_timer(Mount *m) { return sd_event_source_set_enabled(m->timer_event_source, SD_EVENT_ONESHOT); } - return sd_event_add_monotonic(UNIT(m)->manager->event, now(CLOCK_MONOTONIC) + m->timeout_usec, 0, mount_dispatch_timer, m, &m->timer_event_source); + return sd_event_add_monotonic(UNIT(m)->manager->event, &m->timer_event_source, now(CLOCK_MONOTONIC) + m->timeout_usec, 0, mount_dispatch_timer, m); } static void mount_unwatch_control_pid(Mount *m) { @@ -854,8 +854,14 @@ static void mount_enter_signal(Mount *m, MountState state, MountResult f) { goto fail; mount_set_state(m, state); - } else if (state == MOUNT_REMOUNTING_SIGTERM || state == MOUNT_REMOUNTING_SIGKILL) + } else if (state == MOUNT_REMOUNTING_SIGTERM) + mount_enter_signal(m, MOUNT_REMOUNTING_SIGKILL, MOUNT_SUCCESS); + else if (state == MOUNT_REMOUNTING_SIGKILL) mount_enter_mounted(m, MOUNT_SUCCESS); + else if (state == MOUNT_MOUNTING_SIGTERM) + mount_enter_signal(m, MOUNT_MOUNTING_SIGKILL, MOUNT_SUCCESS); + else if (state == MOUNT_UNMOUNTING_SIGTERM) + mount_enter_signal(m, MOUNT_UNMOUNTING_SIGKILL, MOUNT_SUCCESS); else mount_enter_dead(m, MOUNT_SUCCESS); @@ -1606,7 +1612,7 @@ static int mount_enumerate(Manager *m) { if (!m->proc_self_mountinfo) return -errno; - r = sd_event_add_io(m->event, fileno(m->proc_self_mountinfo), EPOLLPRI, mount_dispatch_io, m, &m->mount_event_source); + r = sd_event_add_io(m->event, &m->mount_event_source, fileno(m->proc_self_mountinfo), EPOLLPRI, mount_dispatch_io, m); if (r < 0) goto fail;