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/path.c | |
parent | b9975629f03a43d4c6b14fdb42eb8dd5a30af28f (diff) |
systemctl: introduce reset-maintenance command
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/path.c b/src/path.c index a9fa3771ab..f4c20940d0 100644 --- a/src/path.c +++ b/src/path.c @@ -560,6 +560,17 @@ fail: log_error("Failed find path unit: %s", strerror(-r)); } +static void path_reset_maintenance(Unit *u) { + Path *p = PATH(u); + + assert(p); + + if (p->state == PATH_MAINTENANCE) + path_set_state(p, PATH_DEAD); + + p->failure = false; +} + static const char* const path_state_table[_PATH_STATE_MAX] = { [PATH_DEAD] = "dead", [PATH_WAITING] = "waiting", @@ -598,5 +609,7 @@ const UnitVTable path_vtable = { .fd_event = path_fd_event, + .reset_maintenance = path_reset_maintenance, + .bus_message_handler = bus_path_message_handler }; |