mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
sd-path: use ROOTPREFIX without suffixed slash
We already have rootprefix_noslash as meson variable, export it so that we can also use it in C code. Fixes: #16773
This commit is contained in:
parent
7c5c59d4b1
commit
b612c26ceb
@ -230,6 +230,7 @@ conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbin
|
||||
conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
|
||||
conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge'))
|
||||
conf.set_quoted('ROOTPREFIX', rootprefixdir)
|
||||
conf.set_quoted('ROOTPREFIX_NOSLASH', rootprefixdir_noslash)
|
||||
conf.set_quoted('RANDOM_SEED_DIR', randomseeddir)
|
||||
conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
|
||||
conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', join_paths(rootlibexecdir, 'systemd-cryptsetup'))
|
||||
|
@ -321,7 +321,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return from_user_dir("XDG_DESKTOP_DIR", buffer, ret);
|
||||
|
||||
case SD_PATH_SYSTEMD_UTIL:
|
||||
*ret = ROOTPREFIX "/lib/systemd";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_UNIT:
|
||||
@ -329,7 +329,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_PRESET:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-preset";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/system-preset";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_UNIT:
|
||||
@ -337,7 +337,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_USER_PRESET:
|
||||
*ret = ROOTPREFIX "/lib/systemd/user-preset";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/user-preset";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SYSTEM_CONF:
|
||||
@ -357,11 +357,11 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SLEEP:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-sleep";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/system-sleep";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSTEMD_SHUTDOWN:
|
||||
*ret = ROOTPREFIX "/lib/systemd/system-shutdown";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/systemd/system-shutdown";
|
||||
return 0;
|
||||
|
||||
/* FIXME: systemd.pc uses ${prefix}, but CONF_PATHS_NULSTR doesn't.
|
||||
@ -371,19 +371,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSUSERS:
|
||||
*ret = ROOTPREFIX "/lib/sysusers.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/sysusers.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_SYSCTL:
|
||||
*ret = ROOTPREFIX "/lib/sysctl.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/sysctl.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_BINFMT:
|
||||
*ret = ROOTPREFIX "/lib/binfmt.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/binfmt.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_MODULES_LOAD:
|
||||
*ret = ROOTPREFIX "/lib/modules-load.d";
|
||||
*ret = ROOTPREFIX_NOSLASH "/lib/modules-load.d";
|
||||
return 0;
|
||||
|
||||
case SD_PATH_CATALOG:
|
||||
|
Loading…
Reference in New Issue
Block a user