direct IO + fixes
diff --git a/lib/fuse.c b/lib/fuse.c
index 4cd8915..0b7da30 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -1061,6 +1061,7 @@
{
int res;
char *path;
+ struct fuse_write_out outarg;
res = -ENOENT;
path = get_path(f, in->ino);
@@ -1076,17 +1077,12 @@
free(path);
}
- if (res > 0) {
- if ((size_t) res != arg->size) {
- fprintf(stderr, "short write: %u (should be %u)\n", res,
- arg->size);
- res = -EINVAL;
- }
- else
- res = 0;
+ if (res >= 0) {
+ outarg.size = res;
+ res = 0;
}
- send_reply(f, in, res, NULL, 0);
+ send_reply(f, in, res, &outarg, sizeof(outarg));
}
static int default_statfs(struct statfs *buf)