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.
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user