From a8ffe6fbcbfdba39aef8dce8b298b3e0cb377c0e Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 14 Mar 2015 21:46:59 -0400 Subject: sysv-generator: initialize LookupPaths just once With debugging on, sysv-generator would print the full set of lookup paths for *every* sysv script. While at it, pass LookupPaths as a pointer in sysv-generator, and constify it everywhere. --- src/shared/install.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/shared/install.h') diff --git a/src/shared/install.h b/src/shared/install.h index 357be0f92d..3ca39397e6 100644 --- a/src/shared/install.h +++ b/src/shared/install.h @@ -23,6 +23,7 @@ #include "hashmap.h" #include "unit-name.h" +#include "path-lookup.h" typedef enum UnitFileScope { UNIT_FILE_SYSTEM, @@ -98,7 +99,15 @@ int unit_file_set_default(UnitFileScope scope, const char *root_dir, const char int unit_file_get_default(UnitFileScope scope, const char *root_dir, char **name); int unit_file_add_dependency(UnitFileScope scope, bool runtime, const char *root_dir, char **files, char *target, UnitDependency dep, bool force, UnitFileChange **changes, unsigned *n_changes); -UnitFileState unit_file_get_state(UnitFileScope scope, const char *root_dir, const char *filename); +UnitFileState unit_file_lookup_state( + UnitFileScope scope, + const char *root_dir, + const LookupPaths *paths, + const char *name); +UnitFileState unit_file_get_state( + UnitFileScope scope, + const char *root_dir, + const char *filename); int unit_file_get_list(UnitFileScope scope, const char *root_dir, Hashmap *h); -- cgit v1.2.3-54-g00ecf