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.
This commit is contained in:
Lennart Poettering
2016-12-01 00:25:51 +01:00
parent 4da92e5857
commit fc4b68e557
2 changed files with 24 additions and 4 deletions
+2 -1
View File
@@ -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);