From 9183df707bde9e83d838e7b5a05db0c5f4b55e6d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Apr 2016 20:48:58 +0200 Subject: install: rename generator_paths() → generator_binary_paths() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is too confusing, as this funciton returns the paths to the generator binaries, while usually when we refer to the just the "generator path" we mean the generated unit files. Let's clean this up. --- src/core/manager.c | 2 +- src/shared/path-lookup.c | 2 +- src/shared/path-lookup.h | 2 +- src/test/test-path-lookup.c | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/core/manager.c b/src/core/manager.c index 6ce3e404c9..91fe9c2d5b 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2715,7 +2715,7 @@ static int manager_run_generators(Manager *m) { if (m->test_run) return 0; - paths = generator_paths(m->unit_file_scope); + paths = generator_binary_paths(m->unit_file_scope); if (!paths) return log_oom(); diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 685ae895d2..d3d4243ad4 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -221,7 +221,7 @@ static char** user_dirs( return tmp; } -char **generator_paths(UnitFileScope scope) { +char **generator_binary_paths(UnitFileScope scope) { switch (scope) { diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index d151347a1b..29f74cf211 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -45,7 +45,7 @@ struct LookupPaths { char *root_dir; }; -char **generator_paths(UnitFileScope scope); +char **generator_binary_paths(UnitFileScope scope); int lookup_paths_init(LookupPaths *p, UnitFileScope scope, const char *root_dir); diff --git a/src/test/test-path-lookup.c b/src/test/test-path-lookup.c index 6ef0535ecb..ba60482867 100644 --- a/src/test/test-path-lookup.c +++ b/src/test/test-path-lookup.c @@ -51,13 +51,13 @@ static void test_paths(UnitFileScope scope) { assert_se(rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL) >= 0); } -static void print_generator_paths(UnitFileScope scope) { +static void print_generator_binary_paths(UnitFileScope scope) { _cleanup_strv_free_ char **paths; char **dir; log_info("Generators dirs (%s):", scope == UNIT_FILE_SYSTEM ? "system" : "user"); - paths = generator_paths(scope); + paths = generator_binary_paths(scope); STRV_FOREACH(dir, paths) log_info(" %s", *dir); } @@ -71,8 +71,8 @@ int main(int argc, char **argv) { test_paths(UNIT_FILE_USER); test_paths(UNIT_FILE_GLOBAL); - print_generator_paths(UNIT_FILE_SYSTEM); - print_generator_paths(UNIT_FILE_USER); + print_generator_binary_paths(UNIT_FILE_SYSTEM); + print_generator_binary_paths(UNIT_FILE_USER); return EXIT_SUCCESS; } -- cgit v1.2.3-54-g00ecf