]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1: kill unit_file_find_dropin_paths() helper
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 24 Mar 2019 19:49:00 +0000 (20:49 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Jul 2019 12:27:23 +0000 (14:27 +0200)
It had two users, but it is just a very thin wrapper around
unit_file_find_dropin_paths(), so using it seems more complicated than directly
invoking unit_file_find_dropin_paths() twice.

src/core/load-dropin.h
src/shared/dropin.h
src/systemctl/systemctl.c

index bb10a76338b480a83a3d93b44db1d4e5f85492c0..ea15554d88b9475891d4497e7000086cf51c43cb 100644 (file)
@@ -9,11 +9,12 @@
 static inline int unit_find_dropin_paths(Unit *u, char ***paths) {
         assert(u);
 
-        return unit_file_find_dropin_conf_paths(NULL,
-                                                u->manager->lookup_paths.search_path,
-                                                u->manager->unit_path_cache,
-                                                u->names,
-                                                paths);
+        return unit_file_find_dropin_paths(NULL,
+                                           u->manager->lookup_paths.search_path,
+                                           u->manager->unit_path_cache,
+                                           ".d", ".conf",
+                                           u->names,
+                                           paths);
 }
 
 int unit_load_dropin(Unit *u);
index ae7379beeeca94380a6e22bb0c72005cc389f08b..88e1674c52db30539a14b3dfecfb25dfcf41f0d5 100644 (file)
@@ -23,17 +23,3 @@ int unit_file_find_dropin_paths(
                 const char *file_suffix,
                 Set *names,
                 char ***paths);
-
-static inline int unit_file_find_dropin_conf_paths(
-                const char *original_root,
-                char **lookup_path,
-                Set *unit_path_cache,
-                Set *names,
-                char ***paths) {
-
-        return unit_file_find_dropin_paths(original_root,
-                                           lookup_path,
-                                           unit_path_cache,
-                                           ".d", ".conf",
-                                           names, paths);
-}
index 3ce3e07bd7dcde2c275fc08202498cdcb350318d..019655e4a1e91b444a613117f89a913cf0732bb2 100644 (file)
@@ -2616,7 +2616,9 @@ static int unit_find_paths(
                         return log_error_errno(r, "Failed to add unit name: %m");
 
                 if (ret_dropin_paths) {
-                        r = unit_file_find_dropin_conf_paths(arg_root, lp->search_path, NULL, names, &dropins);
+                        r = unit_file_find_dropin_paths(arg_root, lp->search_path, NULL,
+                                                        ".d", ".conf",
+                                                        names, &dropins);
                         if (r < 0)
                                 return r;
                 }