From: niklas Date: Thu, 25 Apr 1996 10:20:16 +0000 (+0000) Subject: Add COMPAT_SVR4_NCR support for making the SVR4 emulation behave as X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4b5ca493661d27adb039d9c2addfd13795ad56d;p=openbsd Add COMPAT_SVR4_NCR support for making the SVR4 emulation behave as NCR SVR4, currently this means that syscall#76 (rdebug) should return ENXIO instead of issueing a SIGSYS. Also removed svr4_conf.h no longer used. --- diff --git a/sys/compat/svr4/files.svr4 b/sys/compat/svr4/files.svr4 index 31b4a7be2f4..123b5c0feef 100644 --- a/sys/compat/svr4/files.svr4 +++ b/sys/compat/svr4/files.svr4 @@ -1,4 +1,4 @@ -# $OpenBSD: files.svr4,v 1.3 1996/04/21 22:18:17 deraadt Exp $ +# $OpenBSD: files.svr4,v 1.4 1996/04/25 10:20:16 niklas Exp $ # $NetBSD: files.svr4,v 1.6 1996/04/11 12:43:29 christos Exp $ # # Config.new file description for machine-independent SVR4 compat code. @@ -24,3 +24,4 @@ file compat/svr4/svr4_filio.c compat_svr4 file compat/svr4/svr4_sockio.c compat_svr4 file compat/svr4/svr4_error.c compat_svr4 file compat/svr4/svr4_ipc.c compat_svr4 +file compat/svr4/svr4_ncr.c compat_svr4 diff --git a/sys/compat/svr4/svr4_conf.h b/sys/compat/svr4/svr4_conf.h deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/sys/compat/svr4/svr4_ncr.c b/sys/compat/svr4/svr4_ncr.c new file mode 100644 index 00000000000..253739192c3 --- /dev/null +++ b/sys/compat/svr4/svr4_ncr.c @@ -0,0 +1,44 @@ +/* $OpenBSD: svr4_ncr.c,v 1.1 1996/04/25 10:20:18 niklas Exp $ */ + +/* + * Copyright (c) 1995, 1996 Niklas Hallqvist + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Handle NCR SVR4 peculiarities + */ + +#ifdef COMPAT_SVR4_NCR + +#include + +int +svr4_ncr_sys_rdebug() +{ + return ENXIO; +} + +#endif /* COMPAT_SVR4_NCR */ diff --git a/sys/compat/svr4/syscalls.master b/sys/compat/svr4/syscalls.master index 676d3f0ea8d..30faf667e07 100644 --- a/sys/compat/svr4/syscalls.master +++ b/sys/compat/svr4/syscalls.master @@ -1,9 +1,9 @@ - $OpenBSD: syscalls.master,v 1.5 1996/04/21 22:18:42 deraadt Exp $ + $OpenBSD: syscalls.master,v 1.6 1996/04/25 10:20:18 niklas Exp $ ; $NetBSD: syscalls.master,v 1.17 1996/02/10 17:12:51 christos Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 -; NetBSD COMPAT_SVR4 system call name/number "master" file. +; OpenBSD COMPAT_SVR4 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) ; ; Fields: number type [type-dependent ...] @@ -140,7 +140,11 @@ 73 OBSOL rumount 74 OBSOL rfstart 75 OBSOL sigret +#ifdef COMPAT_SVR4_NCR +76 STD { int svr4_ncr_sys_rdebug(); } +#else 76 OBSOL rdebug +#endif 77 OBSOL rfstop 78 UNIMPL rfsys 79 NOARGS { int sys_rmdir(char *path); }