aboutsummaryrefslogtreecommitdiffstats
path: root/example/fusexmp_fh.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-07-15 18:02:19 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2014-07-15 18:02:19 +0200
commitb49cf754f9d2db3a426aeb6111fa94d90270fb93 (patch)
tree18aca31da248e19e1072e6c40d21cb198d05c5ac /example/fusexmp_fh.c
parent978d10a42b2cfccf6bfc4df1cfad480ac3bbcb3d (diff)
downloadlibfuse-b49cf754f9d2db3a426aeb6111fa94d90270fb93.tar.gz
libfuse: add flags to ->rename()
See renameat2() system call in linux-3.15 and later kernels.
Diffstat (limited to 'example/fusexmp_fh.c')
-rwxr-xr-xexample/fusexmp_fh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/example/fusexmp_fh.c b/example/fusexmp_fh.c
index 531438f..84fce3f 100755
--- a/example/fusexmp_fh.c
+++ b/example/fusexmp_fh.c
@@ -242,10 +242,14 @@ static int xmp_symlink(const char *from, const char *to)
return 0;
}
-static int xmp_rename(const char *from, const char *to)
+static int xmp_rename(const char *from, const char *to, unsigned int flags)
{
int res;
+ /* When we have renameat2() in libc, then we can implement flags */
+ if (flags)
+ return -EINVAL;
+
res = rename(from, to);
if (res == -1)
return -errno;