summaryrefslogtreecommitdiffstats
path: root/src/basic/chase.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* chase: handle root path more carefully in chase_and_open()Yu Watanabe2023-06-051-0/+1
| | | | chase_and_open() may be called with relative root path.
* chase: replace path_prefix_root_cwd() with chaseat_prefix_root()Yu Watanabe2023-04-181-0/+2
| | | | | | | | | | | | | | 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.
* chase: CHASE_MKDIR_0755 requires CHASE_NONEXISTENT and/or CHASE_PARENTYu Watanabe2023-04-141-2/+8
| | | | | | | | | | When CHASE_MKDIR_0755 is specified without CHASE_NONEXISTENT and CHASE_PARENT, then chase() succeeds only when the file specified by the path already exists, and in that case, chase() does not create any parent directories, and CHASE_MKDIR_0755 is meaningless. Let's mention that CHASE_MKDIR_0755 needs to be specified with CHASE_NONEXISTENT or CHASE_PARENT, and adds a assertion about that.
* chase: extend comment about CHASE_PARENTYu Watanabe2023-04-101-2/+3
|
* chase-symlinks: Add chase_and_open_parent() + at() variantDaan De Meyer2023-03-261-0/+3
| | | | | Helper to chase a path, pin its parent directory and return the filename of the resolved path in its parent directory.
* chase-symlinks: Rename chase_symlinks() to chase()Daan De Meyer2023-03-241-0/+51
Chasing symlinks is a core function that's used in a lot of places so it deservers a less verbose names so let's rename it to chase() and chaseat(). We also slightly change the pattern used for the chaseat() helpers so we get chase_and_openat() and similar.