summaryrefslogtreecommitdiff
path: root/device.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 /device.c
parentc27488016e0e90569260bc513fa95acbad512ff5 (diff)
systemctl: show sub state along active state
Diffstat (limited to 'device.c')
-rw-r--r--device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/device.c b/device.c
index 0a7c967fab..b00a0f987f 100644
--- a/device.c
+++ b/device.c
@@ -99,6 +99,12 @@ static UnitActiveState device_active_state(Unit *u) {
return state_translation_table[DEVICE(u)->state];
}
+static const char *device_sub_state_to_string(Unit *u) {
+ assert(u);
+
+ return state_string_table[DEVICE(u)->state];
+}
+
static int device_add_escaped_name(Unit *u, const char *dn, bool make_id) {
char *e;
int r;
@@ -478,6 +484,7 @@ const UnitVTable device_vtable = {
.dump = device_dump,
.active_state = device_active_state,
+ .sub_state_to_string = device_sub_state_to_string,
.enumerate = device_enumerate,
.shutdown = device_shutdown