summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-08 22:33:40 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-11 18:49:23 +0900
commit5cf69e709eb928662f03944ac4064157784b0d76 (patch)
treece70545a987e8a47fe618b09e6c0261370c615dd /src/basic
parentf4a1d32c82489d2b734a3c266aa47ba697100312 (diff)
downloadsystemd-5cf69e709eb928662f03944ac4064157784b0d76.tar.gz
os-util: make $SYSTEMD_OS_RELEASE prefixed with the root directory
To make it consistent with other env vars, e.g. $SYSTEMD_ESP_PATH or $SYSTEMD_XBOOTLDR_PATH. This is useful when the root is specified by a file descriptor, instead of a path.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/os-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/os-util.c b/src/basic/os-util.c
index 16fe123ce6..0f123aaf82 100644
--- a/src/basic/os-util.c
+++ b/src/basic/os-util.c
@@ -128,7 +128,7 @@ int open_os_release(const char *root, char **ret_path, int *ret_fd) {
e = secure_getenv("SYSTEMD_OS_RELEASE");
if (e)
- return chase(e, root, 0, ret_path, ret_fd);
+ return chase(e, root, CHASE_PREFIX_ROOT, ret_path, ret_fd);
FOREACH_STRING(path, "/etc/os-release", "/usr/lib/os-release") {
r = chase(path, root, CHASE_PREFIX_ROOT, ret_path, ret_fd);