summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-30 16:21:41 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-01 19:40:51 -0400
commit8a993b61d1cd46a9c48d36fb67818883d80d9bc2 (patch)
tree260bc01a843aab21fcbbddaff5bd18a15b4636af /src/shared
parentf4bf8d2f45b02c26234219d07bfd3a41290cc84e (diff)
Move no_alias 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.c10
-rw-r--r--src/shared/install.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 931d3e2907..b92afbc971 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -68,6 +68,16 @@ typedef struct {
static int unit_file_lookup_state(UnitFileScope scope, const LookupPaths *paths, const char *name, UnitFileState *ret);
+bool unit_type_may_alias(UnitType type) {
+ return IN_SET(type,
+ UNIT_SERVICE,
+ UNIT_SOCKET,
+ UNIT_TARGET,
+ UNIT_DEVICE,
+ 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 4ffc5a21f2..8a8bd09c7c 100644
--- a/src/shared/install.h
+++ b/src/shared/install.h
@@ -138,6 +138,8 @@ static inline bool UNIT_FILE_INSTALL_INFO_HAS_ALSO(UnitFileInstallInfo *i) {
return !strv_isempty(i->also);
}
+bool unit_type_may_alias(UnitType type) _const_;
+
int unit_file_enable(
UnitFileScope scope,
bool runtime,