summaryrefslogtreecommitdiff
path: root/unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-13 20:59:01 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-13 20:59:01 +0200
commit10a94420172b33a7472a16b2e829689dbc570cad (patch)
tree5499d906a3d812ab936d16faceaf1741bd6d0c2f /unit.h
parentc27488016e0e90569260bc513fa95acbad512ff5 (diff)
systemctl: show sub state along active state
Diffstat (limited to 'unit.h')
-rw-r--r--unit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/unit.h b/unit.h
index ae6e4458ad..052cee01ea 100644
--- a/unit.h
+++ b/unit.h
@@ -236,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);
@@ -320,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);