X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=unit.h;h=052cee01eab93b37473704152a95f8b6150cd360;hb=10a94420172b33a7472a16b2e829689dbc570cad;hp=4b732c0f052f2406480c93161a26e5b9867e5ede;hpb=e537352b9bfffe6f6286483bff2c7601c78407e3;p=elogind.git diff --git a/unit.h b/unit.h index 4b732c0f0..052cee01e 100644 --- a/unit.h +++ b/unit.h @@ -47,6 +47,7 @@ typedef enum KillMode { KILL_CONTROL_GROUP = 0, KILL_PROCESS_GROUP, KILL_PROCESS, + KILL_NONE, _KILL_MODE_MAX, _KILL_MODE_INVALID = -1 } KillMode; @@ -235,6 +236,12 @@ struct UnitVTable { * a simpler one that the engine can understand */ UnitActiveState (*active_state)(Unit *u); + /* Returns the substate specific to this unit type as + * string. This is purely information so that we can give the + * user a more finegrained explanation in which actual state a + * unit is in. */ + const char* (*sub_state_to_string)(Unit *u); + void (*fd_event)(Unit *u, int fd, uint32_t events, Watch *w); void (*sigchld_event)(Unit *u, pid_t pid, int code, int status); void (*timer_event)(Unit *u, uint64_t n_elapsed, Watch *w); @@ -319,6 +326,8 @@ bool unit_has_name(Unit *u, const char *name); UnitActiveState unit_active_state(Unit *u); +const char* unit_sub_state_to_string(Unit *u); + void unit_dump(Unit *u, FILE *f, const char *prefix); bool unit_can_reload(Unit *u);