Author: hselasky
Date: Tue Dec 22 09:41:33 2015
New Revision: 292593
URL: https://svnweb.freebsd.org/changeset/base/292593
Log:
Make CUSE usable with platforms where the size of "unsigned long" is
different from the size of a pointer.
Modified:
head/sys/fs/cuse/cuse.c
head/sys/fs/cuse/cuse_ioctl.h
Modified: head/sys/fs/cuse/cuse.c
==============================================================================
--- head/sys/fs/cuse/cuse.c Tue Dec 22 09:26:24 2015 (r292592)
+++ head/sys/fs/cuse/cuse.c Tue Dec 22 09:41:33 2015 (r292593)
@@ -1137,7 +1137,7 @@ cuse_server_ioctl(struct cdev *dev, unsi
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;
Modified: head/sys/fs/cuse/cuse_ioctl.h
==============================================================================
--- head/sys/fs/cuse/cuse_ioctl.h Tue Dec 22 09:26:24 2015
(r292592)
+++ head/sys/fs/cuse/cuse_ioctl.h Tue Dec 22 09:41:33 2015
(r292593)
@@ -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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"