summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-12-07 14:28:00 +0100
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:49:38 +0200
commit1deb7a21b25e66a8be31b9803499594d72bead4e (patch)
tree9deada72320ea9ff9f86a7261a6f2c610ba066c4 /src/basic
parenta9b05724359af3b6b2a374e33980bcda9d917894 (diff)
tree-wide: use SPECIAL_ROOT_SLICE
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/unit-name.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c
index 106d39990..90d17a0d8 100644
--- a/src/basic/unit-name.c
+++ b/src/basic/unit-name.c
@@ -28,6 +28,7 @@
//#include "glob-util.h"
#include "hexdecoct.h"
#include "path-util.h"
+//#include "special.h"
#include "string-util.h"
#include "strv.h"
#include "unit-name.h"
@@ -678,7 +679,7 @@ int slice_build_parent_slice(const char *slice, char **ret) {
if (!slice_name_is_valid(slice))
return -EINVAL;
- if (streq(slice, "-.slice")) {
+ if (streq(slice, SPECIAL_ROOT_SLICE)) {
*ret = NULL;
return 0;
}
@@ -691,7 +692,7 @@ int slice_build_parent_slice(const char *slice, char **ret) {
if (dash)
strcpy(dash, ".slice");
else {
- r = free_and_strdup(&s, "-.slice");
+ r = free_and_strdup(&s, SPECIAL_ROOT_SLICE);
if (r < 0) {
free(s);
return r;
@@ -716,7 +717,7 @@ int slice_build_subslice(const char *slice, const char*name, char **ret) {
if (!unit_prefix_is_valid(name))
return -EINVAL;
- if (streq(slice, "-.slice"))
+ if (streq(slice, SPECIAL_ROOT_SLICE))
subslice = strappend(name, ".slice");
else {
char *e;
@@ -741,7 +742,7 @@ bool slice_name_is_valid(const char *name) {
if (!unit_name_is_valid(name, UNIT_NAME_PLAIN))
return false;
- if (streq(name, "-.slice"))
+ if (streq(name, SPECIAL_ROOT_SLICE))
return true;
e = endswith(name, ".slice");