From: Andy Wingo Date: Sun, 19 Apr 2015 15:02:47 +0000 (+0200) Subject: Get rid of some more unused defines and dirs X-Git-Tag: v226.4~1^2~354 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=30ab6a0fc1bb950c4dcd90dcd3dfe00a810c7fc1 Get rid of some more unused defines and dirs --- diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 83abf53fa..3d16e37d0 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -218,21 +218,6 @@ static char** user_dirs( return tmp; } -char **generator_paths(SystemdRunningAs running_as) { - if (running_as == SYSTEMD_USER) - return strv_new("/run/systemd/user-generators", - "/etc/systemd/user-generators", - "/usr/local/lib/systemd/user-generators", - USER_GENERATOR_PATH, - NULL); - else - return strv_new("/run/systemd/system-generators", - "/etc/systemd/system-generators", - "/usr/local/lib/systemd/system-generators", - SYSTEM_GENERATOR_PATH, - NULL); -} - int lookup_paths_init( LookupPaths *p, SystemdRunningAs running_as, diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index f4f9895bb..3982974ba 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -23,35 +23,32 @@ #include "macro.h" +typedef enum UnitFileScope UnitFileScope; + typedef struct LookupPaths { char **unit_path; } LookupPaths; -typedef enum ManagerRunningAs { - MANAGER_SYSTEM, - MANAGER_USER, - _MANAGER_RUNNING_AS_MAX, - _MANAGER_RUNNING_AS_INVALID = -1 -} ManagerRunningAs; +typedef enum SystemdRunningAs { + SYSTEMD_SYSTEM, + SYSTEMD_USER, + _SYSTEMD_RUNNING_AS_MAX, + _SYSTEMD_RUNNING_AS_INVALID = -1 +} SystemdRunningAs; int user_config_home(char **config_home); int user_runtime_dir(char **runtime_dir); -char **generator_paths(ManagerRunningAs running_as); - int lookup_paths_init(LookupPaths *p, - ManagerRunningAs running_as, + SystemdRunningAs running_as, bool personal, const char *root_dir, const char *generator, const char *generator_early, const char *generator_late); - -#include "install.h" - +void lookup_paths_free(LookupPaths *p); int lookup_paths_init_from_scope(LookupPaths *paths, UnitFileScope scope, const char *root_dir); -void lookup_paths_free(LookupPaths *p); #define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)