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/chase.h | |
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/chase.h')
-rw-r--r-- | src/basic/chase.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/chase.h b/src/basic/chase.h index 40121f7d70..f37e836822 100644 --- a/src/basic/chase.h +++ b/src/basic/chase.h @@ -42,6 +42,8 @@ bool unsafe_transition(const struct stat *a, const struct stat *b); int chase(const char *path_with_prefix, const char *root, ChaseFlags chase_flags, char **ret_path, int *ret_fd); +int chaseat_prefix_root(const char *path, const char *root, char **ret); + int chase_and_open(const char *path, const char *root, ChaseFlags chase_flags, int open_flags, char **ret_path); int chase_and_opendir(const char *path, const char *root, ChaseFlags chase_flags, char **ret_path, DIR **ret_dir); int chase_and_stat(const char *path, const char *root, ChaseFlags chase_flags, char **ret_path, struct stat *ret_stat); |