diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-04 15:46:16 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-19 16:51:14 +0200 |
commit | 5cfa33e0bc36ffe962501f67259044a636e15707 (patch) | |
tree | c799790d2bdaf766742bcbcc5f3e281e676d295b /src/shared/unit-file.c | |
parent | shared/dropin: rename function for clarity (diff) | |
download | systemd-5cfa33e0bc36ffe962501f67259044a636e15707.tar.xz systemd-5cfa33e0bc36ffe962501f67259044a636e15707.zip |
Create src/shared/unit-file.[ch] for unit-file related ops
So far we put such functinos in install.[ch], but that is tied too closely
to enable/disable. Let's start moving things to a place with a better name.
Diffstat (limited to 'src/shared/unit-file.c')
-rw-r--r-- | src/shared/unit-file.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/shared/unit-file.c b/src/shared/unit-file.c new file mode 100644 index 0000000000..deed7dcf09 --- /dev/null +++ b/src/shared/unit-file.c @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ + +#include "macro.h" +#include "unit-file.h" + +bool unit_type_may_alias(UnitType type) { + return IN_SET(type, + UNIT_SERVICE, + UNIT_SOCKET, + UNIT_TARGET, + UNIT_DEVICE, + UNIT_TIMER, + UNIT_PATH); +} + +bool unit_type_may_template(UnitType type) { + return IN_SET(type, + UNIT_SERVICE, + UNIT_SOCKET, + UNIT_TARGET, + UNIT_TIMER, + UNIT_PATH); +} |