summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/automount.c2
-rw-r--r--src/core/busname.c2
-rw-r--r--src/core/device.c2
-rw-r--r--src/core/mount.c2
-rw-r--r--src/core/scope.c1
-rw-r--r--src/core/slice.c1
-rw-r--r--src/core/swap.c2
-rw-r--r--src/core/unit.c2
-rw-r--r--src/core/unit.h3
9 files changed, 1 insertions, 16 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 7374d50ae8..1239a0efc6 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -1050,8 +1050,6 @@ const UnitVTable automount_vtable = {
"Automount\0"
"Install\0",
- .no_instances = true,
-
.init = automount_init,
.load = automount_load,
.done = automount_done,
diff --git a/src/core/busname.c b/src/core/busname.c
index 4d43bd21e6..e7b7b5c012 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -1028,8 +1028,6 @@ const UnitVTable busname_vtable = {
"Install\0",
.private_section = "BusName",
- .no_instances = true,
-
.init = busname_init,
.done = busname_done,
.load = busname_load,
diff --git a/src/core/device.c b/src/core/device.c
index d01bec53d8..16e56efcc3 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -841,8 +841,6 @@ const UnitVTable device_vtable = {
"Device\0"
"Install\0",
- .no_instances = true,
-
.init = device_init,
.done = device_done,
.load = unit_load_fragment_and_dropin_optional,
diff --git a/src/core/mount.c b/src/core/mount.c
index adc74c3bea..c8a898e4dc 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1839,8 +1839,6 @@ const UnitVTable mount_vtable = {
"Install\0",
.private_section = "Mount",
- .no_instances = true,
-
.init = mount_init,
.load = mount_load,
.done = mount_done,
diff --git a/src/core/scope.c b/src/core/scope.c
index 3915e5c88c..238f63a729 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -569,7 +569,6 @@ const UnitVTable scope_vtable = {
"Install\0",
.private_section = "Scope",
- .no_instances = true,
.can_transient = true,
.init = scope_init,
diff --git a/src/core/slice.c b/src/core/slice.c
index 96c7c74598..c7700b8857 100644
--- a/src/core/slice.c
+++ b/src/core/slice.c
@@ -309,7 +309,6 @@ const UnitVTable slice_vtable = {
"Install\0",
.private_section = "Slice",
- .no_instances = true,
.can_transient = true,
.init = slice_init,
diff --git a/src/core/swap.c b/src/core/swap.c
index f486a44cf5..c018648d87 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -1465,8 +1465,6 @@ const UnitVTable swap_vtable = {
"Install\0",
.private_section = "Swap",
- .no_instances = true,
-
.init = swap_init,
.load = swap_load,
.done = swap_done,
diff --git a/src/core/unit.c b/src/core/unit.c
index 0313ee2ad3..a2726f10a6 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -193,7 +193,7 @@ int unit_add_name(Unit *u, const char *text) {
if (r < 0)
return r;
- if (i && unit_vtable[t]->no_instances)
+ if (i && !unit_type_may_template(t))
return -EINVAL;
/* Ensure that this unit is either instanced or not instanced,
diff --git a/src/core/unit.h b/src/core/unit.h
index 6ac925a185..be62e88421 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -416,9 +416,6 @@ struct UnitVTable {
/* The strings to print in status messages */
UnitStatusMessageFormats status_message_formats;
- /* Instances make no sense for this type */
- bool no_instances:1;
-
/* True if transient units of this type are OK */
bool can_transient:1;
};