richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
8d419f
From a2632eca864670f7a88e1a81947a9e726282e531 Mon Sep 17 00:00:00 2001
8d419f
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
8d419f
Date: Wed, 2 Mar 2022 17:17:39 +0100
8d419f
Subject: [PATCH] shared/install: consistently use 'lp' as the name for the
8d419f
 LookupPaths instance
8d419f
8d419f
Most of the codebase does this. Here we were using 'p' or 'paths'
8d419f
instead. Those names are very generic and not good for a "global-like"
8d419f
object like the LookupPaths instance. And we also have 'path' variable,
8d419f
and it's confusing to have 'path' and 'paths' in the same function that
8d419f
are unrelated.
8d419f
8d419f
Also pass down LookupPaths* lower in the call stack, in preparation for
8d419f
future changes.
8d419f
8d419f
(cherry picked from commit c3e7fba07c19f232f5945c07e7cc730986615adf)
8d419f
8d419f
Related: #2082131
8d419f
---
8d419f
 src/shared/install.c | 427 +++++++++++++++++++++----------------------
8d419f
 1 file changed, 212 insertions(+), 215 deletions(-)
8d419f
8d419f
diff --git a/src/shared/install.c b/src/shared/install.c
8d419f
index 8f1af755fa..c6cbe96fdb 100644
8d419f
--- a/src/shared/install.c
8d419f
+++ b/src/shared/install.c
8d419f
@@ -98,7 +98,7 @@ static const char *const unit_file_type_table[_UNIT_FILE_TYPE_MAX] = {
8d419f
 
8d419f
 DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(unit_file_type, UnitFileType);
8d419f
 
8d419f
-static int in_search_path(const LookupPaths *p, const char *path) {
8d419f
+static int in_search_path(const LookupPaths *lp, const char *path) {
8d419f
         _cleanup_free_ char *parent = NULL;
8d419f
 
8d419f
         assert(path);
8d419f
@@ -107,19 +107,16 @@ static int in_search_path(const LookupPaths *p, const char *path) {
8d419f
         if (!parent)
8d419f
                 return -ENOMEM;
8d419f
 
8d419f
-        return path_strv_contains(p->search_path, parent);
8d419f
+        return path_strv_contains(lp->search_path, parent);
8d419f
 }
8d419f
 
8d419f
-static const char* skip_root(const LookupPaths *p, const char *path) {
8d419f
-        char *e;
8d419f
-
8d419f
-        assert(p);
8d419f
+static const char* skip_root(const char *root_dir, const char *path) {
8d419f
         assert(path);
8d419f
 
8d419f
-        if (!p->root_dir)
8d419f
+        if (!root_dir)
8d419f
                 return path;
8d419f
 
8d419f
-        e = path_startswith(path, p->root_dir);
8d419f
+        const char *e = path_startswith(path, root_dir);
8d419f
         if (!e)
8d419f
                 return NULL;
8d419f
 
8d419f
@@ -134,52 +131,52 @@ static const char* skip_root(const LookupPaths *p, const char *path) {
8d419f
         return e;
8d419f
 }
8d419f
 
8d419f
-static int path_is_generator(const LookupPaths *p, const char *path) {
8d419f
+static int path_is_generator(const LookupPaths *lp, const char *path) {
8d419f
         _cleanup_free_ char *parent = NULL;
8d419f
 
8d419f
-        assert(p);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
         parent = dirname_malloc(path);
8d419f
         if (!parent)
8d419f
                 return -ENOMEM;
8d419f
 
8d419f
-        return path_equal_ptr(parent, p->generator) ||
8d419f
-               path_equal_ptr(parent, p->generator_early) ||
8d419f
-               path_equal_ptr(parent, p->generator_late);
8d419f
+        return path_equal_ptr(parent, lp->generator) ||
8d419f
+               path_equal_ptr(parent, lp->generator_early) ||
8d419f
+               path_equal_ptr(parent, lp->generator_late);
8d419f
 }
8d419f
 
8d419f
-static int path_is_transient(const LookupPaths *p, const char *path) {
8d419f
+static int path_is_transient(const LookupPaths *lp, const char *path) {
8d419f
         _cleanup_free_ char *parent = NULL;
8d419f
 
8d419f
-        assert(p);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
         parent = dirname_malloc(path);
8d419f
         if (!parent)
8d419f
                 return -ENOMEM;
8d419f
 
8d419f
-        return path_equal_ptr(parent, p->transient);
8d419f
+        return path_equal_ptr(parent, lp->transient);
8d419f
 }
8d419f
 
8d419f
-static int path_is_control(const LookupPaths *p, const char *path) {
8d419f
+static int path_is_control(const LookupPaths *lp, const char *path) {
8d419f
         _cleanup_free_ char *parent = NULL;
8d419f
 
8d419f
-        assert(p);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
         parent = dirname_malloc(path);
8d419f
         if (!parent)
8d419f
                 return -ENOMEM;
8d419f
 
8d419f
-        return path_equal_ptr(parent, p->persistent_control) ||
8d419f
-               path_equal_ptr(parent, p->runtime_control);
8d419f
+        return path_equal_ptr(parent, lp->persistent_control) ||
8d419f
+               path_equal_ptr(parent, lp->runtime_control);
8d419f
 }
8d419f
 
8d419f
-static int path_is_config(const LookupPaths *p, const char *path, bool check_parent) {
8d419f
+static int path_is_config(const LookupPaths *lp, const char *path, bool check_parent) {
8d419f
         _cleanup_free_ char *parent = NULL;
8d419f
 
8d419f
-        assert(p);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
         /* Note that we do *not* have generic checks for /etc or /run in place, since with
8d419f
@@ -193,21 +190,21 @@ static int path_is_config(const LookupPaths *p, const char *path, bool check_par
8d419f
                 path = parent;
8d419f
         }
8d419f
 
8d419f
-        return path_equal_ptr(path, p->persistent_config) ||
8d419f
-               path_equal_ptr(path, p->runtime_config);
8d419f
+        return path_equal_ptr(path, lp->persistent_config) ||
8d419f
+               path_equal_ptr(path, lp->runtime_config);
8d419f
 }
8d419f
 
8d419f
-static int path_is_runtime(const LookupPaths *p, const char *path, bool check_parent) {
8d419f
+static int path_is_runtime(const LookupPaths *lp, const char *path, bool check_parent) {
8d419f
         _cleanup_free_ char *parent = NULL;
8d419f
         const char *rpath;
8d419f
 
8d419f
-        assert(p);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
         /* Everything in /run is considered runtime. On top of that we also add
8d419f
          * explicit checks for the various runtime directories, as safety net. */
8d419f
 
8d419f
-        rpath = skip_root(p, path);
8d419f
+        rpath = skip_root(lp->root_dir, path);
8d419f
         if (rpath && path_startswith(rpath, "/run"))
8d419f
                 return true;
8d419f
 
8d419f
@@ -219,21 +216,21 @@ static int path_is_runtime(const LookupPaths *p, const char *path, bool check_pa
8d419f
                 path = parent;
8d419f
         }
8d419f
 
8d419f
-        return path_equal_ptr(path, p->runtime_config) ||
8d419f
-               path_equal_ptr(path, p->generator) ||
8d419f
-               path_equal_ptr(path, p->generator_early) ||
8d419f
-               path_equal_ptr(path, p->generator_late) ||
8d419f
-               path_equal_ptr(path, p->transient) ||
8d419f
-               path_equal_ptr(path, p->runtime_control);
8d419f
+        return path_equal_ptr(path, lp->runtime_config) ||
8d419f
+               path_equal_ptr(path, lp->generator) ||
8d419f
+               path_equal_ptr(path, lp->generator_early) ||
8d419f
+               path_equal_ptr(path, lp->generator_late) ||
8d419f
+               path_equal_ptr(path, lp->transient) ||
8d419f
+               path_equal_ptr(path, lp->runtime_control);
8d419f
 }
8d419f
 
8d419f
-static int path_is_vendor_or_generator(const LookupPaths *p, const char *path) {
8d419f
+static int path_is_vendor_or_generator(const LookupPaths *lp, const char *path) {
8d419f
         const char *rpath;
8d419f
 
8d419f
-        assert(p);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
-        rpath = skip_root(p, path);
8d419f
+        rpath = skip_root(lp->root_dir, path);
8d419f
         if (!rpath)
8d419f
                 return 0;
8d419f
 
8d419f
@@ -245,19 +242,19 @@ static int path_is_vendor_or_generator(const LookupPaths *p, const char *path) {
8d419f
                 return true;
8d419f
 #endif
8d419f
 
8d419f
-        if (path_is_generator(p, rpath))
8d419f
+        if (path_is_generator(lp, rpath))
8d419f
                 return true;
8d419f
 
8d419f
         return path_equal(rpath, SYSTEM_DATA_UNIT_DIR);
8d419f
 }
8d419f
 
8d419f
-static const char* config_path_from_flags(const LookupPaths *paths, UnitFileFlags flags) {
8d419f
-        assert(paths);
8d419f
+static const char* config_path_from_flags(const LookupPaths *lp, UnitFileFlags flags) {
8d419f
+        assert(lp);
8d419f
 
8d419f
         if (FLAGS_SET(flags, UNIT_FILE_PORTABLE))
8d419f
-                return FLAGS_SET(flags, UNIT_FILE_RUNTIME) ? paths->runtime_attached : paths->persistent_attached;
8d419f
+                return FLAGS_SET(flags, UNIT_FILE_RUNTIME) ? lp->runtime_attached : lp->persistent_attached;
8d419f
         else
8d419f
-                return FLAGS_SET(flags, UNIT_FILE_RUNTIME) ? paths->runtime_config : paths->persistent_config;
8d419f
+                return FLAGS_SET(flags, UNIT_FILE_RUNTIME) ? lp->runtime_config : lp->persistent_config;
8d419f
 }
8d419f
 
8d419f
 int unit_file_changes_add(
8d419f
@@ -435,7 +432,7 @@ static bool chroot_symlinks_same(const char *root, const char *wd, const char *a
8d419f
 }
8d419f
 
8d419f
 static int create_symlink(
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *old_path,
8d419f
                 const char *new_path,
8d419f
                 bool force,
8d419f
@@ -449,7 +446,7 @@ static int create_symlink(
8d419f
         assert(old_path);
8d419f
         assert(new_path);
8d419f
 
8d419f
-        rp = skip_root(paths, old_path);
8d419f
+        rp = skip_root(lp->root_dir, old_path);
8d419f
         if (rp)
8d419f
                 old_path = rp;
8d419f
 
8d419f
@@ -487,7 +484,7 @@ static int create_symlink(
8d419f
         if (!dirname)
8d419f
                 return -ENOMEM;
8d419f
 
8d419f
-        if (chroot_symlinks_same(paths->root_dir, dirname, dest, old_path)) {
8d419f
+        if (chroot_symlinks_same(lp->root_dir, dirname, dest, old_path)) {
8d419f
                 log_debug("Symlink %s → %s already exists", new_path, dest);
8d419f
                 return 1;
8d419f
         }
8d419f
@@ -642,7 +639,7 @@ static int remove_marked_symlinks_fd(
8d419f
                         /* Now, remember the full path (but with the root prefix removed) of
8d419f
                          * the symlink we just removed, and remove any symlinks to it, too. */
8d419f
 
8d419f
-                        rp = skip_root(lp, p);
8d419f
+                        rp = skip_root(lp->root_dir, p);
8d419f
                         q = mark_symlink_for_removal(&remove_symlinks_to, rp ?: p);
8d419f
                         if (q < 0)
8d419f
                                 return q;
8d419f
@@ -861,7 +858,7 @@ static int find_symlinks(
8d419f
 
8d419f
 static int find_symlinks_in_scope(
8d419f
                 UnitFileScope scope,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const UnitFileInstallInfo *i,
8d419f
                 bool match_name,
8d419f
                 UnitFileState *state) {
8d419f
@@ -872,23 +869,23 @@ static int find_symlinks_in_scope(
8d419f
         char **p;
8d419f
         int r;
8d419f
 
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(i);
8d419f
 
8d419f
-        /* As we iterate over the list of search paths in paths->search_path, we may encounter "same name"
8d419f
+        /* As we iterate over the list of search paths in lp->search_path, we may encounter "same name"
8d419f
          * symlinks. The ones which are "below" (i.e. have lower priority) than the unit file itself are
8d419f
          * effectively masked, so we should ignore them. */
8d419f
 
8d419f
-        STRV_FOREACH(p, paths->search_path)  {
8d419f
+        STRV_FOREACH(p, lp->search_path)  {
8d419f
                 bool same_name_link = false;
8d419f
 
8d419f
-                r = find_symlinks(paths->root_dir, i, match_name, ignore_same_name, *p, &same_name_link);
8d419f
+                r = find_symlinks(lp->root_dir, i, match_name, ignore_same_name, *p, &same_name_link);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
                 if (r > 0) {
8d419f
                         /* We found symlinks in this dir? Yay! Let's see where precisely it is enabled. */
8d419f
 
8d419f
-                        if (path_equal_ptr(*p, paths->persistent_config)) {
8d419f
+                        if (path_equal_ptr(*p, lp->persistent_config)) {
8d419f
                                 /* This is the best outcome, let's return it immediately. */
8d419f
                                 *state = UNIT_FILE_ENABLED;
8d419f
                                 return 1;
8d419f
@@ -900,7 +897,7 @@ static int find_symlinks_in_scope(
8d419f
                                 return 1;
8d419f
                         }
8d419f
 
8d419f
-                        r = path_is_runtime(paths, *p, false);
8d419f
+                        r = path_is_runtime(lp, *p, false);
8d419f
                         if (r < 0)
8d419f
                                 return r;
8d419f
                         if (r > 0)
8d419f
@@ -909,10 +906,10 @@ static int find_symlinks_in_scope(
8d419f
                                 enabled_at_all = true;
8d419f
 
8d419f
                 } else if (same_name_link) {
8d419f
-                        if (path_equal_ptr(*p, paths->persistent_config))
8d419f
+                        if (path_equal_ptr(*p, lp->persistent_config))
8d419f
                                 same_name_link_config = true;
8d419f
                         else {
8d419f
-                                r = path_is_runtime(paths, *p, false);
8d419f
+                                r = path_is_runtime(lp, *p, false);
8d419f
                                 if (r < 0)
8d419f
                                         return r;
8d419f
                                 if (r > 0)
8d419f
@@ -990,11 +987,11 @@ static UnitFileInstallInfo *install_info_find(InstallContext *c, const char *nam
8d419f
 
8d419f
 static int install_info_may_process(
8d419f
                 const UnitFileInstallInfo *i,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
         assert(i);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
 
8d419f
         /* Checks whether the loaded unit file is one we should process, or is masked,
8d419f
          * transient or generated and thus not subject to enable/disable operations. */
8d419f
@@ -1003,8 +1000,8 @@ static int install_info_may_process(
8d419f
                 unit_file_changes_add(changes, n_changes, -ERFKILL, i->path, NULL);
8d419f
                 return -ERFKILL;
8d419f
         }
8d419f
-        if (path_is_generator(paths, i->path) ||
8d419f
-            path_is_transient(paths, i->path)) {
8d419f
+        if (path_is_generator(lp, i->path) ||
8d419f
+            path_is_transient(lp, i->path)) {
8d419f
                 unit_file_changes_add(changes, n_changes, -EADDRNOTAVAIL, i->path, NULL);
8d419f
                 return -EADDRNOTAVAIL;
8d419f
         }
8d419f
@@ -1339,20 +1336,20 @@ static int unit_file_load_or_readlink(
8d419f
                 InstallContext *c,
8d419f
                 UnitFileInstallInfo *info,
8d419f
                 const char *path,
8d419f
-                const char *root_dir,
8d419f
+                const LookupPaths *lp,
8d419f
                 SearchFlags flags) {
8d419f
 
8d419f
         _cleanup_free_ char *resolved = NULL;
8d419f
         int r;
8d419f
 
8d419f
-        r = unit_file_load(c, info, path, root_dir, flags);
8d419f
+        r = unit_file_load(c, info, path, lp->root_dir, flags);
8d419f
         if (r != -ELOOP || (flags & SEARCH_DROPIN))
8d419f
                 return r;
8d419f
 
8d419f
-        r = chase_symlinks(path, root_dir, CHASE_WARN | CHASE_NONEXISTENT, &resolved, NULL);
8d419f
+        r = chase_symlinks(path, lp->root_dir, CHASE_WARN | CHASE_NONEXISTENT, &resolved, NULL);
8d419f
         if (r >= 0 &&
8d419f
-            root_dir &&
8d419f
-            path_equal_ptr(path_startswith(resolved, root_dir), "dev/null"))
8d419f
+            lp->root_dir &&
8d419f
+            path_equal_ptr(path_startswith(resolved, lp->root_dir), "dev/null"))
8d419f
                 /* When looking under root_dir, we can't expect /dev/ to be mounted,
8d419f
                  * so let's see if the path is a (possibly dangling) symlink to /dev/null. */
8d419f
                 info->type = UNIT_FILE_TYPE_MASKED;
8d419f
@@ -1402,7 +1399,7 @@ static int unit_file_load_or_readlink(
8d419f
 
8d419f
                 if (path_is_absolute(target))
8d419f
                         /* This is an absolute path, prefix the root so that we always deal with fully qualified paths */
8d419f
-                        info->symlink_target = path_join(root_dir, target);
8d419f
+                        info->symlink_target = path_join(lp->root_dir, target);
8d419f
                 else
8d419f
                         /* This is a relative path, take it relative to the dir the symlink is located in. */
8d419f
                         info->symlink_target = file_in_same_dir(path, target);
8d419f
@@ -1418,7 +1415,7 @@ static int unit_file_load_or_readlink(
8d419f
 static int unit_file_search(
8d419f
                 InstallContext *c,
8d419f
                 UnitFileInstallInfo *info,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 SearchFlags flags) {
8d419f
 
8d419f
         const char *dropin_dir_name = NULL, *dropin_template_dir_name = NULL;
8d419f
@@ -1429,14 +1426,14 @@ static int unit_file_search(
8d419f
         char **p;
8d419f
 
8d419f
         assert(info);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
 
8d419f
         /* Was this unit already loaded? */
8d419f
         if (info->type != _UNIT_FILE_TYPE_INVALID)
8d419f
                 return 0;
8d419f
 
8d419f
         if (info->path)
8d419f
-                return unit_file_load_or_readlink(c, info, info->path, paths->root_dir, flags);
8d419f
+                return unit_file_load_or_readlink(c, info, info->path, lp, flags);
8d419f
 
8d419f
         assert(info->name);
8d419f
 
8d419f
@@ -1446,14 +1443,14 @@ static int unit_file_search(
8d419f
                         return r;
8d419f
         }
8d419f
 
8d419f
-        STRV_FOREACH(p, paths->search_path) {
8d419f
+        STRV_FOREACH(p, lp->search_path) {
8d419f
                 _cleanup_free_ char *path = NULL;
8d419f
 
8d419f
                 path = path_join(*p, info->name);
8d419f
                 if (!path)
8d419f
                         return -ENOMEM;
8d419f
 
8d419f
-                r = unit_file_load_or_readlink(c, info, path, paths->root_dir, flags);
8d419f
+                r = unit_file_load_or_readlink(c, info, path, lp, flags);
8d419f
                 if (r >= 0) {
8d419f
                         info->path = TAKE_PTR(path);
8d419f
                         result = r;
8d419f
@@ -1469,14 +1466,14 @@ static int unit_file_search(
8d419f
                  * enablement was requested.  We will check if it is
8d419f
                  * possible to load template unit file. */
8d419f
 
8d419f
-                STRV_FOREACH(p, paths->search_path) {
8d419f
+                STRV_FOREACH(p, lp->search_path) {
8d419f
                         _cleanup_free_ char *path = NULL;
8d419f
 
8d419f
                         path = path_join(*p, template);
8d419f
                         if (!path)
8d419f
                                 return -ENOMEM;
8d419f
 
8d419f
-                        r = unit_file_load_or_readlink(c, info, path, paths->root_dir, flags);
8d419f
+                        r = unit_file_load_or_readlink(c, info, path, lp, flags);
8d419f
                         if (r >= 0) {
8d419f
                                 info->path = TAKE_PTR(path);
8d419f
                                 result = r;
8d419f
@@ -1498,7 +1495,7 @@ static int unit_file_search(
8d419f
         /* Search for drop-in directories */
8d419f
 
8d419f
         dropin_dir_name = strjoina(info->name, ".d");
8d419f
-        STRV_FOREACH(p, paths->search_path) {
8d419f
+        STRV_FOREACH(p, lp->search_path) {
8d419f
                 char *path;
8d419f
 
8d419f
                 path = path_join(*p, dropin_dir_name);
8d419f
@@ -1512,7 +1509,7 @@ static int unit_file_search(
8d419f
 
8d419f
         if (template) {
8d419f
                 dropin_template_dir_name = strjoina(template, ".d");
8d419f
-                STRV_FOREACH(p, paths->search_path) {
8d419f
+                STRV_FOREACH(p, lp->search_path) {
8d419f
                         char *path;
8d419f
 
8d419f
                         path = path_join(*p, dropin_template_dir_name);
8d419f
@@ -1532,7 +1529,7 @@ static int unit_file_search(
8d419f
                 return log_debug_errno(r, "Failed to get list of conf files: %m");
8d419f
 
8d419f
         STRV_FOREACH(p, files) {
8d419f
-                r = unit_file_load_or_readlink(c, info, *p, paths->root_dir, flags | SEARCH_DROPIN);
8d419f
+                r = unit_file_load_or_readlink(c, info, *p, lp, flags | SEARCH_DROPIN);
8d419f
                 if (r < 0)
8d419f
                         return log_debug_errno(r, "Failed to load conf file %s: %m", *p);
8d419f
         }
8d419f
@@ -1543,7 +1540,7 @@ static int unit_file_search(
8d419f
 static int install_info_follow(
8d419f
                 InstallContext *c,
8d419f
                 UnitFileInstallInfo *i,
8d419f
-                const char *root_dir,
8d419f
+                const LookupPaths *lp,
8d419f
                 SearchFlags flags,
8d419f
                 bool ignore_different_name) {
8d419f
 
8d419f
@@ -1564,7 +1561,7 @@ static int install_info_follow(
8d419f
         free_and_replace(i->path, i->symlink_target);
8d419f
         i->type = _UNIT_FILE_TYPE_INVALID;
8d419f
 
8d419f
-        return unit_file_load_or_readlink(c, i, i->path, root_dir, flags);
8d419f
+        return unit_file_load_or_readlink(c, i, i->path, lp, flags);
8d419f
 }
8d419f
 
8d419f
 /**
8d419f
@@ -1574,7 +1571,7 @@ static int install_info_follow(
8d419f
 static int install_info_traverse(
8d419f
                 UnitFileScope scope,
8d419f
                 InstallContext *c,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 UnitFileInstallInfo *start,
8d419f
                 SearchFlags flags,
8d419f
                 UnitFileInstallInfo **ret) {
8d419f
@@ -1583,11 +1580,11 @@ static int install_info_traverse(
8d419f
         unsigned k = 0;
8d419f
         int r;
8d419f
 
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(start);
8d419f
         assert(c);
8d419f
 
8d419f
-        r = unit_file_search(c, start, paths, flags);
8d419f
+        r = unit_file_search(c, start, lp, flags);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
@@ -1599,14 +1596,14 @@ static int install_info_traverse(
8d419f
                         return -ELOOP;
8d419f
 
8d419f
                 if (!(flags & SEARCH_FOLLOW_CONFIG_SYMLINKS)) {
8d419f
-                        r = path_is_config(paths, i->path, true);
8d419f
+                        r = path_is_config(lp, i->path, true);
8d419f
                         if (r < 0)
8d419f
                                 return r;
8d419f
                         if (r > 0)
8d419f
                                 return -ELOOP;
8d419f
                 }
8d419f
 
8d419f
-                r = install_info_follow(c, i, paths->root_dir, flags, false);
8d419f
+                r = install_info_follow(c, i, lp, flags, false);
8d419f
                 if (r == -EXDEV) {
8d419f
                         _cleanup_free_ char *buffer = NULL;
8d419f
                         const char *bn;
8d419f
@@ -1635,7 +1632,7 @@ static int install_info_traverse(
8d419f
                                         /* We filled in the instance, and the target stayed the same? If so, then let's
8d419f
                                          * honour the link as it is. */
8d419f
 
8d419f
-                                        r = install_info_follow(c, i, paths->root_dir, flags, true);
8d419f
+                                        r = install_info_follow(c, i, lp, flags, true);
8d419f
                                         if (r < 0)
8d419f
                                                 return r;
8d419f
 
8d419f
@@ -1645,12 +1642,12 @@ static int install_info_traverse(
8d419f
                                 bn = buffer;
8d419f
                         }
8d419f
 
8d419f
-                        r = install_info_add(c, bn, NULL, paths->root_dir, /* auxiliary= */ false, &i);
8d419f
+                        r = install_info_add(c, bn, NULL, lp->root_dir, /* auxiliary= */ false, &i);
8d419f
                         if (r < 0)
8d419f
                                 return r;
8d419f
 
8d419f
                         /* Try again, with the new target we found. */
8d419f
-                        r = unit_file_search(c, i, paths, flags);
8d419f
+                        r = unit_file_search(c, i, lp, flags);
8d419f
                         if (r == -ENOENT)
8d419f
                                 /* Translate error code to highlight this specific case */
8d419f
                                 return -ENOLINK;
8d419f
@@ -1672,7 +1669,7 @@ static int install_info_traverse(
8d419f
  */
8d419f
 static int install_info_add_auto(
8d419f
                 InstallContext *c,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *name_or_path,
8d419f
                 UnitFileInstallInfo **ret) {
8d419f
 
8d419f
@@ -1682,17 +1679,17 @@ static int install_info_add_auto(
8d419f
         if (path_is_absolute(name_or_path)) {
8d419f
                 const char *pp;
8d419f
 
8d419f
-                pp = prefix_roota(paths->root_dir, name_or_path);
8d419f
+                pp = prefix_roota(lp->root_dir, name_or_path);
8d419f
 
8d419f
-                return install_info_add(c, NULL, pp, paths->root_dir, /* auxiliary= */ false, ret);
8d419f
+                return install_info_add(c, NULL, pp, lp->root_dir, /* auxiliary= */ false, ret);
8d419f
         } else
8d419f
-                return install_info_add(c, name_or_path, NULL, paths->root_dir, /* auxiliary= */ false, ret);
8d419f
+                return install_info_add(c, name_or_path, NULL, lp->root_dir, /* auxiliary= */ false, ret);
8d419f
 }
8d419f
 
8d419f
 static int install_info_discover(
8d419f
                 UnitFileScope scope,
8d419f
                 InstallContext *c,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *name,
8d419f
                 SearchFlags flags,
8d419f
                 UnitFileInstallInfo **ret,
8d419f
@@ -1703,12 +1700,12 @@ static int install_info_discover(
8d419f
         int r;
8d419f
 
8d419f
         assert(c);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(name);
8d419f
 
8d419f
-        r = install_info_add_auto(c, paths, name, &i);
8d419f
+        r = install_info_add_auto(c, lp, name, &i);
8d419f
         if (r >= 0)
8d419f
-                r = install_info_traverse(scope, c, paths, i, flags, ret);
8d419f
+                r = install_info_traverse(scope, c, lp, i, flags, ret);
8d419f
 
8d419f
         if (r < 0)
8d419f
                 unit_file_changes_add(changes, n_changes, r, name, NULL);
8d419f
@@ -1718,7 +1715,7 @@ static int install_info_discover(
8d419f
 static int install_info_discover_and_check(
8d419f
                         UnitFileScope scope,
8d419f
                         InstallContext *c,
8d419f
-                        const LookupPaths *paths,
8d419f
+                        const LookupPaths *lp,
8d419f
                         const char *name,
8d419f
                         SearchFlags flags,
8d419f
                         UnitFileInstallInfo **ret,
8d419f
@@ -1727,11 +1724,11 @@ static int install_info_discover_and_check(
8d419f
 
8d419f
         int r;
8d419f
 
8d419f
-        r = install_info_discover(scope, c, paths, name, flags, ret, changes, n_changes);
8d419f
+        r = install_info_discover(scope, c, lp, name, flags, ret, changes, n_changes);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        return install_info_may_process(ret ? *ret : NULL, paths, changes, n_changes);
8d419f
+        return install_info_may_process(ret ? *ret : NULL, lp, changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 int unit_file_verify_alias(const UnitFileInstallInfo *i, const char *dst, char **ret_dst) {
8d419f
@@ -1812,7 +1809,7 @@ int unit_file_verify_alias(const UnitFileInstallInfo *i, const char *dst, char *
8d419f
 
8d419f
 static int install_info_symlink_alias(
8d419f
                 UnitFileInstallInfo *i,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *config_path,
8d419f
                 bool force,
8d419f
                 UnitFileChange **changes,
8d419f
@@ -1822,7 +1819,7 @@ static int install_info_symlink_alias(
8d419f
         int r = 0, q;
8d419f
 
8d419f
         assert(i);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
 
8d419f
         STRV_FOREACH(s, i->aliases) {
8d419f
@@ -1840,7 +1837,7 @@ static int install_info_symlink_alias(
8d419f
                 if (!alias_path)
8d419f
                         return -ENOMEM;
8d419f
 
8d419f
-                q = create_symlink(paths, i->path, alias_path, force, changes, n_changes);
8d419f
+                q = create_symlink(lp, i->path, alias_path, force, changes, n_changes);
8d419f
                 if (r == 0)
8d419f
                         r = q;
8d419f
         }
8d419f
@@ -1852,7 +1849,7 @@ static int install_info_symlink_wants(
8d419f
                 UnitFileScope scope,
8d419f
                 UnitFileFlags file_flags,
8d419f
                 UnitFileInstallInfo *i,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *config_path,
8d419f
                 char **list,
8d419f
                 const char *suffix,
8d419f
@@ -1866,7 +1863,7 @@ static int install_info_symlink_wants(
8d419f
         int r = 0, q;
8d419f
 
8d419f
         assert(i);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
 
8d419f
         if (strv_isempty(list))
8d419f
@@ -1889,7 +1886,7 @@ static int install_info_symlink_wants(
8d419f
                         return r;
8d419f
 
8d419f
                 instance.name = buf;
8d419f
-                r = unit_file_search(NULL, &instance, paths, SEARCH_FOLLOW_CONFIG_SYMLINKS);
8d419f
+                r = unit_file_search(NULL, &instance, lp, SEARCH_FOLLOW_CONFIG_SYMLINKS);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
 
8d419f
@@ -1943,11 +1940,11 @@ static int install_info_symlink_wants(
8d419f
                 if (!path)
8d419f
                         return -ENOMEM;
8d419f
 
8d419f
-                q = create_symlink(paths, i->path, path, true, changes, n_changes);
8d419f
+                q = create_symlink(lp, i->path, path, true, changes, n_changes);
8d419f
                 if (r == 0)
8d419f
                         r = q;
8d419f
 
8d419f
-                if (unit_file_exists(scope, paths, dst) == 0)
8d419f
+                if (unit_file_exists(scope, lp, dst) == 0)
8d419f
                         unit_file_changes_add(changes, n_changes, UNIT_FILE_DESTINATION_NOT_PRESENT, dst, i->path);
8d419f
         }
8d419f
 
8d419f
@@ -1956,7 +1953,7 @@ static int install_info_symlink_wants(
8d419f
 
8d419f
 static int install_info_symlink_link(
8d419f
                 UnitFileInstallInfo *i,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *config_path,
8d419f
                 bool force,
8d419f
                 UnitFileChange **changes,
8d419f
@@ -1966,11 +1963,11 @@ static int install_info_symlink_link(
8d419f
         int r;
8d419f
 
8d419f
         assert(i);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
         assert(i->path);
8d419f
 
8d419f
-        r = in_search_path(paths, i->path);
8d419f
+        r = in_search_path(lp, i->path);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
         if (r > 0)
8d419f
@@ -1980,14 +1977,14 @@ static int install_info_symlink_link(
8d419f
         if (!path)
8d419f
                 return -ENOMEM;
8d419f
 
8d419f
-        return create_symlink(paths, i->path, path, force, changes, n_changes);
8d419f
+        return create_symlink(lp, i->path, path, force, changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 static int install_info_apply(
8d419f
                 UnitFileScope scope,
8d419f
                 UnitFileFlags file_flags,
8d419f
                 UnitFileInstallInfo *i,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *config_path,
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
@@ -1995,7 +1992,7 @@ static int install_info_apply(
8d419f
         int r, q;
8d419f
 
8d419f
         assert(i);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
 
8d419f
         if (i->type != UNIT_FILE_TYPE_REGULAR)
8d419f
@@ -2003,17 +2000,17 @@ static int install_info_apply(
8d419f
 
8d419f
         bool force = file_flags & UNIT_FILE_FORCE;
8d419f
 
8d419f
-        r = install_info_symlink_alias(i, paths, config_path, force, changes, n_changes);
8d419f
+        r = install_info_symlink_alias(i, lp, config_path, force, changes, n_changes);
8d419f
 
8d419f
-        q = install_info_symlink_wants(scope, file_flags, i, paths, config_path, i->wanted_by, ".wants/", changes, n_changes);
8d419f
+        q = install_info_symlink_wants(scope, file_flags, i, lp, config_path, i->wanted_by, ".wants/", changes, n_changes);
8d419f
         if (r == 0)
8d419f
                 r = q;
8d419f
 
8d419f
-        q = install_info_symlink_wants(scope, file_flags, i, paths, config_path, i->required_by, ".requires/", changes, n_changes);
8d419f
+        q = install_info_symlink_wants(scope, file_flags, i, lp, config_path, i->required_by, ".requires/", changes, n_changes);
8d419f
         if (r == 0)
8d419f
                 r = q;
8d419f
 
8d419f
-        q = install_info_symlink_link(i, paths, config_path, force, changes, n_changes);
8d419f
+        q = install_info_symlink_link(i, lp, config_path, force, changes, n_changes);
8d419f
         /* Do not count links to the unit file towards the "carries_install_info" count */
8d419f
         if (r == 0 && q < 0)
8d419f
                 r = q;
8d419f
@@ -2025,7 +2022,7 @@ static int install_context_apply(
8d419f
                 UnitFileScope scope,
8d419f
                 UnitFileFlags file_flags,
8d419f
                 InstallContext *c,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *config_path,
8d419f
                 SearchFlags flags,
8d419f
                 UnitFileChange **changes,
8d419f
@@ -2035,7 +2032,7 @@ static int install_context_apply(
8d419f
         int r;
8d419f
 
8d419f
         assert(c);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
 
8d419f
         if (ordered_hashmap_isempty(c->will_process))
8d419f
@@ -2053,7 +2050,7 @@ static int install_context_apply(
8d419f
                 if (q < 0)
8d419f
                         return q;
8d419f
 
8d419f
-                q = install_info_traverse(scope, c, paths, i, flags, NULL);
8d419f
+                q = install_info_traverse(scope, c, lp, i, flags, NULL);
8d419f
                 if (q < 0) {
8d419f
                         if (i->auxiliary) {
8d419f
                                 q = unit_file_changes_add(changes, n_changes, UNIT_FILE_AUXILIARY_FAILED, NULL, i->name);
8d419f
@@ -2080,7 +2077,7 @@ static int install_context_apply(
8d419f
                 if (i->type != UNIT_FILE_TYPE_REGULAR)
8d419f
                         continue;
8d419f
 
8d419f
-                q = install_info_apply(scope, file_flags, i, paths, config_path, changes, n_changes);
8d419f
+                q = install_info_apply(scope, file_flags, i, lp, config_path, changes, n_changes);
8d419f
                 if (r >= 0) {
8d419f
                         if (q < 0)
8d419f
                                 r = q;
8d419f
@@ -2095,7 +2092,7 @@ static int install_context_apply(
8d419f
 static int install_context_mark_for_removal(
8d419f
                 UnitFileScope scope,
8d419f
                 InstallContext *c,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 Set **remove_symlinks_to,
8d419f
                 const char *config_path,
8d419f
                 UnitFileChange **changes,
8d419f
@@ -2105,7 +2102,7 @@ static int install_context_mark_for_removal(
8d419f
         int r;
8d419f
 
8d419f
         assert(c);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
 
8d419f
         /* Marks all items for removal */
8d419f
@@ -2123,7 +2120,7 @@ static int install_context_mark_for_removal(
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
 
8d419f
-                r = install_info_traverse(scope, c, paths, i, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS, NULL);
8d419f
+                r = install_info_traverse(scope, c, lp, i, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS, NULL);
8d419f
                 if (r == -ENOLINK) {
8d419f
                         log_debug_errno(r, "Name %s leads to a dangling symlink, removing name.", i->name);
8d419f
                         unit_file_changes_add(changes, n_changes, UNIT_FILE_IS_DANGLING, i->path ?: i->name, NULL);
8d419f
@@ -2164,7 +2161,7 @@ int unit_file_mask(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         const char *config_path;
8d419f
         char **i;
8d419f
         int r;
8d419f
@@ -2172,11 +2169,11 @@ int unit_file_mask(
8d419f
         assert(scope >= 0);
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = (flags & UNIT_FILE_RUNTIME) ? paths.runtime_config : paths.persistent_config;
8d419f
+        config_path = (flags & UNIT_FILE_RUNTIME) ? lp.runtime_config : lp.persistent_config;
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
@@ -2194,7 +2191,7 @@ int unit_file_mask(
8d419f
                 if (!path)
8d419f
                         return -ENOMEM;
8d419f
 
8d419f
-                q = create_symlink(&paths, "/dev/null", path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
8d419f
+                q = create_symlink(&lp, "/dev/null", path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
8d419f
                 if (q < 0 && r >= 0)
8d419f
                         r = q;
8d419f
         }
8d419f
@@ -2210,7 +2207,7 @@ int unit_file_unmask(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_set_free_free_ Set *remove_symlinks_to = NULL;
8d419f
         _cleanup_strv_free_ char **todo = NULL;
8d419f
         const char *config_path;
8d419f
@@ -2222,11 +2219,11 @@ int unit_file_unmask(
8d419f
         assert(scope >= 0);
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = (flags & UNIT_FILE_RUNTIME) ? paths.runtime_config : paths.persistent_config;
8d419f
+        config_path = (flags & UNIT_FILE_RUNTIME) ? lp.runtime_config : lp.persistent_config;
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
@@ -2283,13 +2280,13 @@ int unit_file_unmask(
8d419f
 
8d419f
                 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, path, NULL);
8d419f
 
8d419f
-                rp = skip_root(&paths, path);
8d419f
+                rp = skip_root(lp.root_dir, path);
8d419f
                 q = mark_symlink_for_removal(&remove_symlinks_to, rp ?: path);
8d419f
                 if (q < 0)
8d419f
                         return q;
8d419f
         }
8d419f
 
8d419f
-        q = remove_marked_symlinks(remove_symlinks_to, config_path, &paths, dry_run, changes, n_changes);
8d419f
+        q = remove_marked_symlinks(remove_symlinks_to, config_path, &lp, dry_run, changes, n_changes);
8d419f
         if (r >= 0)
8d419f
                 r = q;
8d419f
 
8d419f
@@ -2304,7 +2301,7 @@ int unit_file_link(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_strv_free_ char **todo = NULL;
8d419f
         const char *config_path;
8d419f
         size_t n_todo = 0;
8d419f
@@ -2314,11 +2311,11 @@ int unit_file_link(
8d419f
         assert(scope >= 0);
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = (flags & UNIT_FILE_RUNTIME) ? paths.runtime_config : paths.persistent_config;
8d419f
+        config_path = (flags & UNIT_FILE_RUNTIME) ? lp.runtime_config : lp.persistent_config;
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
@@ -2334,7 +2331,7 @@ int unit_file_link(
8d419f
                 if (!unit_name_is_valid(fn, UNIT_NAME_ANY))
8d419f
                         return -EINVAL;
8d419f
 
8d419f
-                full = path_join(paths.root_dir, *i);
8d419f
+                full = path_join(lp.root_dir, *i);
8d419f
                 if (!full)
8d419f
                         return -ENOMEM;
8d419f
 
8d419f
@@ -2344,7 +2341,7 @@ int unit_file_link(
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
 
8d419f
-                q = in_search_path(&paths, *i);
8d419f
+                q = in_search_path(&lp, *i);
8d419f
                 if (q < 0)
8d419f
                         return q;
8d419f
                 if (q > 0)
8d419f
@@ -2370,7 +2367,7 @@ int unit_file_link(
8d419f
                 if (!new_path)
8d419f
                         return -ENOMEM;
8d419f
 
8d419f
-                q = create_symlink(&paths, *i, new_path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
8d419f
+                q = create_symlink(&lp, *i, new_path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
8d419f
                 if (q < 0 && r >= 0)
8d419f
                         r = q;
8d419f
         }
8d419f
@@ -2378,23 +2375,23 @@ int unit_file_link(
8d419f
         return r;
8d419f
 }
8d419f
 
8d419f
-static int path_shall_revert(const LookupPaths *paths, const char *path) {
8d419f
+static int path_shall_revert(const LookupPaths *lp, const char *path) {
8d419f
         int r;
8d419f
 
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(path);
8d419f
 
8d419f
         /* Checks whether the path is one where the drop-in directories shall be removed. */
8d419f
 
8d419f
-        r = path_is_config(paths, path, true);
8d419f
+        r = path_is_config(lp, path, true);
8d419f
         if (r != 0)
8d419f
                 return r;
8d419f
 
8d419f
-        r = path_is_control(paths, path);
8d419f
+        r = path_is_control(lp, path);
8d419f
         if (r != 0)
8d419f
                 return r;
8d419f
 
8d419f
-        return path_is_transient(paths, path);
8d419f
+        return path_is_transient(lp, path);
8d419f
 }
8d419f
 
8d419f
 int unit_file_revert(
8d419f
@@ -2405,7 +2402,7 @@ int unit_file_revert(
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
         _cleanup_set_free_free_ Set *remove_symlinks_to = NULL;
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_strv_free_ char **todo = NULL;
8d419f
         size_t n_todo = 0;
8d419f
         char **i;
8d419f
@@ -2422,7 +2419,7 @@ int unit_file_revert(
8d419f
          * We remove all that in both the runtime and the persistent directories, if that applies.
8d419f
          */
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
@@ -2433,7 +2430,7 @@ int unit_file_revert(
8d419f
                 if (!unit_name_is_valid(*i, UNIT_NAME_ANY))
8d419f
                         return -EINVAL;
8d419f
 
8d419f
-                STRV_FOREACH(p, paths.search_path) {
8d419f
+                STRV_FOREACH(p, lp.search_path) {
8d419f
                         _cleanup_free_ char *path = NULL, *dropin = NULL;
8d419f
                         struct stat st;
8d419f
 
8d419f
@@ -2447,7 +2444,7 @@ int unit_file_revert(
8d419f
                                         return -errno;
8d419f
                         } else if (S_ISREG(st.st_mode)) {
8d419f
                                 /* Check if there's a vendor version */
8d419f
-                                r = path_is_vendor_or_generator(&paths, path);
8d419f
+                                r = path_is_vendor_or_generator(&lp, path);
8d419f
                                 if (r < 0)
8d419f
                                         return r;
8d419f
                                 if (r > 0)
8d419f
@@ -2464,7 +2461,7 @@ int unit_file_revert(
8d419f
                                         return -errno;
8d419f
                         } else if (S_ISDIR(st.st_mode)) {
8d419f
                                 /* Remove the drop-ins */
8d419f
-                                r = path_shall_revert(&paths, dropin);
8d419f
+                                r = path_shall_revert(&lp, dropin);
8d419f
                                 if (r < 0)
8d419f
                                         return r;
8d419f
                                 if (r > 0) {
8d419f
@@ -2480,7 +2477,7 @@ int unit_file_revert(
8d419f
                         continue;
8d419f
 
8d419f
                 /* OK, there's a vendor version, hence drop all configuration versions */
8d419f
-                STRV_FOREACH(p, paths.search_path) {
8d419f
+                STRV_FOREACH(p, lp.search_path) {
8d419f
                         _cleanup_free_ char *path = NULL;
8d419f
                         struct stat st;
8d419f
 
8d419f
@@ -2493,7 +2490,7 @@ int unit_file_revert(
8d419f
                                 if (errno != ENOENT)
8d419f
                                         return -errno;
8d419f
                         } else if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
8d419f
-                                r = path_is_config(&paths, path, true);
8d419f
+                                r = path_is_config(&lp, path, true);
8d419f
                                 if (r < 0)
8d419f
                                         return r;
8d419f
                                 if (r > 0) {
8d419f
@@ -2534,17 +2531,17 @@ int unit_file_revert(
8d419f
 
8d419f
                 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, *i, NULL);
8d419f
 
8d419f
-                rp = skip_root(&paths, *i);
8d419f
+                rp = skip_root(lp.root_dir, *i);
8d419f
                 q = mark_symlink_for_removal(&remove_symlinks_to, rp ?: *i);
8d419f
                 if (q < 0)
8d419f
                         return q;
8d419f
         }
8d419f
 
8d419f
-        q = remove_marked_symlinks(remove_symlinks_to, paths.runtime_config, &paths, false, changes, n_changes);
8d419f
+        q = remove_marked_symlinks(remove_symlinks_to, lp.runtime_config, &lp, false, changes, n_changes);
8d419f
         if (r >= 0)
8d419f
                 r = q;
8d419f
 
8d419f
-        q = remove_marked_symlinks(remove_symlinks_to, paths.persistent_config, &paths, false, changes, n_changes);
8d419f
+        q = remove_marked_symlinks(remove_symlinks_to, lp.persistent_config, &lp, false, changes, n_changes);
8d419f
         if (r >= 0)
8d419f
                 r = q;
8d419f
 
8d419f
@@ -2561,7 +2558,7 @@ int unit_file_add_dependency(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(install_context_done) InstallContext c = {};
8d419f
         UnitFileInstallInfo *i, *target_info;
8d419f
         const char *config_path;
8d419f
@@ -2578,15 +2575,15 @@ int unit_file_add_dependency(
8d419f
         if (!unit_name_is_valid(target, UNIT_NAME_ANY))
8d419f
                 return -EINVAL;
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = (file_flags & UNIT_FILE_RUNTIME) ? paths.runtime_config : paths.persistent_config;
8d419f
+        config_path = (file_flags & UNIT_FILE_RUNTIME) ? lp.runtime_config : lp.persistent_config;
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
-        r = install_info_discover_and_check(scope, &c, &paths, target, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+        r = install_info_discover_and_check(scope, &c, &lp, target, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                             &target_info, changes, n_changes);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
@@ -2596,7 +2593,7 @@ int unit_file_add_dependency(
8d419f
         STRV_FOREACH(f, files) {
8d419f
                 char ***l;
8d419f
 
8d419f
-                r = install_info_discover_and_check(scope, &c, &paths, *f, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+                r = install_info_discover_and_check(scope, &c, &lp, *f, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                                     &i, changes, n_changes);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
@@ -2618,7 +2615,7 @@ int unit_file_add_dependency(
8d419f
                         return -ENOMEM;
8d419f
         }
8d419f
 
8d419f
-        return install_context_apply(scope, file_flags, &c, &paths, config_path,
8d419f
+        return install_context_apply(scope, file_flags, &c, &lp, config_path,
8d419f
                                      SEARCH_FOLLOW_CONFIG_SYMLINKS, changes, n_changes);
8d419f
 }
8d419f
 
8d419f
@@ -2630,7 +2627,7 @@ int unit_file_enable(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(install_context_done) InstallContext c = {};
8d419f
         const char *config_path;
8d419f
         UnitFileInstallInfo *i;
8d419f
@@ -2640,16 +2637,16 @@ int unit_file_enable(
8d419f
         assert(scope >= 0);
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = config_path_from_flags(&paths, file_flags);
8d419f
+        config_path = config_path_from_flags(&lp, file_flags);
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
         STRV_FOREACH(f, files) {
8d419f
-                r = install_info_discover_and_check(scope, &c, &paths, *f, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+                r = install_info_discover_and_check(scope, &c, &lp, *f, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                                     &i, changes, n_changes);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
@@ -2662,7 +2659,7 @@ int unit_file_enable(
8d419f
            is useful to determine whether the passed files had any
8d419f
            installation data at all. */
8d419f
 
8d419f
-        return install_context_apply(scope, file_flags, &c, &paths, config_path, SEARCH_LOAD, changes, n_changes);
8d419f
+        return install_context_apply(scope, file_flags, &c, &lp, config_path, SEARCH_LOAD, changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 int unit_file_disable(
8d419f
@@ -2673,7 +2670,7 @@ int unit_file_disable(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(install_context_done) InstallContext c = {};
8d419f
         _cleanup_set_free_free_ Set *remove_symlinks_to = NULL;
8d419f
         const char *config_path;
8d419f
@@ -2683,11 +2680,11 @@ int unit_file_disable(
8d419f
         assert(scope >= 0);
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = config_path_from_flags(&paths, flags);
8d419f
+        config_path = config_path_from_flags(&lp, flags);
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
@@ -2695,16 +2692,16 @@ int unit_file_disable(
8d419f
                 if (!unit_name_is_valid(*i, UNIT_NAME_ANY))
8d419f
                         return -EINVAL;
8d419f
 
8d419f
-                r = install_info_add(&c, *i, NULL, paths.root_dir, /* auxiliary= */ false, NULL);
8d419f
+                r = install_info_add(&c, *i, NULL, lp.root_dir, /* auxiliary= */ false, NULL);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
         }
8d419f
 
8d419f
-        r = install_context_mark_for_removal(scope, &c, &paths, &remove_symlinks_to, config_path, changes, n_changes);
8d419f
+        r = install_context_mark_for_removal(scope, &c, &lp, &remove_symlinks_to, config_path, changes, n_changes);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        return remove_marked_symlinks(remove_symlinks_to, config_path, &paths, !!(flags & UNIT_FILE_DRY_RUN), changes, n_changes);
8d419f
+        return remove_marked_symlinks(remove_symlinks_to, config_path, &lp, !!(flags & UNIT_FILE_DRY_RUN), changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 int unit_file_reenable(
8d419f
@@ -2742,7 +2739,7 @@ int unit_file_set_default(
8d419f
                 UnitFileChange **changes,
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(install_context_done) InstallContext c = {};
8d419f
         UnitFileInstallInfo *i;
8d419f
         const char *new_path;
8d419f
@@ -2757,16 +2754,16 @@ int unit_file_set_default(
8d419f
         if (streq(name, SPECIAL_DEFAULT_TARGET))
8d419f
                 return -EINVAL;
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        r = install_info_discover_and_check(scope, &c, &paths, name, 0, &i, changes, n_changes);
8d419f
+        r = install_info_discover_and_check(scope, &c, &lp, name, 0, &i, changes, n_changes);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        new_path = strjoina(paths.persistent_config, "/" SPECIAL_DEFAULT_TARGET);
8d419f
-        return create_symlink(&paths, i->path, new_path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
8d419f
+        new_path = strjoina(lp.persistent_config, "/" SPECIAL_DEFAULT_TARGET);
8d419f
+        return create_symlink(&lp, i->path, new_path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 int unit_file_get_default(
8d419f
@@ -2774,7 +2771,7 @@ int unit_file_get_default(
8d419f
                 const char *root_dir,
8d419f
                 char **name) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(install_context_done) InstallContext c = {};
8d419f
         UnitFileInstallInfo *i;
8d419f
         char *n;
8d419f
@@ -2784,15 +2781,15 @@ int unit_file_get_default(
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
         assert(name);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        r = install_info_discover(scope, &c, &paths, SPECIAL_DEFAULT_TARGET, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+        r = install_info_discover(scope, &c, &lp, SPECIAL_DEFAULT_TARGET, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                   &i, NULL, NULL);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
-        r = install_info_may_process(i, &paths, NULL, 0);
8d419f
+        r = install_info_may_process(i, &lp, NULL, 0);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
@@ -2806,7 +2803,7 @@ int unit_file_get_default(
8d419f
 
8d419f
 int unit_file_lookup_state(
8d419f
                 UnitFileScope scope,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *name,
8d419f
                 UnitFileState *ret) {
8d419f
 
8d419f
@@ -2815,13 +2812,13 @@ int unit_file_lookup_state(
8d419f
         UnitFileState state;
8d419f
         int r;
8d419f
 
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(name);
8d419f
 
8d419f
         if (!unit_name_is_valid(name, UNIT_NAME_ANY))
8d419f
                 return -EINVAL;
8d419f
 
8d419f
-        r = install_info_discover(scope, &c, paths, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+        r = install_info_discover(scope, &c, lp, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                   &i, NULL, NULL);
8d419f
         if (r < 0)
8d419f
                 return log_debug_errno(r, "Failed to discover unit %s: %m", name);
8d419f
@@ -2837,7 +2834,7 @@ int unit_file_lookup_state(
8d419f
         switch (i->type) {
8d419f
 
8d419f
         case UNIT_FILE_TYPE_MASKED:
8d419f
-                r = path_is_runtime(paths, i->path, true);
8d419f
+                r = path_is_runtime(lp, i->path, true);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
 
8d419f
@@ -2851,7 +2848,7 @@ int unit_file_lookup_state(
8d419f
                         break;
8d419f
                 }
8d419f
 
8d419f
-                r = path_is_generator(paths, i->path);
8d419f
+                r = path_is_generator(lp, i->path);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
                 if (r > 0) {
8d419f
@@ -2859,7 +2856,7 @@ int unit_file_lookup_state(
8d419f
                         break;
8d419f
                 }
8d419f
 
8d419f
-                r = path_is_transient(paths, i->path);
8d419f
+                r = path_is_transient(lp, i->path);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
                 if (r > 0) {
8d419f
@@ -2870,7 +2867,7 @@ int unit_file_lookup_state(
8d419f
                 /* Check if any of the Alias= symlinks have been created.
8d419f
                  * We ignore other aliases, and only check those that would
8d419f
                  * be created by systemctl enable for this unit. */
8d419f
-                r = find_symlinks_in_scope(scope, paths, i, true, &state);
8d419f
+                r = find_symlinks_in_scope(scope, lp, i, true, &state);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
                 if (r > 0)
8d419f
@@ -2878,7 +2875,7 @@ int unit_file_lookup_state(
8d419f
 
8d419f
                 /* Check if the file is known under other names. If it is,
8d419f
                  * it might be in use. Report that as UNIT_FILE_INDIRECT. */
8d419f
-                r = find_symlinks_in_scope(scope, paths, i, false, &state);
8d419f
+                r = find_symlinks_in_scope(scope, lp, i, false, &state);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
                 if (r > 0)
8d419f
@@ -2908,31 +2905,31 @@ int unit_file_get_state(
8d419f
                 const char *name,
8d419f
                 UnitFileState *ret) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         int r;
8d419f
 
8d419f
         assert(scope >= 0);
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
         assert(name);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        return unit_file_lookup_state(scope, &paths, name, ret);
8d419f
+        return unit_file_lookup_state(scope, &lp, name, ret);
8d419f
 }
8d419f
 
8d419f
-int unit_file_exists(UnitFileScope scope, const LookupPaths *paths, const char *name) {
8d419f
+int unit_file_exists(UnitFileScope scope, const LookupPaths *lp, const char *name) {
8d419f
         _cleanup_(install_context_done) InstallContext c = {};
8d419f
         int r;
8d419f
 
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(name);
8d419f
 
8d419f
         if (!unit_name_is_valid(name, UNIT_NAME_ANY))
8d419f
                 return -EINVAL;
8d419f
 
8d419f
-        r = install_info_discover(scope, &c, paths, name, 0, NULL, NULL, NULL);
8d419f
+        r = install_info_discover(scope, &c, lp, name, 0, NULL, NULL, NULL);
8d419f
         if (r == -ENOENT)
8d419f
                 return 0;
8d419f
         if (r < 0)
8d419f
@@ -3195,7 +3192,7 @@ static int execute_preset(
8d419f
                 UnitFileFlags file_flags,
8d419f
                 InstallContext *plus,
8d419f
                 InstallContext *minus,
8d419f
-                const LookupPaths *paths,
8d419f
+                const LookupPaths *lp,
8d419f
                 const char *config_path,
8d419f
                 char **files,
8d419f
                 UnitFilePresetMode mode,
8d419f
@@ -3206,17 +3203,17 @@ static int execute_preset(
8d419f
 
8d419f
         assert(plus);
8d419f
         assert(minus);
8d419f
-        assert(paths);
8d419f
+        assert(lp);
8d419f
         assert(config_path);
8d419f
 
8d419f
         if (mode != UNIT_FILE_PRESET_ENABLE_ONLY) {
8d419f
                 _cleanup_set_free_free_ Set *remove_symlinks_to = NULL;
8d419f
 
8d419f
-                r = install_context_mark_for_removal(scope, minus, paths, &remove_symlinks_to, config_path, changes, n_changes);
8d419f
+                r = install_context_mark_for_removal(scope, minus, lp, &remove_symlinks_to, config_path, changes, n_changes);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
 
8d419f
-                r = remove_marked_symlinks(remove_symlinks_to, config_path, paths, false, changes, n_changes);
8d419f
+                r = remove_marked_symlinks(remove_symlinks_to, config_path, lp, false, changes, n_changes);
8d419f
         } else
8d419f
                 r = 0;
8d419f
 
8d419f
@@ -3226,7 +3223,7 @@ static int execute_preset(
8d419f
                 /* Returns number of symlinks that where supposed to be installed. */
8d419f
                 q = install_context_apply(scope,
8d419f
                                           file_flags | UNIT_FILE_IGNORE_AUXILIARY_FAILURE,
8d419f
-                                          plus, paths, config_path, SEARCH_LOAD, changes, n_changes);
8d419f
+                                          plus, lp, config_path, SEARCH_LOAD, changes, n_changes);
8d419f
                 if (r >= 0) {
8d419f
                         if (q < 0)
8d419f
                                 r = q;
8d419f
@@ -3242,7 +3239,7 @@ static int preset_prepare_one(
8d419f
                 UnitFileScope scope,
8d419f
                 InstallContext *plus,
8d419f
                 InstallContext *minus,
8d419f
-                LookupPaths *paths,
8d419f
+                LookupPaths *lp,
8d419f
                 const char *name,
8d419f
                 const UnitFilePresets *presets,
8d419f
                 UnitFileChange **changes,
8d419f
@@ -3256,7 +3253,7 @@ static int preset_prepare_one(
8d419f
         if (install_info_find(plus, name) || install_info_find(minus, name))
8d419f
                 return 0;
8d419f
 
8d419f
-        r = install_info_discover(scope, &tmp, paths, name, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+        r = install_info_discover(scope, &tmp, lp, name, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                   &i, changes, n_changes);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
@@ -3273,20 +3270,20 @@ static int preset_prepare_one(
8d419f
                 if (instance_name_list) {
8d419f
                         char **s;
8d419f
                         STRV_FOREACH(s, instance_name_list) {
8d419f
-                                r = install_info_discover_and_check(scope, plus, paths, *s, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+                                r = install_info_discover_and_check(scope, plus, lp, *s, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                                                     &i, changes, n_changes);
8d419f
                                 if (r < 0)
8d419f
                                         return r;
8d419f
                         }
8d419f
                 } else {
8d419f
-                        r = install_info_discover_and_check(scope, plus, paths, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+                        r = install_info_discover_and_check(scope, plus, lp, name, SEARCH_LOAD|SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                                             &i, changes, n_changes);
8d419f
                         if (r < 0)
8d419f
                                 return r;
8d419f
                 }
8d419f
 
8d419f
         } else
8d419f
-                r = install_info_discover(scope, minus, paths, name, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
+                r = install_info_discover(scope, minus, lp, name, SEARCH_FOLLOW_CONFIG_SYMLINKS,
8d419f
                                           &i, changes, n_changes);
8d419f
 
8d419f
         return r;
8d419f
@@ -3302,7 +3299,7 @@ int unit_file_preset(
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
         _cleanup_(install_context_done) InstallContext plus = {}, minus = {};
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(unit_file_presets_freep) UnitFilePresets presets = {};
8d419f
         const char *config_path;
8d419f
         char **i;
8d419f
@@ -3312,11 +3309,11 @@ int unit_file_preset(
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
         assert(mode < _UNIT_FILE_PRESET_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = (file_flags & UNIT_FILE_RUNTIME) ? paths.runtime_config : paths.persistent_config;
8d419f
+        config_path = (file_flags & UNIT_FILE_RUNTIME) ? lp.runtime_config : lp.persistent_config;
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
@@ -3325,12 +3322,12 @@ int unit_file_preset(
8d419f
                 return r;
8d419f
 
8d419f
         STRV_FOREACH(i, files) {
8d419f
-                r = preset_prepare_one(scope, &plus, &minus, &paths, *i, &presets, changes, n_changes);
8d419f
+                r = preset_prepare_one(scope, &plus, &minus, &lp, *i, &presets, changes, n_changes);
8d419f
                 if (r < 0)
8d419f
                         return r;
8d419f
         }
8d419f
 
8d419f
-        return execute_preset(scope, file_flags, &plus, &minus, &paths, config_path, files, mode, changes, n_changes);
8d419f
+        return execute_preset(scope, file_flags, &plus, &minus, &lp, config_path, files, mode, changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 int unit_file_preset_all(
8d419f
@@ -3342,7 +3339,7 @@ int unit_file_preset_all(
8d419f
                 size_t *n_changes) {
8d419f
 
8d419f
         _cleanup_(install_context_done) InstallContext plus = {}, minus = {};
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         _cleanup_(unit_file_presets_freep) UnitFilePresets presets = {};
8d419f
         const char *config_path = NULL;
8d419f
         char **i;
8d419f
@@ -3352,11 +3349,11 @@ int unit_file_preset_all(
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
         assert(mode < _UNIT_FILE_PRESET_MAX);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        config_path = (file_flags & UNIT_FILE_RUNTIME) ? paths.runtime_config : paths.persistent_config;
8d419f
+        config_path = (file_flags & UNIT_FILE_RUNTIME) ? lp.runtime_config : lp.persistent_config;
8d419f
         if (!config_path)
8d419f
                 return -ENXIO;
8d419f
 
8d419f
@@ -3364,7 +3361,7 @@ int unit_file_preset_all(
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        STRV_FOREACH(i, paths.search_path) {
8d419f
+        STRV_FOREACH(i, lp.search_path) {
8d419f
                 _cleanup_closedir_ DIR *d = NULL;
8d419f
 
8d419f
                 d = opendir(*i);
8d419f
@@ -3383,7 +3380,7 @@ int unit_file_preset_all(
8d419f
                         if (!IN_SET(de->d_type, DT_LNK, DT_REG))
8d419f
                                 continue;
8d419f
 
8d419f
-                        r = preset_prepare_one(scope, &plus, &minus, &paths, de->d_name, &presets, changes, n_changes);
8d419f
+                        r = preset_prepare_one(scope, &plus, &minus, &lp, de->d_name, &presets, changes, n_changes);
8d419f
                         if (r < 0 &&
8d419f
                             !IN_SET(r, -EEXIST, -ERFKILL, -EADDRNOTAVAIL, -EIDRM, -EUCLEAN, -ELOOP, -ENOENT))
8d419f
                                 /* Ignore generated/transient/missing/invalid units when applying preset, propagate other errors.
8d419f
@@ -3392,7 +3389,7 @@ int unit_file_preset_all(
8d419f
                 }
8d419f
         }
8d419f
 
8d419f
-        return execute_preset(scope, file_flags, &plus, &minus, &paths, config_path, NULL, mode, changes, n_changes);
8d419f
+        return execute_preset(scope, file_flags, &plus, &minus, &lp, config_path, NULL, mode, changes, n_changes);
8d419f
 }
8d419f
 
8d419f
 static UnitFileList* unit_file_list_free_one(UnitFileList *f) {
8d419f
@@ -3416,7 +3413,7 @@ int unit_file_get_list(
8d419f
                 char **states,
8d419f
                 char **patterns) {
8d419f
 
8d419f
-        _cleanup_(lookup_paths_free) LookupPaths paths = {};
8d419f
+        _cleanup_(lookup_paths_free) LookupPaths lp = {};
8d419f
         char **dirname;
8d419f
         int r;
8d419f
 
8d419f
@@ -3424,11 +3421,11 @@ int unit_file_get_list(
8d419f
         assert(scope < _UNIT_FILE_SCOPE_MAX);
8d419f
         assert(h);
8d419f
 
8d419f
-        r = lookup_paths_init(&paths, scope, 0, root_dir);
8d419f
+        r = lookup_paths_init(&lp, scope, 0, root_dir);
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        STRV_FOREACH(dirname, paths.search_path) {
8d419f
+        STRV_FOREACH(dirname, lp.search_path) {
8d419f
                 _cleanup_closedir_ DIR *d = NULL;
8d419f
 
8d419f
                 d = opendir(*dirname);
8d419f
@@ -3466,7 +3463,7 @@ int unit_file_get_list(
8d419f
                         if (!f->path)
8d419f
                                 return -ENOMEM;
8d419f
 
8d419f
-                        r = unit_file_lookup_state(scope, &paths, de->d_name, &f->state);
8d419f
+                        r = unit_file_lookup_state(scope, &lp, de->d_name, &f->state);
8d419f
                         if (r < 0)
8d419f
                                 f->state = UNIT_FILE_BAD;
8d419f