aboutsummaryrefslogtreecommitdiffstats
path: root/example/passthrough.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/passthrough.c')
-rw-r--r--example/passthrough.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/example/passthrough.c b/example/passthrough.c
index a5ac4b3..7e5c9aa 100644
--- a/example/passthrough.c
+++ b/example/passthrough.c
@@ -399,7 +399,6 @@ static int xmp_fsync(const char *path, int isdatasync,
return 0;
}
-#ifdef HAVE_POSIX_FALLOCATE
static int xmp_fallocate(const char *path, int mode,
off_t offset, off_t length, struct fuse_file_info *fi)
{
@@ -408,9 +407,6 @@ static int xmp_fallocate(const char *path, int mode,
(void) fi;
- if (mode)
- return -EOPNOTSUPP;
-
if(fi == NULL)
fd = open(path, O_WRONLY);
else
@@ -419,13 +415,12 @@ static int xmp_fallocate(const char *path, int mode,
if (fd == -1)
return -errno;
- res = -posix_fallocate(fd, offset, length);
+ res = do_fallocate(fd, mode, offset, length);
if(fi == NULL)
close(fd);
return res;
}
-#endif
#ifdef HAVE_SETXATTR
/* xattr operations are optional and can safely be left unimplemented */
@@ -554,9 +549,7 @@ static const struct fuse_operations xmp_oper = {
.statfs = xmp_statfs,
.release = xmp_release,
.fsync = xmp_fsync,
-#ifdef HAVE_POSIX_FALLOCATE
.fallocate = xmp_fallocate,
-#endif
#ifdef HAVE_SETXATTR
.setxattr = xmp_setxattr,
.getxattr = xmp_getxattr,