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:
+2
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user