summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-12-22 09:55:44 +0000
committerhselasky <hselasky@FreeBSD.org>2015-12-22 09:55:44 +0000
commitc3f11e9f0e23d1aba656d9436d9709e39698a87e (patch)
tree914ad18283e7df51a825164fbffddb32f707afdc /sys/fs
parent76efdc2ae95fa6f5acf4396f02a8f43fcaf0ecea (diff)
downloadFreeBSD-src-c3f11e9f0e23d1aba656d9436d9709e39698a87e.zip
FreeBSD-src-c3f11e9f0e23d1aba656d9436d9709e39698a87e.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.c6
-rw-r--r--sys/fs/cuse/cuse_ioctl.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c
index f93df05..075b2d9 100644
--- a/sys/fs/cuse/cuse.c
+++ b/sys/fs/cuse/cuse.c
@@ -511,7 +511,7 @@ cuse_client_is_closing(struct cuse_client *pcc)
static void
cuse_client_send_command_locked(struct cuse_client_command *pccmd,
- unsigned long data_ptr, unsigned long arg, int fflags, int ioflag)
+ uintptr_t data_ptr, unsigned long arg, int fflags, int ioflag)
{
unsigned long cuse_fflags = 0;
struct cuse_server *pcs;
@@ -1547,7 +1547,7 @@ cuse_client_read(struct cdev *dev, struct uio *uio, int ioflag)
cuse_lock();
cuse_client_send_command_locked(pccmd,
- (unsigned long)uio->uio_iov->iov_base,
+ (uintptr_t)uio->uio_iov->iov_base,
(unsigned long)(unsigned int)len, pcc->fflags, ioflag);
error = cuse_client_receive_command_locked(pccmd, 0, 0);
@@ -1607,7 +1607,7 @@ cuse_client_write(struct cdev *dev, struct uio *uio, int ioflag)
cuse_lock();
cuse_client_send_command_locked(pccmd,
- (unsigned long)uio->uio_iov->iov_base,
+ (uintptr_t)uio->uio_iov->iov_base,
(unsigned long)(unsigned int)len, pcc->fflags, ioflag);
error = cuse_client_receive_command_locked(pccmd, 0, 0);
diff --git a/sys/fs/cuse/cuse_ioctl.h b/sys/fs/cuse/cuse_ioctl.h
index ca07d7f..ff0393a 100644
--- a/sys/fs/cuse/cuse_ioctl.h
+++ b/sys/fs/cuse/cuse_ioctl.h
@@ -40,8 +40,8 @@
struct cuse_dev;
struct cuse_data_chunk {
- unsigned long local_ptr;
- unsigned long peer_ptr;
+ uintptr_t local_ptr;
+ uintptr_t peer_ptr;
unsigned long length;
};
@@ -54,7 +54,7 @@ struct cuse_command {
struct cuse_dev *dev;
unsigned long fflags;
uintptr_t per_file_handle;
- unsigned long data_pointer;
+ uintptr_t data_pointer;
unsigned long argument;
unsigned long command; /* see CUSE_CMD_XXX */
};
OpenPOWER on IntegriCloud