diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-25 18:59:39 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-17 17:58:35 +0200 |
commit | 5de3db0016e2a97b779abe27be5e7326ec1b78aa (patch) | |
tree | 9c59c33ff536b589e4abd8e3e84feb2712fbc399 /src/basic/fs-util.h | |
parent | ed280b715fc427a925d418adc8ec0cfaa395f526 (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 de4bb861e..d58b14801 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -90,5 +90,6 @@ 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); #endif // 0 +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); |