11 Commits

Author SHA1 Message Date
fangzhiyi18 bd5ee7c317 升级1.17.3
Signed-off-by: fangzhiyi18 <fangzhiyi1@h-partners.com>
2025-11-08 13:04:30 +08:00
psycho c99f6182b4 libfuse升级
Signed-off-by: psycho <wangmingxuan6@h-partners.com>
2024-01-09 09:19:42 +08:00
Zhiqiang Liu 3c5b51c359 buffer.c: correct return value when buf is NULL
In commit b95aba82 ("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: b95aba82 ("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>
2020-11-11 09:32:56 +00:00
Zhiqiang Liu b95aba823b buffer.c: check whether buf is NULL in fuse_bufvec_advance func
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>
2020-11-06 19:26:03 +00:00
Michael Forney 63c11456d4 Avoid pointer arithmetic with void *
The pointer operand to the binary `+` operator must be to a complete
object type. Since we are working with byte sizes, use `char *` instead.
2019-06-06 13:31:41 +01:00
Nikolaus Rath d968b4ddae Extended per-file comments.
This should make more clear what file contains code for what
purpose.
2016-10-02 21:20:44 -07:00
Miklos Szeredi 5568aa7cd5 Fix missing config.h in buffer.c
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
2012-08-24 15:18:19 +02:00
Miklos Szeredi 4a9f6ab480 Check if splice/vmsplice are supported 2011-05-27 12:12:31 +02:00
Miklos Szeredi 4367f2df50 fuse_buf_copy: check if buffers are the same
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.
2010-11-10 11:41:21 +01:00
Miklos Szeredi 7d878eb13a Fix fuse_buf_copy() if already at the end of the buffers 2010-11-08 16:06:37 +01:00
Miklos Szeredi 2709f9a53d libfuse: add buffer interface
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.
2010-07-12 17:17:25 +02:00