summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index dc626d8189..39ab291103 100644
--- a/src/device.c
+++ b/src/device.c
@@ -35,6 +35,15 @@ static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
[DEVICE_PLUGGED] = UNIT_ACTIVE
};
+static void device_init(Unit *u) {
+ Device *d = DEVICE(u);
+
+ assert(d);
+ assert(d->meta.load_state == UNIT_STUB);
+
+ d->meta.job_timeout = DEFAULT_TIMEOUT_USEC;
+}
+
static void device_done(Unit *u) {
Device *d = DEVICE(u);
@@ -456,6 +465,8 @@ const UnitVTable device_vtable = {
.no_snapshots = true,
.no_isolate = true,
+ .init = device_init,
+
.load = unit_load_fragment_and_dropin_optional,
.done = device_done,
.coldplug = device_coldplug,