summaryrefslogtreecommitdiff
path: root/src/shared/unit-name.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/unit-name.h')
-rw-r--r--src/shared/unit-name.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/shared/unit-name.h b/src/shared/unit-name.h
index 362ff0c00c..d06d2b2353 100644
--- a/src/shared/unit-name.h
+++ b/src/shared/unit-name.h
@@ -69,7 +69,12 @@ int unit_name_to_instance(const char *n, char **instance);
char* unit_name_to_prefix(const char *n);
char* unit_name_to_prefix_and_instance(const char *n);
-bool unit_name_is_valid(const char *n, bool template_ok) _pure_;
+enum template_valid {
+ TEMPLATE_INVALID,
+ TEMPLATE_VALID,
+};
+
+bool unit_name_is_valid(const char *n, enum template_valid template_ok) _pure_;
bool unit_prefix_is_valid(const char *p) _pure_;
bool unit_instance_is_valid(const char *i) _pure_;
@@ -98,7 +103,12 @@ char *unit_name_to_path(const char *name);
char *unit_dbus_path_from_name(const char *name);
int unit_name_from_dbus_path(const char *path, char **name);
-char *unit_name_mangle(const char *name, bool allow_globs);
-char *unit_name_mangle_with_suffix(const char *name, bool allow_globs, const char *suffix);
+enum unit_name_mangle {
+ MANGLE_NOGLOB,
+ MANGLE_GLOB,
+};
+
+char *unit_name_mangle(const char *name, enum unit_name_mangle allow_globs);
+char *unit_name_mangle_with_suffix(const char *name, enum unit_name_mangle allow_globs, const char *suffix);
int build_subslice(const char *slice, const char*name, char **subslice);