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. --- example/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example') diff --git a/example/ioctl.c b/example/ioctl.c index 75991d7..eab3061 100644 --- a/example/ioctl.c +++ b/example/ioctl.c @@ -188,7 +188,7 @@ static int fioc_readdir(const char *path, void *buf, fuse_fill_dir_t filler, return 0; } -static int fioc_ioctl(const char *path, int cmd, void *arg, +static int fioc_ioctl(const char *path, unsigned int cmd, void *arg, struct fuse_file_info *fi, unsigned int flags, void *data) { (void) arg; -- cgit v1.2.3