diff options
Diffstat (limited to 'usr/src/uts/common/disp/class.c')
-rw-r--r-- | usr/src/uts/common/disp/class.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/uts/common/disp/class.c b/usr/src/uts/common/disp/class.c index b5b2674d89..8e83a839ee 100644 --- a/usr/src/uts/common/disp/class.c +++ b/usr/src/uts/common/disp/class.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -325,7 +324,8 @@ parmsset(pcparms_t *parmsp, kthread_id_t targtp) * The parameters are specified by a key. */ int -vaparmsout(char *classp, pcparms_t *prmsp, pc_vaparms_t *vaparmsp) +vaparmsout(char *classp, pcparms_t *prmsp, pc_vaparms_t *vaparmsp, + uio_seg_t seg) { char *clname; @@ -348,7 +348,8 @@ vaparmsout(char *classp, pcparms_t *prmsp, pc_vaparms_t *vaparmsp) return (EINVAL); clname = sclass[prmsp->pc_cid].cl_name; - if (copyout(clname, (void *)(uintptr_t)vaparmsp->pc_parms[0].pc_parm, + if ((seg == UIO_USERSPACE ? copyout : kcopy)(clname, + (void *)(uintptr_t)vaparmsp->pc_parms[0].pc_parm, MIN(strlen(clname) + 1, PC_CLNMSZ))) return (EFAULT); |