From owner-svn-src-all@freebsd.org Tue Dec 22 09:41:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 274F8A4FE08; Tue, 22 Dec 2015 09:41:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF58B1DB0; Tue, 22 Dec 2015 09:41:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBM9fXAM048065; Tue, 22 Dec 2015 09:41:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBM9fXeT048063; Tue, 22 Dec 2015 09:41:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512220941.tBM9fXeT048063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 22 Dec 2015 09:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292593 - head/sys/fs/cuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 09:41:35 -0000 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)