diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-13 20:59:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-13 20:59:01 +0200 |
commit | 10a94420172b33a7472a16b2e829689dbc570cad (patch) | |
tree | 5499d906a3d812ab936d16faceaf1741bd6d0c2f /service.c | |
parent | c27488016e0e90569260bc513fa95acbad512ff5 (diff) |
systemctl: show sub state along active state
Diffstat (limited to 'service.c')
-rw-r--r-- | service.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1638,6 +1638,12 @@ static UnitActiveState service_active_state(Unit *u) { return state_translation_table[SERVICE(u)->state]; } +static const char *service_sub_state_to_string(Unit *u) { + assert(u); + + return service_state_to_string(SERVICE(u)->state); +} + static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { Service *s = SERVICE(u); bool success; @@ -2065,6 +2071,7 @@ const UnitVTable service_vtable = { .can_reload = service_can_reload, .active_state = service_active_state, + .sub_state_to_string = service_sub_state_to_string, .sigchld_event = service_sigchld_event, .timer_event = service_timer_event, |