diff options
Diffstat (limited to 'example')
-rwxr-xr-x | example/fusexmp.c | 5 | ||||
-rwxr-xr-x | example/fusexmp_fh.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/example/fusexmp.c b/example/fusexmp.c index fe20f57..eae3562 100755 --- a/example/fusexmp.c +++ b/example/fusexmp.c @@ -172,10 +172,13 @@ 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; + if (flags) + return -EINVAL; + res = rename(from, to); if (res == -1) return -errno; 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; |