summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-18 04:58:01 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-19 04:08:07 +0200
commit5632e3743db350a67478acc107d76cdf648a1f99 (patch)
treee7efad268223470ca3053db650a2c7b3ad9c90c4 /src/mount.c
parentb9975629f03a43d4c6b14fdb42eb8dd5a30af28f (diff)
systemctl: introduce reset-maintenance command
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mount.c b/src/mount.c
index bee3c9a60e..c1a1d51141 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1538,6 +1538,17 @@ finish:
return r;
}
+static void mount_reset_maintenance(Unit *u) {
+ Mount *m = MOUNT(u);
+
+ assert(m);
+
+ if (m->state == MOUNT_MAINTENANCE)
+ mount_set_state(m, MOUNT_DEAD);
+
+ m->failure = false;
+}
+
static const char* const mount_state_table[_MOUNT_STATE_MAX] = {
[MOUNT_DEAD] = "dead",
[MOUNT_MOUNTING] = "mounting",
@@ -1595,6 +1606,8 @@ const UnitVTable mount_vtable = {
.sigchld_event = mount_sigchld_event,
.timer_event = mount_timer_event,
+ .reset_maintenance = mount_reset_maintenance,
+
.bus_message_handler = bus_mount_message_handler,
.enumerate = mount_enumerate,