From: Miklos S. <mi...@sz...> - 2011-12-06 13:46:40
|
On Tue, Dec 6, 2011 at 2:19 PM, Goswin von Brederlow <gos...@we...> wrote: > John Muir <jo...@jm...> writes: > >> On 2011.12.05, at 23:09 , Goswin von Brederlow wrote: >> >> >> when I run "cat file" fuse reads in the file in nice big 128k chunks up >> to the size of the file (which happens to be a multiple to 128k). But >> then fuse does one more read of 4096 byte beyond the end of the file. >> >> What am I supposed/allowed to return then in the lowlevel interface? >> >> >> 1) fuse_reply_buf(req, buf, 0); >> >> 2) fuse_reply_buf(req, NULL, 0); >> 3) fuse_reply_err(req, ESUCCESS); All three are good and the actual reply on the fuse device will be the same for all of those cases (see the implementation of fuse_reply_buf() and fuse_reply_err() in lib/fuse_lowlevel.c). I'd probably choose 2). And yes, it will always work and it should be documented. Thanks, Miklos |