mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
Merge pull request #15944 from poettering/sd-path-fixups
sd-path: some fixups
This commit is contained in:
commit
8abbd9a4d9
3
TODO
3
TODO
@ -48,6 +48,9 @@ Features:
|
||||
* pid1: also remove PID files of a service when the service starts, not just
|
||||
when it exits
|
||||
|
||||
* systemd-path: add ESP and XBOOTLDR path. Add "private" runtime/state/cache dir enum,
|
||||
mapping to $RUNTIME_DIRECTORY, $STATE_DIRECTORY and such
|
||||
|
||||
* make "systemd-dissect" an official supported tool, i.e. move to /usr/bin/ and
|
||||
provide man page. Given that we now have a tool that can generate images like
|
||||
this, it's useful to have one that can dump contents of them, too.
|
||||
|
@ -76,30 +76,30 @@
|
||||
<constant>SD_PATH_SEARCH_STATE_FACTORY</constant>,
|
||||
<constant>SD_PATH_SEARCH_CONFIGURATION</constant>,
|
||||
|
||||
<constant>SD_PATH_SYSTEMD_UTIL_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_UNIT_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_PRESET_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_UNIT_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_PRESET_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_CONF_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_CONF_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_UNIT_PATH</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_UNIT_PATH</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_GENERATOR_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_GENERATOR_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_GENERATOR_PATH</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_GENERATOR_PATH</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SLEEP_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SHUTDOWN_DIR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_UTIL</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_UNIT</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_PRESET</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_UNIT</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_PRESET</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_CONF</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_CONF</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SEARCH_USER_UNIT</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SYSTEM_GENERATOR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_USER_GENERATOR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SLEEP</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SHUTDOWN</constant>,
|
||||
|
||||
<constant>SD_PATH_TMPFILES_DIR</constant>,
|
||||
<constant>SD_PATH_SYSUSERS_DIR</constant>,
|
||||
<constant>SD_PATH_SYSCTL_DIR</constant>,
|
||||
<constant>SD_PATH_BINFMT_DIR</constant>,
|
||||
<constant>SD_PATH_MODULES_LOAD_DIR</constant>,
|
||||
<constant>SD_PATH_CATALOG_DIR</constant>,
|
||||
<constant>SD_PATH_TMPFILES</constant>,
|
||||
<constant>SD_PATH_SYSUSERS</constant>,
|
||||
<constant>SD_PATH_SYSCTL</constant>,
|
||||
<constant>SD_PATH_BINFMT</constant>,
|
||||
<constant>SD_PATH_MODULES_LOAD</constant>,
|
||||
<constant>SD_PATH_CATALOG</constant>,
|
||||
|
||||
<constant>SD_PATH_SYSTEMD_NETWORK_PATH</constant>,
|
||||
<constant>SD_PATH_SYSTEMD_SEARCH_NETWORK</constant>,
|
||||
};</funcsynopsisinfo>
|
||||
|
||||
<funcprototype>
|
||||
|
@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
|
||||
tmpfiles_dir=${prefix}/lib/tmpfiles.d
|
||||
tmpfilesdir=${tmpfiles_dir}
|
||||
|
||||
sysusers_dir=${prefix}/lib/sysusers.d
|
||||
sysusers_dir=${rootprefix}/lib/sysusers.d
|
||||
sysusersdir=${sysusers_dir}
|
||||
|
||||
sysctl_dir=${prefix}/lib/sysctl.d
|
||||
sysctl_dir=${rootprefix}/lib/sysctl.d
|
||||
sysctldir=${sysctl_dir}
|
||||
|
||||
binfmt_dir=${prefix}/lib/binfmt.d
|
||||
binfmt_dir=${rootprefix}/lib/binfmt.d
|
||||
binfmtdir=${binfmt_dir}
|
||||
|
||||
modules_load_dir=${prefix}/lib/modules-load.d
|
||||
modules_load_dir=${rootprefix}/lib/modules-load.d
|
||||
modulesloaddir=${modules_load_dir}
|
||||
|
||||
catalog_dir=${prefix}/lib/systemd/catalog
|
||||
|
@ -320,73 +320,73 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
case SD_PATH_USER_DESKTOP:
|
||||
return from_user_dir("XDG_DESKTOP_DIR", buffer, ret);
|
||||
|
||||
case SD_PATH_SYSTEMD_UTIL_DIR:
|
||||
*ret = ROOTPREFIX "lib/systemd";
|
||||
case SD_PATH_SYSTEMD_UTIL:
|
||||
*ret = ROOTPREFIX "/lib/systemd";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_UNIT_DIR:
|
||||
case SD_PATH_SYSTEMD_SYSTEM_UNIT:
|
||||
*ret = SYSTEM_DATA_UNIT_PATH;
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_PRESET_DIR:
|
||||
*ret = ROOTPREFIX "lib/systemd/system-preset";
|
||||
case SD_PATH_SYSTEMD_SYSTEM_PRESET:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-preset";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_UNIT_DIR:
|
||||
case SD_PATH_SYSTEMD_USER_UNIT:
|
||||
*ret = USER_DATA_UNIT_DIR;
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_PRESET_DIR:
|
||||
*ret = ROOTPREFIX "lib/systemd/user-preset";
|
||||
case SD_PATH_SYSTEMD_USER_PRESET:
|
||||
*ret = ROOTPREFIX "/lib/systemd/user-preset";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_CONF_DIR:
|
||||
case SD_PATH_SYSTEMD_SYSTEM_CONF:
|
||||
*ret = SYSTEM_CONFIG_UNIT_DIR;
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_CONF_DIR:
|
||||
case SD_PATH_SYSTEMD_USER_CONF:
|
||||
*ret = USER_CONFIG_UNIT_DIR;
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_GENERATOR_DIR:
|
||||
case SD_PATH_SYSTEMD_SYSTEM_GENERATOR:
|
||||
*ret = SYSTEM_GENERATOR_DIR;
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_GENERATOR_DIR:
|
||||
case SD_PATH_SYSTEMD_USER_GENERATOR:
|
||||
*ret = USER_GENERATOR_DIR;
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SLEEP_DIR:
|
||||
*ret = ROOTPREFIX "lib/systemd/system-sleep";
|
||||
case SD_PATH_SYSTEMD_SLEEP:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-sleep";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SHUTDOWN_DIR:
|
||||
*ret = ROOTPREFIX "lib/systemd/system-shutdown";
|
||||
case SD_PATH_SYSTEMD_SHUTDOWN:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-shutdown";
|
||||
return 0;
|
||||
|
||||
/* FIXME: systemd.pc uses ${prefix}, but CONF_PATHS_NULSTR doesn't.
|
||||
* Should ${prefix} use in systemd.pc be removed? */
|
||||
case SD_PATH_TMPFILES_DIR:
|
||||
case SD_PATH_TMPFILES:
|
||||
*ret = "/usr/lib/tmpfiles.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSUSERS_DIR:
|
||||
*ret = "/usr/lib/sysusers.d";
|
||||
case SD_PATH_SYSUSERS:
|
||||
*ret = ROOTPREFIX "/lib/sysusers.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSCTL_DIR:
|
||||
*ret = "/usr/lib/sysctl.d";
|
||||
case SD_PATH_SYSCTL:
|
||||
*ret = ROOTPREFIX "/lib/sysctl.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_BINFMT_DIR:
|
||||
*ret = "/usr/lib/binfmt.d";
|
||||
case SD_PATH_BINFMT:
|
||||
*ret = ROOTPREFIX "/lib/binfmt.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_MODULES_LOAD_DIR:
|
||||
*ret = "/usr/lib/modules-load.d";
|
||||
case SD_PATH_MODULES_LOAD:
|
||||
*ret = ROOTPREFIX "/lib/modules-load.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_CATALOG_DIR:
|
||||
case SD_PATH_CATALOG:
|
||||
*ret = "/usr/lib/systemd/catalog";
|
||||
return 0;
|
||||
}
|
||||
@ -607,10 +607,10 @@ static int get_search(uint64_t type, char ***list) {
|
||||
case SD_PATH_SEARCH_BINARIES_DEFAULT:
|
||||
return strv_from_nulstr(list, DEFAULT_PATH_NULSTR);
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_UNIT_PATH:
|
||||
case SD_PATH_SYSTEMD_USER_UNIT_PATH: {
|
||||
case SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT:
|
||||
case SD_PATH_SYSTEMD_SEARCH_USER_UNIT: {
|
||||
_cleanup_(lookup_paths_free) LookupPaths lp = {};
|
||||
const UnitFileScope scope = type == SD_PATH_SYSTEMD_SYSTEM_UNIT_PATH ?
|
||||
const UnitFileScope scope = type == SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT ?
|
||||
UNIT_FILE_SYSTEM : UNIT_FILE_USER;
|
||||
|
||||
r = lookup_paths_init(&lp, scope, 0, NULL);
|
||||
@ -621,10 +621,10 @@ static int get_search(uint64_t type, char ***list) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_GENERATOR_PATH:
|
||||
case SD_PATH_SYSTEMD_USER_GENERATOR_PATH: {
|
||||
case SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR:
|
||||
case SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR: {
|
||||
char **t;
|
||||
const UnitFileScope scope = type == SD_PATH_SYSTEMD_SYSTEM_GENERATOR_PATH ?
|
||||
const UnitFileScope scope = type == SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR ?
|
||||
UNIT_FILE_SYSTEM : UNIT_FILE_USER;
|
||||
|
||||
t = generator_binary_paths(scope);
|
||||
@ -635,7 +635,7 @@ static int get_search(uint64_t type, char ***list) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
case SD_PATH_SYSTEMD_NETWORK_PATH:
|
||||
case SD_PATH_SYSTEMD_SEARCH_NETWORK:
|
||||
return strv_from_nulstr(list, NETWORK_DIRS_NULSTR);
|
||||
|
||||
}
|
||||
|
124
src/path/path.c
124
src/path/path.c
@ -18,71 +18,71 @@
|
||||
static const char *arg_suffix = NULL;
|
||||
|
||||
static const char* const path_table[_SD_PATH_MAX] = {
|
||||
[SD_PATH_TEMPORARY] = "temporary",
|
||||
[SD_PATH_TEMPORARY_LARGE] = "temporary-large",
|
||||
[SD_PATH_SYSTEM_BINARIES] = "system-binaries",
|
||||
[SD_PATH_SYSTEM_INCLUDE] = "system-include",
|
||||
[SD_PATH_SYSTEM_LIBRARY_PRIVATE] = "system-library-private",
|
||||
[SD_PATH_SYSTEM_LIBRARY_ARCH] = "system-library-arch",
|
||||
[SD_PATH_SYSTEM_SHARED] = "system-shared",
|
||||
[SD_PATH_SYSTEM_CONFIGURATION_FACTORY] = "system-configuration-factory",
|
||||
[SD_PATH_SYSTEM_STATE_FACTORY] = "system-state-factory",
|
||||
[SD_PATH_SYSTEM_CONFIGURATION] = "system-configuration",
|
||||
[SD_PATH_SYSTEM_RUNTIME] = "system-runtime",
|
||||
[SD_PATH_SYSTEM_RUNTIME_LOGS] = "system-runtime-logs",
|
||||
[SD_PATH_SYSTEM_STATE_PRIVATE] = "system-state-private",
|
||||
[SD_PATH_SYSTEM_STATE_LOGS] = "system-state-logs",
|
||||
[SD_PATH_SYSTEM_STATE_CACHE] = "system-state-cache",
|
||||
[SD_PATH_SYSTEM_STATE_SPOOL] = "system-state-spool",
|
||||
[SD_PATH_USER_BINARIES] = "user-binaries",
|
||||
[SD_PATH_USER_LIBRARY_PRIVATE] = "user-library-private",
|
||||
[SD_PATH_USER_LIBRARY_ARCH] = "user-library-arch",
|
||||
[SD_PATH_USER_SHARED] = "user-shared",
|
||||
[SD_PATH_USER_CONFIGURATION] = "user-configuration",
|
||||
[SD_PATH_USER_RUNTIME] = "user-runtime",
|
||||
[SD_PATH_USER_STATE_CACHE] = "user-state-cache",
|
||||
[SD_PATH_USER] = "user",
|
||||
[SD_PATH_USER_DOCUMENTS] = "user-documents",
|
||||
[SD_PATH_USER_MUSIC] = "user-music",
|
||||
[SD_PATH_USER_PICTURES] = "user-pictures",
|
||||
[SD_PATH_USER_VIDEOS] = "user-videos",
|
||||
[SD_PATH_USER_DOWNLOAD] = "user-download",
|
||||
[SD_PATH_USER_PUBLIC] = "user-public",
|
||||
[SD_PATH_USER_TEMPLATES] = "user-templates",
|
||||
[SD_PATH_USER_DESKTOP] = "user-desktop",
|
||||
[SD_PATH_SEARCH_BINARIES] = "search-binaries",
|
||||
[SD_PATH_SEARCH_BINARIES_DEFAULT] = "search-binaries-default",
|
||||
[SD_PATH_SEARCH_LIBRARY_PRIVATE] = "search-library-private",
|
||||
[SD_PATH_SEARCH_LIBRARY_ARCH] = "search-library-arch",
|
||||
[SD_PATH_SEARCH_SHARED] = "search-shared",
|
||||
[SD_PATH_SEARCH_CONFIGURATION_FACTORY] = "search-configuration-factory",
|
||||
[SD_PATH_SEARCH_STATE_FACTORY] = "search-state-factory",
|
||||
[SD_PATH_SEARCH_CONFIGURATION] = "search-configuration",
|
||||
[SD_PATH_TEMPORARY] = "temporary",
|
||||
[SD_PATH_TEMPORARY_LARGE] = "temporary-large",
|
||||
[SD_PATH_SYSTEM_BINARIES] = "system-binaries",
|
||||
[SD_PATH_SYSTEM_INCLUDE] = "system-include",
|
||||
[SD_PATH_SYSTEM_LIBRARY_PRIVATE] = "system-library-private",
|
||||
[SD_PATH_SYSTEM_LIBRARY_ARCH] = "system-library-arch",
|
||||
[SD_PATH_SYSTEM_SHARED] = "system-shared",
|
||||
[SD_PATH_SYSTEM_CONFIGURATION_FACTORY] = "system-configuration-factory",
|
||||
[SD_PATH_SYSTEM_STATE_FACTORY] = "system-state-factory",
|
||||
[SD_PATH_SYSTEM_CONFIGURATION] = "system-configuration",
|
||||
[SD_PATH_SYSTEM_RUNTIME] = "system-runtime",
|
||||
[SD_PATH_SYSTEM_RUNTIME_LOGS] = "system-runtime-logs",
|
||||
[SD_PATH_SYSTEM_STATE_PRIVATE] = "system-state-private",
|
||||
[SD_PATH_SYSTEM_STATE_LOGS] = "system-state-logs",
|
||||
[SD_PATH_SYSTEM_STATE_CACHE] = "system-state-cache",
|
||||
[SD_PATH_SYSTEM_STATE_SPOOL] = "system-state-spool",
|
||||
[SD_PATH_USER_BINARIES] = "user-binaries",
|
||||
[SD_PATH_USER_LIBRARY_PRIVATE] = "user-library-private",
|
||||
[SD_PATH_USER_LIBRARY_ARCH] = "user-library-arch",
|
||||
[SD_PATH_USER_SHARED] = "user-shared",
|
||||
[SD_PATH_USER_CONFIGURATION] = "user-configuration",
|
||||
[SD_PATH_USER_RUNTIME] = "user-runtime",
|
||||
[SD_PATH_USER_STATE_CACHE] = "user-state-cache",
|
||||
[SD_PATH_USER] = "user",
|
||||
[SD_PATH_USER_DOCUMENTS] = "user-documents",
|
||||
[SD_PATH_USER_MUSIC] = "user-music",
|
||||
[SD_PATH_USER_PICTURES] = "user-pictures",
|
||||
[SD_PATH_USER_VIDEOS] = "user-videos",
|
||||
[SD_PATH_USER_DOWNLOAD] = "user-download",
|
||||
[SD_PATH_USER_PUBLIC] = "user-public",
|
||||
[SD_PATH_USER_TEMPLATES] = "user-templates",
|
||||
[SD_PATH_USER_DESKTOP] = "user-desktop",
|
||||
[SD_PATH_SEARCH_BINARIES] = "search-binaries",
|
||||
[SD_PATH_SEARCH_BINARIES_DEFAULT] = "search-binaries-default",
|
||||
[SD_PATH_SEARCH_LIBRARY_PRIVATE] = "search-library-private",
|
||||
[SD_PATH_SEARCH_LIBRARY_ARCH] = "search-library-arch",
|
||||
[SD_PATH_SEARCH_SHARED] = "search-shared",
|
||||
[SD_PATH_SEARCH_CONFIGURATION_FACTORY] = "search-configuration-factory",
|
||||
[SD_PATH_SEARCH_STATE_FACTORY] = "search-state-factory",
|
||||
[SD_PATH_SEARCH_CONFIGURATION] = "search-configuration",
|
||||
|
||||
[SD_PATH_SYSTEMD_UTIL_DIR] = "systemd-util-dir",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_UNIT_DIR] = "systemd-system-unit-dir",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_PRESET_DIR] = "systemd-system-preset-dir",
|
||||
[SD_PATH_SYSTEMD_USER_UNIT_DIR] = "systemd-user-unit-dir",
|
||||
[SD_PATH_SYSTEMD_USER_PRESET_DIR] = "systemd-user-preset-dir",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_CONF_DIR] = "systemd-system-conf-dir",
|
||||
[SD_PATH_SYSTEMD_USER_CONF_DIR] = "systemd-user-conf-dir",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_UNIT_PATH] = "systemd-system-unit-path",
|
||||
[SD_PATH_SYSTEMD_USER_UNIT_PATH] = "systemd-user-unit-path",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_GENERATOR_DIR] = "systemd-system-generator-dir",
|
||||
[SD_PATH_SYSTEMD_USER_GENERATOR_DIR] = "systemd-user-generator-dir",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_GENERATOR_PATH] = "systemd-system-generator-path",
|
||||
[SD_PATH_SYSTEMD_USER_GENERATOR_PATH] = "systemd-user-generator-path",
|
||||
[SD_PATH_SYSTEMD_SLEEP_DIR] = "systemd-sleep-dir",
|
||||
[SD_PATH_SYSTEMD_SHUTDOWN_DIR] = "systemd-shutdown-dir",
|
||||
[SD_PATH_SYSTEMD_UTIL] = "systemd-util",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_UNIT] = "systemd-system-unit",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_PRESET] = "systemd-system-preset",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_CONF] = "systemd-system-conf",
|
||||
[SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT] = "systemd-system-unit",
|
||||
[SD_PATH_SYSTEMD_SYSTEM_GENERATOR] = "systemd-system-generator",
|
||||
[SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR] = "systemd-system-generator",
|
||||
[SD_PATH_SYSTEMD_USER_UNIT] = "systemd-user-unit",
|
||||
[SD_PATH_SYSTEMD_USER_PRESET] = "systemd-user-preset",
|
||||
[SD_PATH_SYSTEMD_USER_CONF] = "systemd-user-conf",
|
||||
[SD_PATH_SYSTEMD_SEARCH_USER_UNIT] = "systemd-user-unit",
|
||||
[SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR] = "systemd-user-generator",
|
||||
[SD_PATH_SYSTEMD_USER_GENERATOR] = "systemd-user-generator",
|
||||
[SD_PATH_SYSTEMD_SLEEP] = "systemd-sleep",
|
||||
[SD_PATH_SYSTEMD_SHUTDOWN] = "systemd-shutdown",
|
||||
|
||||
[SD_PATH_TMPFILES_DIR] = "tmpfiles-dir",
|
||||
[SD_PATH_SYSUSERS_DIR] = "sysusers-dir",
|
||||
[SD_PATH_SYSCTL_DIR] = "sysctl-dir",
|
||||
[SD_PATH_BINFMT_DIR] = "binfmt-dir",
|
||||
[SD_PATH_MODULES_LOAD_DIR] = "modules-load-dir",
|
||||
[SD_PATH_CATALOG_DIR] = "catalog-dir",
|
||||
[SD_PATH_TMPFILES] = "tmpfiles",
|
||||
[SD_PATH_SYSUSERS] = "sysusers",
|
||||
[SD_PATH_SYSCTL] = "sysctl",
|
||||
[SD_PATH_BINFMT] = "binfmt",
|
||||
[SD_PATH_MODULES_LOAD] = "modules-load",
|
||||
[SD_PATH_CATALOG] = "catalog",
|
||||
|
||||
[SD_PATH_SYSTEMD_NETWORK_PATH] = "systemd-network-path",
|
||||
[SD_PATH_SYSTEMD_SEARCH_NETWORK] = "systemd-search-network",
|
||||
};
|
||||
|
||||
static int list_homes(void) {
|
||||
|
@ -78,32 +78,37 @@ enum {
|
||||
SD_PATH_SEARCH_STATE_FACTORY,
|
||||
SD_PATH_SEARCH_CONFIGURATION,
|
||||
|
||||
/* Various systemd paths, generally mirroring systemd.pc */
|
||||
SD_PATH_SYSTEMD_UTIL_DIR,
|
||||
SD_PATH_SYSTEMD_SYSTEM_UNIT_DIR,
|
||||
SD_PATH_SYSTEMD_SYSTEM_PRESET_DIR,
|
||||
SD_PATH_SYSTEMD_USER_UNIT_DIR,
|
||||
SD_PATH_SYSTEMD_USER_PRESET_DIR,
|
||||
SD_PATH_SYSTEMD_SYSTEM_CONF_DIR,
|
||||
SD_PATH_SYSTEMD_USER_CONF_DIR,
|
||||
SD_PATH_SYSTEMD_SYSTEM_UNIT_PATH,
|
||||
SD_PATH_SYSTEMD_USER_UNIT_PATH,
|
||||
SD_PATH_SYSTEMD_SYSTEM_GENERATOR_DIR,
|
||||
SD_PATH_SYSTEMD_USER_GENERATOR_DIR,
|
||||
SD_PATH_SYSTEMD_SYSTEM_GENERATOR_PATH,
|
||||
SD_PATH_SYSTEMD_USER_GENERATOR_PATH,
|
||||
SD_PATH_SYSTEMD_SLEEP_DIR,
|
||||
SD_PATH_SYSTEMD_SHUTDOWN_DIR,
|
||||
/* Various systemd paths, generally mirroring systemd.pc — Except we drop the "dir" suffix (and
|
||||
* replaces "path" by "search"), since this API is about dirs/paths anyway, and contains "path"
|
||||
* already in the prefix */
|
||||
SD_PATH_SYSTEMD_UTIL,
|
||||
SD_PATH_SYSTEMD_SYSTEM_UNIT,
|
||||
SD_PATH_SYSTEMD_SYSTEM_PRESET,
|
||||
SD_PATH_SYSTEMD_SYSTEM_CONF,
|
||||
SD_PATH_SYSTEMD_USER_UNIT,
|
||||
SD_PATH_SYSTEMD_USER_PRESET,
|
||||
SD_PATH_SYSTEMD_USER_CONF,
|
||||
|
||||
SD_PATH_TMPFILES_DIR,
|
||||
SD_PATH_SYSUSERS_DIR,
|
||||
SD_PATH_SYSCTL_DIR,
|
||||
SD_PATH_BINFMT_DIR,
|
||||
SD_PATH_MODULES_LOAD_DIR,
|
||||
SD_PATH_CATALOG_DIR,
|
||||
SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT,
|
||||
SD_PATH_SYSTEMD_SEARCH_USER_UNIT,
|
||||
|
||||
SD_PATH_SYSTEMD_SYSTEM_GENERATOR,
|
||||
SD_PATH_SYSTEMD_USER_GENERATOR,
|
||||
SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR,
|
||||
SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR,
|
||||
|
||||
SD_PATH_SYSTEMD_SLEEP,
|
||||
SD_PATH_SYSTEMD_SHUTDOWN,
|
||||
|
||||
SD_PATH_TMPFILES,
|
||||
SD_PATH_SYSUSERS,
|
||||
SD_PATH_SYSCTL,
|
||||
SD_PATH_BINFMT,
|
||||
SD_PATH_MODULES_LOAD,
|
||||
SD_PATH_CATALOG,
|
||||
|
||||
/* systemd-networkd search paths */
|
||||
SD_PATH_SYSTEMD_NETWORK_PATH,
|
||||
SD_PATH_SYSTEMD_SEARCH_NETWORK,
|
||||
|
||||
_SD_PATH_MAX,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user