Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet Use ddi_copyin and ddi_copyout as solari...
details: https://anonhg.NetBSD.org/src/rev/9b4288eb16ec
branches: trunk
changeset: 755005:9b4288eb16ec
user: haad <haad%NetBSD.org@localhost>
date: Wed May 19 18:01:26 2010 +0000
description:
Use ddi_copyin and ddi_copyout as solaris does, change them to
ioctl_copyin/ioctl_copyout in kernel and to bcopy in user space.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c | 8 --------
external/cddl/osnet/sys/sys/sunddi.h | 7 ++++++-
2 files changed, 6 insertions(+), 9 deletions(-)
diffs (43 lines):
diff -r c7ce0b29192b -r 9b4288eb16ec external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c Wed May 19 17:57:42 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c Wed May 19 18:01:26 2010 +0000
@@ -4454,16 +4454,8 @@
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);
/*
diff -r c7ce0b29192b -r 9b4288eb16ec external/cddl/osnet/sys/sys/sunddi.h
--- a/external/cddl/osnet/sys/sys/sunddi.h Wed May 19 17:57:42 2010 +0000
+++ b/external/cddl/osnet/sys/sys/sunddi.h Wed May 19 18:01:26 2010 +0000
@@ -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@localhost>
@@ -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_ */
Home |
Main Index |
Thread Index |
Old Index