summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-30 18:34:13 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-01 19:58:59 -0400
commitce99c68a3362a2905743a0673a4c016f2b8ab1a6 (patch)
treef749e2267824028aba2eb2d59fa375dadba2b80e /src/shared
parenta77245890103cae2d3ad69d3e6506cea4f7f9065 (diff)
Move no_instances information to shared/
This way it can be used in install.c in subsequent commit.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/install.c9
-rw-r--r--src/shared/install.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 1635f50fdb..cc39aaf677 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -78,6 +78,15 @@ bool unit_type_may_alias(UnitType type) {
UNIT_PATH);
}
+bool unit_type_may_template(UnitType type) {
+ return IN_SET(type,
+ UNIT_SERVICE,
+ UNIT_SOCKET,
+ UNIT_TARGET,
+ UNIT_TIMER,
+ UNIT_PATH);
+}
+
static int in_search_path(const LookupPaths *p, const char *path) {
_cleanup_free_ char *parent = NULL;
char **i;
diff --git a/src/shared/install.h b/src/shared/install.h
index 8a8bd09c7c..5812447c5b 100644
--- a/src/shared/install.h
+++ b/src/shared/install.h
@@ -139,6 +139,7 @@ static inline bool UNIT_FILE_INSTALL_INFO_HAS_ALSO(UnitFileInstallInfo *i) {
}
bool unit_type_may_alias(UnitType type) _const_;
+bool unit_type_may_template(UnitType type) _const_;
int unit_file_enable(
UnitFileScope scope,