Age | Commit message (Collapse) | Author |
|
In commit d614415a ("buffer.c: check whether buf is
NULL in fuse_bufvec_advance func"), if fuse_bufvec_current
func returns NULL, it returns 1 directly. Actually,
we should return 0 when buf is NULL.
Fixes: d614415a ("buffer.c: check whether buf is NULL in fuse_bufvec_advance func")
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Haotian Li <lihaotian9@huawei.com>
|
|
In fuse_bufvec_advance func, calling fuse_bufvec_current func
may return NULL, so we should check whether buf is NULL before
using it.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Haotian Liu <lihaotian9@huawei.com>
|
|
The pointer operand to the binary `+` operator must be to a complete
object type. Since we are working with byte sizes, use `char *` instead.
|
|
This should make more clear what file contains code for what
purpose.
|
|
Due to an oversight, splice will never actually be used for i/o. Someone forgot
to #include "config.h" in lib/buffer.c (in fact almost no files include that
header). As a result, even though configure detects splice support and puts
HAVE_SPLICE in config.h, buffer.c is always compiled as if there is no splice
support.
Also add #include "config.h" to fuse.c and fuse_lowlevel.c. These currently
include it indirectly through fuse_misc.h, but we don't want to depend on that.
Reported by Matthew Gabeler-Lee
|
|
|
|
When copying fuse buffers, check if the source and destination are the
same and omit the copy as appropriate. Also check if the source and
destination memory regions overlap and use memmove in that case.
|
|
|
|
Add a generic buffer interface for use with I/O. Buffer vectors are
supplied and each buffer in the vector may be a memory pointer or a
file descriptor.
The fuse_reply_fd() interface is converted to using buffers.
|