Date: Fri, 13 Apr 2012 07:54:09 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r234212 - in stable/8/sys: cddl/contrib/opensolaris/uts/common/fs/zfs i386/conf Message-ID: <201204130754.q3D7s9qs066910@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Apr 13 07:54:09 2012 New Revision: 234212 URL: http://svn.freebsd.org/changeset/base/234212 Log: MFC r233918: zfs_ioctl: no need for ddi_copyin/out here because sys_ioctl handles that Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Apr 13 07:48:45 2012 (r234211) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Apr 13 07:54:09 2012 (r234212) @@ -294,9 +294,12 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt case _FIO_SEEK_DATA: case _FIO_SEEK_HOLE: +#ifdef sun if (ddi_copyin((void *)data, &off, sizeof (off), flag)) return (EFAULT); - +#else + off = *(offset_t *)data; +#endif zp = VTOZ(vp); zfsvfs = zp->z_zfsvfs; ZFS_ENTER(zfsvfs); @@ -307,8 +310,12 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt ZFS_EXIT(zfsvfs); if (error) return (error); +#ifdef sun if (ddi_copyout(&off, (void *)data, sizeof (off), flag)) return (EFAULT); +#else + *(offset_t *)data = off; +#endif return (0); } return (ENOTTY);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204130754.q3D7s9qs066910>