Use ddi_copyin and ddi_copyout as solaris does, change them to
ioctl_copyin/ioctl_copyout in kernel and to bcopy in user space.
This commit is contained in:
parent
a18cf73bc7
commit
1b1a9e8e92
@ -4454,16 +4454,8 @@ zfsdev_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp)
|
||||
|
||||
zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
|
||||
|
||||
/* XXX is this still needed ? */
|
||||
error = xcopyin((void *)arg, zc, sizeof (zfs_cmd_t));
|
||||
printf("zfsdev_ioct zc_value %s, zc_string\n", zc->zc_value, zc->zc_string);
|
||||
printf("zfsdev_ioctl -> calling zfs_ioc_vec secpolicy function on %d\n", vec);
|
||||
if (error == 0)
|
||||
#if 0
|
||||
error = ddi_copyin((void *)arg, zc, sizeof (zfs_cmd_t), flag);
|
||||
|
||||
if ((error == 0) && !(flag & FKIOCTL))
|
||||
#endif
|
||||
error = zfs_ioc_vec[vec].zvec_secpolicy(zc, cr);
|
||||
|
||||
/*
|
||||
|
7
external/cddl/osnet/sys/sys/sunddi.h
vendored
7
external/cddl/osnet/sys/sys/sunddi.h
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sunddi.h,v 1.3 2010/02/21 01:46:36 darran Exp $ */
|
||||
/* $NetBSD: sunddi.h,v 1.4 2010/05/19 18:01:26 haad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
|
||||
@ -31,8 +31,13 @@
|
||||
#ifndef _OPENSOLARIS_SYS_SUNDDI_H_
|
||||
#define _OPENSOLARIS_SYS_SUNDDI_H_
|
||||
|
||||
#ifndef _KERNEL
|
||||
#define ddi_copyin(from, to, size, flag) (bcopy((from), (to), (size)), 0)
|
||||
#define ddi_copyout(from, to, size, flag) (bcopy((from), (to), (size)), 0)
|
||||
#else
|
||||
#define ddi_copyin(from, to, size, flag) (ioctl_copyin((flag), (from), (to), (size)))
|
||||
#define ddi_copyout(from, to, size, flag) (ioctl_copyout((flag), (from), (to), (size)))
|
||||
#endif
|
||||
int ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result);
|
||||
|
||||
#endif /* _OPENSOLARIS_SYS_SUNDDI_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user