aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorizxl007 <zeng.zheng@zte.com.cn>2025-06-22 20:00:39 +0800
committerBernd Schubert <bernd@bsbernd.com>2025-06-22 18:15:28 +0200
commitabd0a98485756caad5e7297669f8788c167b6b2b (patch)
tree9e21c246da32640335c84ac4e6b4f6d588e00ae1
parent43e36ffed84f73528b67ca1835760bf5895c9d60 (diff)
downloadlibfuse-abd0a98485756caad5e7297669f8788c167b6b2b.tar.gz
Clarify offset field is signed despite uint64_t type
Add comment noting that the uint64_t offset in fuse_lseek_in is derived from kernel loff_t and should be treated as signed for negative offsets. Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
-rw-r--r--lib/fuse_lowlevel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 13c05c6..8ddc288 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2402,6 +2402,10 @@ static void do_copy_file_range(fuse_req_t req, const fuse_ino_t nodeid_in,
_do_copy_file_range(req, nodeid_in, inarg, NULL);
}
+/*
+ * Note that the uint64_t offset in struct fuse_lseek_in is derived from
+ * linux kernel loff_t and is therefore signed.
+ */
static void _do_lseek(fuse_req_t req, const fuse_ino_t nodeid,
const void *op_in, const void *in_payload)
{