Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/arch/i386 use copyout() instead of subyte()



details:   https://anonhg.NetBSD.org/src/rev/fe5a9af1bea8
branches:  trunk
changeset: 550250:fe5a9af1bea8
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Aug 02 20:23:48 2003 +0000

description:
use copyout() instead of subyte()

diffstat:

 sys/compat/linux/arch/i386/linux_machdep.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r d216cec6f7ed -r fe5a9af1bea8 sys/compat/linux/arch/i386/linux_machdep.c
--- a/sys/compat/linux/arch/i386/linux_machdep.c        Sat Aug 02 19:51:23 2003 +0000
+++ b/sys/compat/linux/arch/i386/linux_machdep.c        Sat Aug 02 20:23:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.90 2003/07/03 21:24:27 christos Exp $      */
+/*     $NetBSD: linux_machdep.c,v 1.91 2003/08/02 20:23:48 jdolecek Exp $      */
 
 /*-
  * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.90 2003/07/03 21:24:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.91 2003/08/02 20:23:48 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vm86.h"
@@ -991,9 +991,13 @@
                com = VT_GETSTATE;
                break;
        case LINUX_KDGKBTYPE:
+           {
+               static const u_int8_t kb101 = KB_101;
+
                /* This is what Linux does. */
-               error = subyte(SCARG(uap, data), KB_101);
+               error = copyout(&kb101, SCARG(uap, data), 1);
                goto out;
+           }
        case LINUX_KDGKBENT:
                /*
                 * The Linux KDGKBENT ioctl is different from the



Home | Main Index | Thread Index | Old Index