diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-29 16:49:30 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-17 17:58:35 +0200 |
commit | 8036e4d0b9ef0990597196155fe6fc6329a6a881 (patch) | |
tree | e662cbf4ab067c292ecd205a9d1cc04847dbaa41 /src/basic/fs-util.h | |
parent | 7b987da65ad4eacb30034519653a61457b688352 (diff) |
fs-util: add flags parameter to chase_symlinks()
Let's remove chase_symlinks_prefix() and instead introduce a flags parameter to
chase_symlinks(), with a flag CHASE_PREFIX_ROOT that exposes the behaviour of
chase_symlinks_prefix().
Diffstat (limited to 'src/basic/fs-util.h')
-rw-r--r-- | src/basic/fs-util.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index d58b14801..b5883b6c5 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -91,5 +91,8 @@ union inotify_event_buffer { int inotify_add_watch_fd(int fd, int what, uint32_t mask); #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); +enum { + CHASE_PREFIX_ROOT = 1, /* If set, the specified path will be prefixed by the specified root before beginning the iteration */ +}; + +int chase_symlinks(const char *path_with_prefix, const char *root, unsigned flags, char **ret); |