diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/install.c | 16 | ||||
-rw-r--r-- | src/shared/path-lookup.c | 16 | ||||
-rw-r--r-- | src/shared/path-lookup.h | 4 |
3 files changed, 20 insertions, 16 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 3b065445b0..37191a7c71 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -58,22 +58,6 @@ static int in_search_path(const char *path, char **search) { return strv_contains(search, parent); } -static int lookup_paths_init_from_scope(LookupPaths *paths, - UnitFileScope scope, - const char *root_dir) { - assert(paths); - assert(scope >= 0); - assert(scope < _UNIT_FILE_SCOPE_MAX); - - zero(*paths); - - return lookup_paths_init(paths, - scope == UNIT_FILE_SYSTEM ? SYSTEMD_SYSTEM : SYSTEMD_USER, - scope == UNIT_FILE_USER, - root_dir, - NULL, NULL, NULL); -} - static int get_config_path(UnitFileScope scope, bool runtime, const char *root_dir, char **ret) { char *p = NULL; int r; diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 8f75a8e832..051f1a4835 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -398,3 +398,19 @@ void lookup_paths_free(LookupPaths *p) { p->sysvinit_path = p->sysvrcnd_path = NULL; #endif } + +int lookup_paths_init_from_scope(LookupPaths *paths, + UnitFileScope scope, + const char *root_dir) { + assert(paths); + assert(scope >= 0); + assert(scope < _UNIT_FILE_SCOPE_MAX); + + zero(*paths); + + return lookup_paths_init(paths, + scope == UNIT_FILE_SYSTEM ? SYSTEMD_SYSTEM : SYSTEMD_USER, + scope == UNIT_FILE_USER, + root_dir, + NULL, NULL, NULL); +} diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index b8a0aace83..655e4549ca 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -22,6 +22,7 @@ ***/ #include "macro.h" +#include "install.h" typedef struct LookupPaths { char **unit_path; @@ -49,5 +50,8 @@ int lookup_paths_init(LookupPaths *p, const char *generator_early, const char *generator_late); void lookup_paths_free(LookupPaths *p); +int lookup_paths_init_from_scope(LookupPaths *paths, + UnitFileScope scope, + const char *root_dir); #define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free) |