summaryrefslogtreecommitdiff
path: root/src/shared/path-lookup.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-24 21:24:23 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:30 +0200
commit463d0d15690c7abe2172a23ae23c5547693dd71f (patch)
treedd3410341fefada4758bf935ee1db9f680620ebf /src/shared/path-lookup.h
parentc51932be73e9cfc96e7bcaea1b31347133e1f3ed (diff)
core: remove ManagerRunningAs enum
Previously, we had two enums ManagerRunningAs and UnitFileScope, that were mostly identical and converted from one to the other all the time. The latter had one more value UNIT_FILE_GLOBAL however. Let's simplify things, and remove ManagerRunningAs and replace it by UnitFileScope everywhere, thus making the translation unnecessary. Introduce two new macros MANAGER_IS_SYSTEM() and MANAGER_IS_USER() to simplify checking if we are running in one or the user context.
Diffstat (limited to 'src/shared/path-lookup.h')
-rw-r--r--src/shared/path-lookup.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h
index 64c8035c2b..974db79509 100644
--- a/src/shared/path-lookup.h
+++ b/src/shared/path-lookup.h
@@ -22,7 +22,6 @@
#include <stdbool.h>
typedef struct LookupPaths LookupPaths;
-typedef enum ManagerRunningAs ManagerRunningAs;
#include "install.h"
#include "macro.h"
@@ -40,20 +39,12 @@ struct LookupPaths {
char *generator_late;
};
-enum ManagerRunningAs {
- MANAGER_SYSTEM,
- MANAGER_USER,
- _MANAGER_RUNNING_AS_MAX,
- _MANAGER_RUNNING_AS_INVALID = -1
-};
-
int user_config_home(char **config_home);
int user_runtime_dir(char **runtime_dir);
-char **generator_paths(ManagerRunningAs running_as);
+char **generator_paths(UnitFileScope scope);
-int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal, const char *root_dir);
-int lookup_paths_init_from_scope(LookupPaths *p, UnitFileScope scope, const char *root_dir);
+int lookup_paths_init(LookupPaths *p, UnitFileScope scope, const char *root_dir);
void lookup_paths_free(LookupPaths *p);
#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)