diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-18 00:09:54 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-19 03:38:59 +0900 |
commit | 60e761d8f3e14ebbadb26f2e2ca2c225f97660ef (patch) | |
tree | e3f14f1e8428ce6bbaa7732e703d07513754d238 /src/basic/os-util.c | |
parent | 8d3c49b1680a20ae5d157baa4adaa59c1ea33519 (diff) | |
download | systemd-60e761d8f3e14ebbadb26f2e2ca2c225f97660ef.tar.gz |
chase: replace path_prefix_root_cwd() with chaseat_prefix_root()
The function path_prefix_root_cwd() was introduced for prefixing the
result from chaseat() with root, but
- it is named slightly generic,
- the logic is different from what chase() does.
This makes the name more explanative and specific for the result of the
chaseat(), and make the logic consistent with chase().
Fixes https://github.com/systemd/systemd/pull/27199#issuecomment-1511387731.
Follow-up for #27199.
Diffstat (limited to 'src/basic/os-util.c')
-rw-r--r-- | src/basic/os-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/os-util.c b/src/basic/os-util.c index dd8faf2376..5d06e20871 100644 --- a/src/basic/os-util.c +++ b/src/basic/os-util.c @@ -155,7 +155,7 @@ int open_os_release(const char *root, char **ret_path, int *ret_fd) { return r; if (ret_path) { - r = path_prefix_root_cwd(p, root, ret_path); + r = chaseat_prefix_root(p, root, ret_path); if (r < 0) return r; } @@ -292,7 +292,7 @@ int open_extension_release( return r; if (ret_path) { - r = path_prefix_root_cwd(p, root, ret_path); + r = chaseat_prefix_root(p, root, ret_path); if (r < 0) return r; } |