diff options
Diffstat (limited to 'example/fusexmp_fh.c')
-rw-r--r-- | example/fusexmp_fh.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/example/fusexmp_fh.c b/example/fusexmp_fh.c index 2f4b187..764ba91 100644 --- a/example/fusexmp_fh.c +++ b/example/fusexmp_fh.c @@ -33,6 +33,20 @@ static int xmp_getattr(const char *path, struct stat *stbuf) return 0; } +static int xmp_fgetattr(const char *path, struct stat *stbuf, + struct fuse_file_info *fi) +{ + int res; + + (void) path; + + res = fstat(fi->fh, stbuf); + if(res == -1) + return -errno; + + return 0; +} + static int xmp_access(const char *path, int mask) { int res; @@ -353,6 +367,7 @@ static int xmp_removexattr(const char *path, const char *name) static struct fuse_operations xmp_oper = { .getattr = xmp_getattr, + .fgetattr = xmp_fgetattr, .access = xmp_access, .readlink = xmp_readlink, .opendir = xmp_opendir, |