sunos_exec.c revision 1.29
11.29Smycroft/* $NetBSD: sunos_exec.c,v 1.29 2000/12/11 05:29:02 mycroft Exp $ */ 21.5Scgd 31.1Sderaadt/* 41.1Sderaadt * Copyright (c) 1993 Theo de Raadt 51.1Sderaadt * All rights reserved. 61.1Sderaadt * 71.1Sderaadt * Redistribution and use in source and binary forms, with or without 81.1Sderaadt * modification, are permitted provided that the following conditions 91.1Sderaadt * are met: 101.1Sderaadt * 1. Redistributions of source code must retain the above copyright 111.1Sderaadt * notice, this list of conditions and the following disclaimer. 121.1Sderaadt * 2. Redistributions in binary form must reproduce the above copyright 131.1Sderaadt * notice, this list of conditions and the following disclaimer in the 141.1Sderaadt * documentation and/or other materials provided with the distribution. 151.1Sderaadt * 3. The name of the author may not be used to endorse or promote products 161.4Sjtc * derived from this software without specific prior written permission 171.1Sderaadt * 181.1Sderaadt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 191.1Sderaadt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 201.1Sderaadt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 211.1Sderaadt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 221.1Sderaadt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 231.1Sderaadt * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 241.1Sderaadt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 251.1Sderaadt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 261.1Sderaadt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 271.1Sderaadt * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 281.1Sderaadt */ 291.19Ssoren 301.26Sjdolecek#if defined(_KERNEL) && !defined(_LKM) 311.19Ssoren#include "opt_syscall_debug.h" 321.26Sjdolecek#endif 331.1Sderaadt 341.1Sderaadt#include <sys/param.h> 351.1Sderaadt#include <sys/systm.h> 361.1Sderaadt#include <sys/proc.h> 371.1Sderaadt#include <sys/mount.h> 381.8Schristos#include <sys/signalvar.h> 391.1Sderaadt#include <sys/vnode.h> 401.1Sderaadt 411.11Sbriggs#include <compat/sunos/sunos.h> 421.8Schristos#include <compat/sunos/sunos_syscall.h> 431.1Sderaadt 441.8Schristosextern int nsunos_sysent; 451.8Schristosextern struct sysent sunos_sysent[]; 461.8Schristos#ifdef SYSCALL_DEBUG 471.21Sjdolecekextern const char * const sunos_syscallnames[]; 481.8Schristos#endif 491.17Schristosextern char sunos_sigcode[], sunos_esigcode[]; 501.28Sjdolecekvoid syscall __P((void)); 511.8Schristos 521.8Schristosstruct emul emul_sunos = { 531.8Schristos "sunos", 541.25Sjdolecek "/emul/sunos", 551.29Smycroft 0, 561.8Schristos NULL, 571.8Schristos SUNOS_SYS_syscall, 581.8Schristos SUNOS_SYS_MAXSYSCALL, 591.8Schristos sunos_sysent, 601.8Schristos#ifdef SYSCALL_DEBUG 611.8Schristos sunos_syscallnames, 621.8Schristos#else 631.8Schristos NULL, 641.8Schristos#endif 651.29Smycroft sunos_sendsig, 661.17Schristos sunos_sigcode, 671.17Schristos sunos_esigcode, 681.26Sjdolecek NULL, 691.26Sjdolecek NULL, 701.26Sjdolecek NULL, 711.28Sjdolecek syscall 721.8Schristos}; 73