chiark / gitweb /
shared/log: read /proc/cmdline only in daemons
[elogind.git] / src / shared / install.c
index 3b065445b071c6c42017ae863ca462246b3f0458..65f1c245c698422535bd2a8930f9af2f6d29402f 100644 (file)
@@ -58,22 +58,6 @@ static int in_search_path(const char *path, char **search) {
         return strv_contains(search, parent);
 }
 
-static int lookup_paths_init_from_scope(LookupPaths *paths,
-                                        UnitFileScope scope,
-                                        const char *root_dir) {
-        assert(paths);
-        assert(scope >= 0);
-        assert(scope < _UNIT_FILE_SCOPE_MAX);
-
-        zero(*paths);
-
-        return lookup_paths_init(paths,
-                                 scope == UNIT_FILE_SYSTEM ? SYSTEMD_SYSTEM : SYSTEMD_USER,
-                                 scope == UNIT_FILE_USER,
-                                 root_dir,
-                                 NULL, NULL, NULL);
-}
-
 static int get_config_path(UnitFileScope scope, bool runtime, const char *root_dir, char **ret) {
         char *p = NULL;
         int r;
@@ -1064,7 +1048,7 @@ static int unit_file_load(
         assert(path);
 
         if (!isempty(root_dir))
-                path = strappenda(root_dir, "/", path);
+                path = strjoina(root_dir, "/", path);
 
         if (!load) {
                 r = access(path, F_OK) ? -errno : 0;
@@ -1746,7 +1730,7 @@ int unit_file_set_default(
         if (r < 0)
                 return r;
 
-        path = strappenda(config_path, "/" SPECIAL_DEFAULT_TARGET);
+        path = strjoina(config_path, "/" SPECIAL_DEFAULT_TARGET);
 
         r = create_symlink(i->path, path, force, changes, n_changes);
         if (r < 0)