diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-18 04:58:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-19 04:08:07 +0200 |
commit | 5632e3743db350a67478acc107d76cdf648a1f99 (patch) | |
tree | e7efad268223470ca3053db650a2c7b3ad9c90c4 /src/automount.c | |
parent | b9975629f03a43d4c6b14fdb42eb8dd5a30af28f (diff) |
systemctl: introduce reset-maintenance command
Diffstat (limited to 'src/automount.c')
-rw-r--r-- | src/automount.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/automount.c b/src/automount.c index e685c96a76..213b178eae 100644 --- a/src/automount.c +++ b/src/automount.c @@ -791,6 +791,17 @@ static void automount_shutdown(Manager *m) { close_nointr_nofail(m->dev_autofs_fd); } +static void automount_reset_maintenance(Unit *u) { + Automount *a = AUTOMOUNT(u); + + assert(a); + + if (a->state == AUTOMOUNT_MAINTENANCE) + automount_set_state(a, AUTOMOUNT_DEAD); + + a->failure = false; +} + static const char* const automount_state_table[_AUTOMOUNT_STATE_MAX] = { [AUTOMOUNT_DEAD] = "dead", [AUTOMOUNT_WAITING] = "waiting", @@ -827,6 +838,8 @@ const UnitVTable automount_vtable = { .fd_event = automount_fd_event, + .reset_maintenance = automount_reset_maintenance, + .bus_message_handler = bus_automount_message_handler, .shutdown = automount_shutdown |