summaryrefslogtreecommitdiff
path: root/socket.c
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 /socket.c
parentc27488016e0e90569260bc513fa95acbad512ff5 (diff)
systemctl: show sub state along active state
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 3b74b5e9f8..4fdd88027a 100644
--- a/socket.c
+++ b/socket.c
@@ -711,6 +711,12 @@ static UnitActiveState socket_active_state(Unit *u) {
return state_translation_table[SOCKET(u)->state];
}
+static const char *socket_sub_state_to_string(Unit *u) {
+ assert(u);
+
+ return state_string_table[SOCKET(u)->state];
+}
+
static void socket_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
Socket *s = SOCKET(u);
@@ -894,6 +900,7 @@ const UnitVTable socket_vtable = {
.stop = socket_stop,
.active_state = socket_active_state,
+ .sub_state_to_string = socket_sub_state_to_string,
.fd_event = socket_fd_event,
.sigchld_event = socket_sigchld_event,