From 73b6ff4b75cf1228ea61262c293fcb2fda5dfeea Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sat, 15 Oct 2016 18:46:27 -0700 Subject: Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlers This obsoletes the ftruncate & fgetattr handlers. Fixes #58. --- example/passthrough.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'example/passthrough.c') diff --git a/example/passthrough.c b/example/passthrough.c index cf72cb2..d3d0fde 100644 --- a/example/passthrough.c +++ b/example/passthrough.c @@ -48,8 +48,10 @@ #include #endif -static int xmp_getattr(const char *path, struct stat *stbuf) +static int xmp_getattr(const char *path, struct stat *stbuf, + struct fuse_file_info *fi) { + (void) fi; int res; res = lstat(path, stbuf); @@ -200,8 +202,10 @@ static int xmp_link(const char *from, const char *to) return 0; } -static int xmp_chmod(const char *path, mode_t mode) +static int xmp_chmod(const char *path, mode_t mode, + struct fuse_file_info *fi) { + (void) fi; int res; res = chmod(path, mode); @@ -211,8 +215,10 @@ static int xmp_chmod(const char *path, mode_t mode) return 0; } -static int xmp_chown(const char *path, uid_t uid, gid_t gid) +static int xmp_chown(const char *path, uid_t uid, gid_t gid, + struct fuse_file_info *fi) { + (void) fi; int res; res = lchown(path, uid, gid); @@ -222,8 +228,10 @@ static int xmp_chown(const char *path, uid_t uid, gid_t gid) return 0; } -static int xmp_truncate(const char *path, off_t size) +static int xmp_truncate(const char *path, off_t size, + struct fuse_file_info *fi) { + (void) fi; int res; res = truncate(path, size); @@ -234,8 +242,10 @@ static int xmp_truncate(const char *path, off_t size) } #ifdef HAVE_UTIMENSAT -static int xmp_utimens(const char *path, const struct timespec ts[2]) +static int xmp_utimens(const char *path, const struct timespec ts[2], + struct fuse_file_info *fi) { + (void) fi; int res; /* don't use utime/utimes since they follow symlinks */ -- cgit v1.2.3