From a1bff7dbe3ad8950d8cf1b5640aa7a7b2e89211d Mon Sep 17 00:00:00 2001 From: Jean-Pierre André Date: Mon, 11 Mar 2019 18:35:23 +0100 Subject: Defined the (*ioctl)() commands as unsigned int (#381) Instead of the Posix ioctl(2) command, Linux uses its own variant of ioctl() in which the commands are requested as "unsigned long" and truncated to 32 bits by the fuse kernel module. Transmitting the commands to user space file systems as "unsigned int" is a workaround for processing ioctl() commands which do not fit into a signed int. --- include/fuse_lowlevel.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/fuse_lowlevel.h') diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 68fd521..87c362a 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -1010,9 +1010,12 @@ struct fuse_lowlevel_ops { * @param in_buf data fetched from the caller * @param in_bufsz number of fetched bytes * @param out_bufsz maximum size of output data + * + * Note : the unsigned long request submitted by the application + * is truncated to 32 bits. */ - void (*ioctl) (fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, - struct fuse_file_info *fi, unsigned flags, + void (*ioctl) (fuse_req_t req, fuse_ino_t ino, unsigned int cmd, + void *arg, struct fuse_file_info *fi, unsigned flags, const void *in_buf, size_t in_bufsz, size_t out_bufsz); /** -- cgit v1.2.3