From: John M. <jo...@jm...> - 2011-12-06 09:56:08
|
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); Use 1. Why wouldn't you always return the number of bytes available at the offset requested into a valid buffer? Doesn't that make your code simpler? I wouldn't think it is safe to assume that 2 will always work unless the interface documentation makes it explicitly allowed. John. -- John Muir - jo...@jm... |