diff options
author | Jean-Pierre André <jpandre@users.noreply.github.com> | 2019-03-11 18:35:23 +0100 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2019-03-11 17:35:23 +0000 |
commit | a1bff7dbe3ad8950d8cf1b5640aa7a7b2e89211d (patch) | |
tree | 996c19b8cc1a98b987c762fc6d931af884a84a2d /lib | |
parent | b1b06d1920f7163a54e4b30e120cb52fda0cb9f9 (diff) | |
download | libfuse-a1bff7dbe3ad8950d8cf1b5640aa7a7b2e89211d.tar.gz |
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.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/fuse.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2304,8 +2304,9 @@ int fuse_fs_removexattr(struct fuse_fs *fs, const char *path, const char *name) } } -int fuse_fs_ioctl(struct fuse_fs *fs, const char *path, int cmd, void *arg, - struct fuse_file_info *fi, unsigned int flags, void *data) +int fuse_fs_ioctl(struct fuse_fs *fs, const char *path, unsigned int cmd, + void *arg, struct fuse_file_info *fi, unsigned int flags, + void *data) { fuse_get_context()->private_data = fs->user_data; if (fs->op.ioctl) { @@ -4222,10 +4223,10 @@ static void fuse_lib_bmap(fuse_req_t req, fuse_ino_t ino, size_t blocksize, reply_err(req, err); } -static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, - struct fuse_file_info *llfi, unsigned int flags, - const void *in_buf, size_t in_bufsz, - size_t out_bufsz) +static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, unsigned int cmd, + void *arg, struct fuse_file_info *llfi, + unsigned int flags, const void *in_buf, + size_t in_bufsz, size_t out_bufsz) { struct fuse *f = req_fuse_prepare(req); struct fuse_intr_data d; |