summaryrefslogtreecommitdiff
path: root/src/shared/path-lookup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-07 17:51:26 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:32 +0200
commita69b4fb0f80689b96f492a557368ed880365edee (patch)
treeaab663d5a794fa3dde1594d4b7ed34dda5146421 /src/shared/path-lookup.c
parentc61b443d32ceea2d0a8c46c1d61a9314f1affa89 (diff)
path-lookup: move generator_binary_paths() to end of file
Let's keep the code that manipulates LookupPaths together, and move generator_binary_paths() to the end of the .h and .c files, since it is not strictly related to that.
Diffstat (limited to 'src/shared/path-lookup.c')
-rw-r--r--src/shared/path-lookup.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
index 68b432216e..1c8e22eee7 100644
--- a/src/shared/path-lookup.c
+++ b/src/shared/path-lookup.c
@@ -223,30 +223,6 @@ static char** user_dirs(
return tmp;
}
-char **generator_binary_paths(UnitFileScope scope) {
-
- switch (scope) {
-
- case UNIT_FILE_SYSTEM:
- return strv_new("/run/systemd/system-generators",
- "/etc/systemd/system-generators",
- "/usr/local/lib/systemd/system-generators",
- SYSTEM_GENERATOR_PATH,
- NULL);
-
- case UNIT_FILE_GLOBAL:
- case UNIT_FILE_USER:
- return strv_new("/run/systemd/user-generators",
- "/etc/systemd/user-generators",
- "/usr/local/lib/systemd/user-generators",
- USER_GENERATOR_PATH,
- NULL);
-
- default:
- assert_not_reached("Hmm, unexpected scope.");
- }
-}
-
static int acquire_generator_dirs(
UnitFileScope scope,
char **generator,
@@ -815,3 +791,27 @@ void lookup_paths_flush_generator(LookupPaths *p) {
if (p->generator_late)
(void) rm_rf(p->generator_late, REMOVE_ROOT);
}
+
+char **generator_binary_paths(UnitFileScope scope) {
+
+ switch (scope) {
+
+ case UNIT_FILE_SYSTEM:
+ return strv_new("/run/systemd/system-generators",
+ "/etc/systemd/system-generators",
+ "/usr/local/lib/systemd/system-generators",
+ SYSTEM_GENERATOR_PATH,
+ NULL);
+
+ case UNIT_FILE_GLOBAL:
+ case UNIT_FILE_USER:
+ return strv_new("/run/systemd/user-generators",
+ "/etc/systemd/user-generators",
+ "/usr/local/lib/systemd/user-generators",
+ USER_GENERATOR_PATH,
+ NULL);
+
+ default:
+ assert_not_reached("Hmm, unexpected scope.");
+ }
+}