diff options
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 }; |