diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-25 18:59:39 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-01 00:25:51 +0100 |
commit | fc4b68e557307b04d42bcef3181fef00b7558177 (patch) | |
tree | a519f35aaa0bf72b04fbdc64391e120e78ae5583 /src/basic/fs-util.h | |
parent | 4da92e58570a8a864eb031ae372fc4a611e7faf1 (diff) |
fs-util: add chase_symlinks_prefix() and extend comments
chase_symlinks() currently expects a fully qualified, absolute path, relative
to the host's root as first argument. Which is useful in many ways, and similar
to the paths unlink(), rename(), open(), … expect. Sometimes it's however
useful to first prefix the specified path with the specified root directory.
Add a new call chase_symlinks_prefix() for this, that is a simple wrapper.
Diffstat (limited to 'src/basic/fs-util.h')
-rw-r--r-- | src/basic/fs-util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index 01c3301d71..2d039e3b98 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -78,4 +78,5 @@ union inotify_event_buffer { int inotify_add_watch_fd(int fd, int what, uint32_t mask); -int chase_symlinks(const char *path, const char *_root, char **ret); +int chase_symlinks(const char *path_with_prefix, const char *root, char **ret); +int chase_symlinks_prefix(const char *path_without_prefix, const char *root, char **ret); |