chiark / gitweb /
journal: automaticall reset location when the set of matches changes
[elogind.git] / src / device.c
index ccf2935a91cac4d3d05076c676f3077258c81f8d..bffeca0d10c7a857bb4ae1212799ad8fbbacdc42 100644 (file)
@@ -29,6 +29,7 @@
 #include "log.h"
 #include "unit-name.h"
 #include "dbus-device.h"
+#include "def.h"
 
 static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
         [DEVICE_DEAD] = UNIT_INACTIVE,
@@ -69,6 +70,9 @@ static void device_init(Unit *u) {
          * happen for the other units since their operations time out
          * anyway. */
         d->meta.job_timeout = DEFAULT_TIMEOUT_USEC;
+
+        d->meta.ignore_on_isolate = true;
+        d->meta.ignore_on_snapshot = true;
 }
 
 static void device_done(Unit *u) {
@@ -579,10 +583,12 @@ DEFINE_STRING_TABLE_LOOKUP(device_state, DeviceState);
 
 const UnitVTable device_vtable = {
         .suffix = ".device",
+        .sections =
+                "Unit\0"
+                "Device\0"
+                "Install\0",
 
         .no_instances = true,
-        .no_snapshots = true,
-        .no_isolate = true,
 
         .init = device_init,