summaryrefslogtreecommitdiff
path: root/src/basic/fs-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-11-29 16:49:30 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-01 00:25:51 +0100
commitc4f4fce79e157800212f3cba1b21870097030e81 (patch)
treef5ef8b7fb1d3b6de637570ee3ddb1157e151b87e /src/basic/fs-util.h
parenta4eaf3cf822dae1d076dfc98afc3ab0d53871dac (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.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 2d039e3b98..ee3d6bf7af 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -78,5 +78,8 @@ union inotify_event_buffer {
int inotify_add_watch_fd(int fd, int what, uint32_t mask);
-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);