diff options
author | 2004-07-02 09:22:50 +0000 | |
---|---|---|
committer | 2004-07-02 09:22:50 +0000 | |
commit | ad051c3e27ca6dd57dad57eb188dbcdcfab775fe (patch) | |
tree | bdee0dd43c6d75dcff037de88d3e3679a0ab34f7 /lib | |
parent | 65cf7c7deb7a98dc31beb39db3c1ae1cba45b69f (diff) |
direct IO + fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1061,6 +1061,7 @@ static void do_write(struct fuse *f, struct fuse_in_header *in, { int res; char *path; + struct fuse_write_out outarg; res = -ENOENT; path = get_path(f, in->ino); @@ -1076,17 +1077,12 @@ static void do_write(struct fuse *f, struct fuse_in_header *in, 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) |