X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fpath-lookup.h;h=655e4549ca9e5bb37b2fcb36ee5d0ba57c50e98d;hb=4968105790c65af58d4ab42bffa2a4bedc0be8ee;hp=a3ef824a8603e42e59775bc3fdaa8d7ad5434b8e;hpb=fb15be839500c39f6c2f006f45306d439e1a7add;p=elogind.git diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index a3ef824a8..655e4549c 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -21,6 +21,9 @@ along with systemd; If not, see . ***/ +#include "macro.h" +#include "install.h" + typedef struct LookupPaths { char **unit_path; #ifdef HAVE_SYSV_COMPAT @@ -36,12 +39,19 @@ typedef enum SystemdRunningAs { _SYSTEMD_RUNNING_AS_INVALID = -1 } SystemdRunningAs; -#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free) - -const char* systemd_running_as_to_string(SystemdRunningAs i) _const_; -SystemdRunningAs systemd_running_as_from_string(const char *s) _pure_; - int user_config_home(char **config_home); - -int lookup_paths_init(LookupPaths *p, SystemdRunningAs running_as, bool personal, const char *generator, const char *generator_early, const char *generator_late); +int user_runtime_dir(char **runtime_dir); + +int lookup_paths_init(LookupPaths *p, + SystemdRunningAs running_as, + bool personal, + const char *root_dir, + const char *generator, + const char *generator_early, + const char *generator_late); void lookup_paths_free(LookupPaths *p); +int lookup_paths_init_from_scope(LookupPaths *paths, + UnitFileScope scope, + const char *root_dir); + +#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)