Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/linux/common Add support for SETALL and GETALL to...



details:   https://anonhg.NetBSD.org/src/rev/072b76ed3384
branches:  trunk
changeset: 473266:072b76ed3384
user:      tron <tron%NetBSD.org@localhost>
date:      Thu May 27 13:30:40 1999 +0000

description:
Add support for SETALL and GETALL to the Linux emulation of semctl()
and improve handling of SETVAL. Patches supplied by YAMAMOTO Jiro in
PR kern/7621.

diffstat:

 sys/compat/linux/common/linux_ipc.c |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r ef5768a928ed -r 072b76ed3384 sys/compat/linux/common/linux_ipc.c
--- a/sys/compat/linux/common/linux_ipc.c       Thu May 27 12:18:35 1999 +0000
+++ b/sys/compat/linux/common/linux_ipc.c       Thu May 27 13:30:40 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_ipc.c,v 1.19 1999/01/03 05:18:01 erh Exp $       */
+/*     $NetBSD: linux_ipc.c,v 1.20 1999/05/27 13:30:40 tron Exp $      */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -228,6 +228,24 @@
                break;
        case LINUX_SETVAL:
                SCARG(&nua, cmd) = SETVAL;
+               sg = stackgap_init(p->p_emul);
+               bup = stackgap_alloc(&sg, sizeof(union semun));
+               bup->val = SCARG(uap, arg).l_val;
+               SCARG(&nua, arg) = bup;
+               break;
+       case LINUX_GETALL:
+               SCARG(&nua, cmd) = GETALL;
+               sg = stackgap_init(p->p_emul);
+               bup = stackgap_alloc(&sg, sizeof(union semun));
+               bup->array = SCARG(uap, arg).l_array;
+               SCARG(&nua, arg) = bup;
+               break;
+       case LINUX_SETALL:
+               SCARG(&nua, cmd) = SETALL;
+               sg = stackgap_init(p->p_emul);
+               bup = stackgap_alloc(&sg, sizeof(union semun));
+               bup->array = SCARG(uap, arg).l_array;
+               SCARG(&nua, arg) = bup;
                break;
        default:
                return EINVAL;



Home | Main Index | Thread Index | Old Index