diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-12-22 09:41:33 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-12-22 09:41:33 +0000 |
commit | 76efdc2ae95fa6f5acf4396f02a8f43fcaf0ecea (patch) | |
tree | ecfda8afb0933d3fa4a92b401208166a654943ee /sys/fs | |
parent | 66012f316cf449bbffb7659ed9801b44f9e10a1b (diff) | |
download | FreeBSD-src-76efdc2ae95fa6f5acf4396f02a8f43fcaf0ecea.zip FreeBSD-src-76efdc2ae95fa6f5acf4396f02a8f43fcaf0ecea.tar.gz |
Make CUSE usable with platforms where the size of "unsigned long" is
different from the size of a pointer.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cuse/cuse.c | 2 | ||||
-rw-r--r-- | sys/fs/cuse/cuse_ioctl.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c index e00f74f..f93df05 100644 --- a/sys/fs/cuse/cuse.c +++ b/sys/fs/cuse/cuse.c @@ -1137,7 +1137,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, if (pccmd != NULL) { pcc = pccmd->client; for (n = 0; n != CUSE_CMD_MAX; n++) { - pcc->cmds[n].sub.per_file_handle = *(unsigned long *)data; + pcc->cmds[n].sub.per_file_handle = *(uintptr_t *)data; } } else { error = ENXIO; diff --git a/sys/fs/cuse/cuse_ioctl.h b/sys/fs/cuse/cuse_ioctl.h index 8e1867c..ca07d7f 100644 --- a/sys/fs/cuse/cuse_ioctl.h +++ b/sys/fs/cuse/cuse_ioctl.h @@ -53,7 +53,7 @@ struct cuse_alloc_info { struct cuse_command { struct cuse_dev *dev; unsigned long fflags; - unsigned long per_file_handle; + uintptr_t per_file_handle; unsigned long data_pointer; unsigned long argument; unsigned long command; /* see CUSE_CMD_XXX */ @@ -76,7 +76,7 @@ struct cuse_create_dev { #define CUSE_IOCTL_GET_SIG _IOR('C', 4, int) #define CUSE_IOCTL_ALLOC_MEMORY _IOW('C', 5, struct cuse_alloc_info) #define CUSE_IOCTL_FREE_MEMORY _IOW('C', 6, struct cuse_alloc_info) -#define CUSE_IOCTL_SET_PFH _IOW('C', 7, unsigned long) +#define CUSE_IOCTL_SET_PFH _IOW('C', 7, uintptr_t) #define CUSE_IOCTL_CREATE_DEV _IOW('C', 8, struct cuse_create_dev) #define CUSE_IOCTL_DESTROY_DEV _IOW('C', 9, struct cuse_dev *) #define CUSE_IOCTL_ALLOC_UNIT _IOR('C',10, int) |