summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
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