summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-24 21:47:54 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:30 +0200
commit32c0ed7bbb94037a50c267f25071522dc8eb3e68 (patch)
tree26bc047dd5708a50d312bfcb67a9a429914493cb /src/shared/install.c
parentf4dc1e65e39336453e842f79ecd5cf7e5af34458 (diff)
install: change in_search_path() to take a LookupPaths structure
Similar to the other calls that operate on the collected path data.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index e0846c9fbf..464b0d3a40 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -65,7 +65,7 @@ typedef struct {
OrderedHashmap *have_processed;
} InstallContext;
-static int in_search_path(const char *path, char **search) {
+static int in_search_path(const LookupPaths *p, const char *path) {
_cleanup_free_ char *parent = NULL;
char **i;
@@ -75,7 +75,7 @@ static int in_search_path(const char *path, char **search) {
if (!parent)
return -ENOMEM;
- STRV_FOREACH(i, search)
+ STRV_FOREACH(i, p->search_path)
if (path_equal(parent, *i))
return true;
@@ -1294,7 +1294,7 @@ static int install_info_symlink_link(
assert(config_path);
assert(i->path);
- r = in_search_path(i->path, paths->search_path);
+ r = in_search_path(paths, i->path);
if (r != 0)
return r;
@@ -1622,7 +1622,7 @@ int unit_file_link(
if (!S_ISREG(st.st_mode))
return -ENOTTY;
- q = in_search_path(*i, paths.search_path);
+ q = in_search_path(&paths, *i);
if (q < 0)
return q;
if (q > 0)