aboutsummaryrefslogtreecommitdiff
path: root/include/fuse.h
diff options
context:
space:
mode:
authorJean-Pierre André <jpandre@users.noreply.github.com>2019-03-11 18:35:23 +0100
committerNikolaus Rath <Nikolaus@rath.org>2019-03-11 17:35:23 +0000
commita1bff7dbe3ad8950d8cf1b5640aa7a7b2e89211d (patch)
tree996c19b8cc1a98b987c762fc6d931af884a84a2d /include/fuse.h
parentb1b06d1920f7163a54e4b30e120cb52fda0cb9f9 (diff)
downloadlibfuse-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 'include/fuse.h')
-rw-r--r--include/fuse.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 4f7131b..3e8aa20 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -677,8 +677,11 @@ struct fuse_operations {
*
* If flags has FUSE_IOCTL_DIR then the fuse_file_info refers to a
* directory file handle.
+ *
+ * Note : the unsigned long request submitted by the application
+ * is truncated to 32 bits.
*/
- int (*ioctl) (const char *, int cmd, void *arg,
+ int (*ioctl) (const char *, unsigned int cmd, void *arg,
struct fuse_file_info *, unsigned int flags, void *data);
/**
@@ -1182,8 +1185,9 @@ int fuse_fs_removexattr(struct fuse_fs *fs, const char *path,
const char *name);
int fuse_fs_bmap(struct fuse_fs *fs, const char *path, size_t blocksize,
uint64_t *idx);
-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);
int fuse_fs_poll(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi, struct fuse_pollhandle *ph,
unsigned *reventsp);