prelim svr4 stuff from <christos@deshaw.com>

This commit is contained in:
deraadt 1994-05-22 10:04:26 +00:00
parent 6e1e1f9a6b
commit a0ca154be4
11 changed files with 2540 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#
# Theo Deraadt's 486
#
# $Id: TDR,v 1.37 1994/05/21 08:37:47 cgd Exp $
# $Id: TDR,v 1.38 1994/05/22 10:05:59 deraadt Exp $
#
machine "i386"
cpu "I386_CPU"
@ -23,6 +23,8 @@ options MACHINE_NONCONTIG
#options SYSVMSG,SYSVSEM
#options SYSVSHM
options "COMPAT_SVR4"
config netbsd root on sd0 swap on sd0 and sd1
controller isa0

View File

@ -1,4 +1,4 @@
# $Id: files.i386,v 1.45 1994/05/05 04:47:41 cgd Exp $
# $Id: files.i386,v 1.46 1994/05/22 10:06:01 deraadt Exp $
#
arch/i386/i386/autoconf.c standard
arch/i386/i386/db_disasm.c optional ddb
@ -59,6 +59,10 @@ arch/i386/isa/wd.c optional wd device-driver requires isa
arch/i386/isa/wd7000.c optional wds requires isa scsi
arch/i386/isa/wt.c optional wt device-driver requires isa
dev/cons.c standard
compat/svr4/svr4_misc.c optional compat_svr4
compat/svr4/svr4_sysent.c optional compat_svr4
compat/svr4/svr4_ioctl.c optional compat_svr4
compat/svr4/svr4_exec.c optional compat_svr4
scsi/cd.c optional cd device-driver requires scsi
scsi/ch.c optional ch device-driver requires scsi
scsi/scsi_base.c optional scsi

114
sys/compat/svr4/exec.h Normal file
View File

@ -0,0 +1,114 @@
/*
* Copyright (c) 1994 Christos Zoulas
* 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.
*
* $Id: exec.h,v 1.1 1994/05/22 10:04:26 deraadt Exp $
*/
#ifndef _SVR4_EXEC_H_
#define _SVR4_EXEC_H_
typedef unsigned long Elf32_Addr;
typedef unsigned long Elf32_Off;
typedef long Elf32_Sword;
typedef long Elf32_Word;
typedef unsigned short Elf32_Half;
#define ELF_IDSIZE 16
enum Elf32_e_type {
Elf32_et_none = 0,
Elf32_et_rel,
Elf32_et_exec,
Elf32_et_dyn,
Elf32_et_core,
Elf32_et_num
};
enum Elf32_e_machine {
Elf32_em_none = 0,
Elf32_em_m32,
Elf32_em_sparc,
Elf32_em_386,
Elf32_em_86k,
Elf32_em_88k,
Elf32_em_486,
Elf32_em_860,
Elf32_em_num
};
typedef struct {
unsigned char e_ident[ELF_IDSIZE]; /* Id bytes */
Elf32_Half e_type; /* file type */
Elf32_Half e_machine; /* machine type */
Elf32_Word e_version; /* version number */
Elf32_Addr e_entry; /* entry point */
Elf32_Off e_phoff; /* Program hdr offset */
Elf32_Off e_shoff; /* Section hdr offset */
Elf32_Word e_flags; /* Processor flags */
Elf32_Half e_ehsize; /* sizeof ehdr */
Elf32_Half e_phentsize; /* Program header entry size */
Elf32_Half e_phnum; /* Number of program headers */
Elf32_Half e_shentsize; /* Section header entry size */
Elf32_Half e_shnum; /* Number of section headers */
Elf32_Half e_shstrndx; /* Section header string table index */
} Elf32_Ehdr;
enum Elf32_p_pf {
Elf32_pf_r = 4,
Elf32_pf_w = 2,
Elf32_pf_x = 1
};
enum Elf32_p_pt {
Elf32_pt_null = 0, /* Program header table entry unused */
Elf32_pt_load = 1, /* Loadable program segment */
Elf32_pt_dynamic = 2, /* Dynamic linking information */
Elf32_pt_interp = 3, /* Program interpreter */
Elf32_pt_note = 4, /* Auxiliary information */
Elf32_pt_shlib = 5, /* Reserved, unspecified semantics */
Elf32_pt_phdr = 6, /* Entry for header table itself */
Elf32_pt_loproc = 0x70000000, /* Processor-specific */
Elf32_pt_hiproc = 0x7FFFFFFF /* Processor-specific */
};
typedef struct {
Elf32_Word p_type; /* entry type */
Elf32_Off p_offset; /* offset */
Elf32_Addr p_vaddr; /* virtual address */
Elf32_Addr p_paddr; /* physical address */
Elf32_Word p_filesz; /* file size */
Elf32_Word p_memsz; /* memory size */
Elf32_Word p_flags; /* flags */
Elf32_Word p_align; /* memory & file alignment */
} Elf32_Phdr;
#define Elf32_e_ident "\177ELF"
#define Elf32_e_siz (sizeof(Elf32_e_ident) - 1)
#endif /* !_SVR4_EXEC_H_ */

View File

@ -0,0 +1,172 @@
#! /bin/sh -
# from: @(#)makesyscalls.sh 8.1 (Berkeley) 6/11/93
# $Id: makesyscalls.sh,v 1.1 1994/05/22 10:04:28 deraadt Exp $
set -e
# name of compat option:
compat=XXX_UNUSED
# output files:
sysnames="svr4_syscalls.c"
syshdr="svr4_syscall.h"
syssw="svr4_sysent.c"
# tmp files:
sysdcl="sysent.dcl"
syscompat="sysent.compat"
sysent="sysent.switch"
trap "rm $sysdcl $syscompat $sysent" 0
case $# in
0) echo "Usage: $0 input-file" 1>&2
exit 1
;;
esac
awk < $1 "
BEGIN {
sysdcl = \"$sysdcl\"
syscompat = \"$syscompat\"
sysent = \"$sysent\"
sysnames = \"$sysnames\"
syshdr = \"$syshdr\"
compat = \"$compat\"
infile = \"$1\"
"'
printf "/*\n * System call switch table.\n *\n" > sysdcl
printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysdcl
printf "\n#ifdef %s\n", compat > syscompat
printf "#define compat(n, name) n, __CONCAT(o,name)\n\n" > syscompat
printf "/*\n * System call names.\n *\n" > sysnames
printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames
printf "/*\n * System call numbers.\n *\n" > syshdr
printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr
}
NR == 1 {
printf " * created from: %s %s %s %s\n */\n\n",$2,$3,$4,$5 > sysdcl
printf "#include <sys/param.h>\n" > sysdcl
printf "#include <sys/systm.h>\n\n" > sysdcl
printf "int\tnosys();\n\n" > sysdcl
printf "struct sysent svr4_sysent[] = {\n" > sysent
printf " * created from: %s %s %s %s\n */\n\n",$2,$3,$4,$5 > sysnames
printf "char *svr4_syscallnames[] = {\n" > sysnames
printf " * created from: %s %s %s %s\n */\n\n",$2,$3,$4,$5 > syshdr
next
}
NF == 0 || $1 ~ /^;/ {
next
}
$1 ~ /^#[ ]*if/ {
print > sysent
print > sysdcl
print > syscompat
print > sysnames
savesyscall = syscall
next
}
$1 ~ /^#[ ]*else/ {
print > sysent
print > sysdcl
print > syscompat
print > sysnames
syscall = savesyscall
next
}
$1 ~ /^#/ {
print > sysent
print > sysdcl
print > syscompat
print > sysnames
next
}
syscall != $1 {
printf "%s: line %d: syscall number out of sync at %d\n", \
infile, NR, syscall
printf "line is:\n"
print
exit 1
}
{ comment = $4
for (i = 5; i <= NF; i++)
comment = comment " " $i
if (NF < 5)
$5 = $4
}
$2 == "STD" {
printf("int\t%s();\n", $4) > sysdcl
printf("\t{ %d, %s },\t\t\t/* %d = %s */\n", \
$3, $4, syscall, $5) > sysent
printf("\t\"%s\",\t\t\t/* %d = %s */\n", \
$5, syscall, $5) > sysnames
printf("#define\tSVR4_SYS_%s\t%d\n", \
$5, syscall) > syshdr
syscall++
next
}
$2 == "COMPAT" {
printf("int\to%s();\n", $4) > syscompat
printf("\t{ compat(%d,%s) },\t\t/* %d = old %s */\n", \
$3, $4, syscall, $5) > sysent
printf("\t\"old.%s\",\t\t/* %d = old %s */\n", \
$5, syscall, $5) > sysnames
printf("\t\t\t\t/* %d is old %s */\n", \
syscall, comment) > syshdr
syscall++
next
}
$2 == "LIBCOMPAT" {
printf("int\to%s();\n", $4) > syscompat
printf("\t{ compat(%d,%s) },\t\t/* %d = old %s */\n", \
$3, $4, syscall, $5) > sysent
printf("\t\"old.%s\",\t\t/* %d = old %s */\n", \
$5, syscall, $5) > sysnames
printf("#define\tSVR4_SYS_%s\t%d\t/* compatibility; still used by libc */\n", \
$5, syscall) > syshdr
syscall++
next
}
$2 == "OBSOL" {
printf("\t{ 0, nosys },\t\t\t/* %d = obsolete %s */\n", \
syscall, comment) > sysent
printf("\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n", \
$4, syscall, comment) > sysnames
printf("\t\t\t\t/* %d is obsolete %s */\n", \
syscall, comment) > syshdr
syscall++
next
}
$2 == "UNIMPL" {
printf("\t{ 0, nosys },\t\t\t/* %d = %s */\n", \
syscall, comment) > sysent
printf("\t\"#%d\",\t\t\t/* %d = %s */\n", \
syscall, syscall, comment) > sysnames
syscall++
next
}
{
printf "%s: line %d: unrecognized keyword %s\n", infile, NR, $2
exit 1
}
END {
printf("\n#else /* %s */\n", compat) > syscompat
printf("#define compat(n, name) 0, nosys\n") > syscompat
printf("#endif /* %s */\n\n", compat) > syscompat
printf("};\n\n") > sysent
printf("int\tnsvr4_sysent = sizeof(svr4_sysent) / sizeof(svr4_sysent[0]);\n") > sysent
printf("};\n") > sysnames
} '
cat $sysdcl $syscompat $sysent >$syssw
#chmod 444 $sysnames $syshdr $syssw

212
sys/compat/svr4/svr4_exec.c Normal file
View File

@ -0,0 +1,212 @@
/*
* Copyright (c) 1994 Christos Zoulas
* 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.
*
* $Id: svr4_exec.c,v 1.1 1994/05/22 10:04:31 deraadt Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/malloc.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/exec.h>
#include <sys/resourcevar.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_map.h>
#include <vm/vm_kern.h>
#include <vm/vm_pager.h>
#include <machine/cpu.h>
#include <machine/reg.h>
#include <machine/exec.h>
#include <compat/svr4/exec.h>
#ifdef DEBUG_SVR4
#define DPRINTF(a) printf a
#else
#define DPRINTF(a)
#endif
/*
* svr4_exec_elf_makecmds(): Prepare an Elf binary's exec package
*
* First, set of the various offsets/lengths in the exec package.
*
* Then, mark the text image busy (so it can be demand paged) or error
* out if this is not possible. Finally, set up vmcmds for the
* text, data, bss, and stack segments.
*/
int
svr4_exec_elf_makecmds(p, epp)
struct proc *p;
struct exec_package *epp;
{
Elf32_Ehdr eh;
Elf32_Phdr ph;
int error;
struct exec_vmcmd *ccmdp;
int i, resid;
int s;
long diff;
u_long pos;
s = sizeof(eh);
if (error = vn_rdwr(UIO_READ, epp->ep_vp, (caddr_t) &eh, s, 0,
UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, p)) {
DPRINTF(("Exec header read error %d\n", error));
return error;
}
s -= resid;
if (s != sizeof(eh)) {
DPRINTF(("Incomplete read for exec header ask=%d, rem=%d got %d\n",
sizeof(eh), resid, s));
return ENOEXEC;
}
if (memcmp(eh.e_ident, Elf32_e_ident, Elf32_e_siz) != 0) {
DPRINTF(("Not an elf file\n"));
return ENOEXEC;
}
if (eh.e_type != Elf32_et_exec) {
DPRINTF(("Not an elf executable\n"));
return ENOEXEC;
}
if (eh.e_machine != Elf32_em_386 && eh.e_machine != Elf32_em_486) {
DPRINTF(("Not an elf/386 or 486 executable\n"));
return ENOEXEC;
}
/*
* check if vnode is in open for writing, because we want to
* demand-page out of it. if it is, don't do it, for various
* reasons
*/
if (epp->ep_vp->v_writecount != 0) {
#ifdef DIAGNOSTIC
if (epp->ep_vp->v_flag & VTEXT)
panic("exec: a VTEXT vnode has writecount != 0\n");
#endif
return ETXTBSY;
}
epp->ep_emul = EMUL_IBCS2;
epp->ep_tsize = ~0;
epp->ep_dsize = ~0;
pos = eh.e_phoff;
for (i = 0; i < eh.e_phnum; i++, pos += sizeof(ph)) {
u_long vaddr, offset;
int prot = 0;
s = sizeof(ph);
if (error = vn_rdwr(UIO_READ, epp->ep_vp, (caddr_t) &ph, s, pos,
UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred,
&resid, p)) {
DPRINTF(("Program header %d read error %d\n", i, error));
return error;
}
s -= resid;
if (s != sizeof(ph)) {
DPRINTF(("Incomplete read for header %d ask=%d, rem=%d got %d\n",
sizeof(ph), resid, s));
return ENOEXEC;
}
if (ph.p_type != Elf32_pt_load)
continue;
/*
* Kludge: Unfortunately the current implementation of
* exec package assumes a single text and data segment.
* In Elf we can have more, but here we limit ourselves
* to two and hope :-(
* We also assume that the text is rx, and data is rwx.
*/
#define SVR4_ALIGN(a, b) ((a) & ~((b) - 1))
vaddr = SVR4_ALIGN(ph.p_vaddr, ph.p_align);
diff = ph.p_vaddr - vaddr;
offset = ph.p_offset - diff;
s = ph.p_memsz + diff;
DPRINTF(("Elf Segment@ %x, size %d, offset %x\n",
ph.p_vaddr, ph.p_memsz, ph.p_offset));
prot |= (ph.p_flags & Elf32_pf_r) ? VM_PROT_READ : 0;
prot |= (ph.p_flags & Elf32_pf_w) ? VM_PROT_WRITE : 0;
prot |= (ph.p_flags & Elf32_pf_x) ? VM_PROT_EXECUTE : 0;
switch (prot) {
case (VM_PROT_READ|VM_PROT_EXECUTE):
if (epp->ep_tsize != ~0) {
DPRINTF(("More than one text segment\n"));
return ENOEXEC;
}
epp->ep_taddr = vaddr;
epp->ep_tsize = s;
DPRINTF(("Elf Text@ %x, size %d, offset %x\n",
vaddr, s, offset));
break;
case (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE):
if (epp->ep_dsize != ~0) {
DPRINTF(("More than one data segment\n"));
return ENOEXEC;
}
epp->ep_daddr = vaddr;
epp->ep_dsize = s;
DPRINTF(("Elf Data@ %x, size %d, offset %x\n",
vaddr, s, offset));
break;
default:
return ENOEXEC;
}
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, s,
vaddr, epp->ep_vp, offset, prot);
}
epp->ep_entry = eh.e_entry;
DPRINTF(("Elf entry@ %x\n", epp->ep_entry));
epp->ep_vp->v_flag |= VTEXT;
return exec_aout_setup_stack(p, epp);
}

View File

@ -0,0 +1,94 @@
/*
* Copyright (c) 1994 Christos Zoulas
* 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. 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.
*
* $Id: svr4_ioctl.c,v 1.1 1994/05/22 10:04:33 deraadt Exp $
*/
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/ioctl.h>
#include <sys/termios.h>
#include <sys/tty.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
struct svr4_ioctl_args {
int fd;
int cmd;
caddr_t data;
};
#define SVR4_IOC_VOID 0x20000000
#define SVR4_IOC_OUT 0x40000000
#define SVR4_IOC_IN 0x80000000
#define SVR4_IOC_INOUT (SVR4_IOC_IN|SVR4_IOC_OUT)
#ifdef DEBUG_SVR4
/*
* Decode an ioctl command symbolically
*/
static void
svr4_decode_cmd(cmd, dir, c, num, argsiz)
int cmd;
char **dir, *c;
int *num, *argsiz;
{
*dir = "";
if (cmd & SVR4_IOC_VOID)
*dir = "V";
if (cmd & SVR4_IOC_INOUT)
*dir = "RW";
if (cmd & SVR4_IOC_OUT)
*dir = "W";
if (cmd & SVR4_IOC_IN)
*dir = "R";
if (cmd & (SVR4_IOC_INOUT|SVR4_IOC_VOID))
*argsiz = (cmd >> 16) & 0xff;
else
*argsiz = -1;
*c = (cmd >> 8) & 0xff;
*num = cmd & 0xff;
}
#endif
int
svr4_ioctl(p, uap, retval)
register struct proc *p;
register struct svr4_ioctl_args *uap;
int *retval;
{
char *dir;
char c;
int num;
int argsiz;
#ifdef DEBUG_SVR4
svr4_decode_cmd(uap->cmd, &dir, &c, &num, &argsiz);
printf("svr4_ioctl(%d, _IO%s(%c, %d, %d))\n", uap->fd,
dir, c, num, argsiz);
#endif
return ENOSYS;
}

1078
sys/compat/svr4/svr4_misc.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,95 @@
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from: syscalls.master,v 1.15 1994/05/07 05:06:35
*/
#define SVR4_SYS_syscall 0
#define SVR4_SYS_exit 1
#define SVR4_SYS_fork 2
#define SVR4_SYS_read 3
#define SVR4_SYS_write 4
#define SVR4_SYS_svr4_open 5
#define SVR4_SYS_close 6
#define SVR4_SYS_svr4_wait 7
#define SVR4_SYS_svr4_creat 8
#define SVR4_SYS_link 9
#define SVR4_SYS_unlink 10
#define SVR4_SYS_svr4_execv 11
#define SVR4_SYS_chdir 12
#define SVR4_SYS_time 13
#define SVR4_SYS_svr4_mknod 14
#define SVR4_SYS_chmod 15
#define SVR4_SYS_chown 16
#define SVR4_SYS_break 17
#define SVR4_SYS_svr4_stat 18
#define SVR4_SYS_lseek 19
#define SVR4_SYS_getpid 20
#define SVR4_SYS_setuid 23
#define SVR4_SYS_getuid 24
#define SVR4_SYS_svr4_fstat 28
#define SVR4_SYS_access 33
#define SVR4_SYS_sync 36
#define SVR4_SYS_kill 37
#define SVR4_SYS_dup 41
#define SVR4_SYS_pipe 42
#define SVR4_SYS_profil 44
#define SVR4_SYS_getgid 47
#define SVR4_SYS_msgsys 49
#define SVR4_SYS_svr4_syssun 50
#define SVR4_SYS_acct 51
#define SVR4_SYS_shmsys 52
#define SVR4_SYS_semsys 53
#define SVR4_SYS_svr4_ioctl 54
#define SVR4_SYS_fsync 58
#define SVR4_SYS_execve 59
#define SVR4_SYS_umask 60
#define SVR4_SYS_chroot 61
/* 70 is obsolete svr4_advfs */
/* 71 is obsolete svr4_unadvfs */
/* 72 is obsolete svr4_rmount */
/* 73 is obsolete svr4_rumount */
/* 74 is obsolete svr4_rfstart */
/* 75 is obsolete svr4_sigret */
/* 76 is obsolete svr4_rdebug */
/* 77 is obsolete svr4_rfstop */
#define SVR4_SYS_rmdir 79
#define SVR4_SYS_mkdir 80
/* 82 is obsolete svr4_libattach */
/* 83 is obsolete svr4_libdetach */
#define SVR4_SYS_svr4_lstat 88
#define SVR4_SYS_symlink 89
#define SVR4_SYS_readlink 90
#define SVR4_SYS_setgroups 91
#define SVR4_SYS_getgroups 92
#define SVR4_SYS_fchmod 93
#define SVR4_SYS_fchown 94
#define SVR4_SYS_sigprocmask 95
#define SVR4_SYS_sigaltstack 96
#define SVR4_SYS_sigsuspend 97
#define SVR4_SYS_sigaction 98
#define SVR4_SYS_svr4_sigpending 99
#define SVR4_SYS_pathconf 113
#define SVR4_SYS_mincore 114
#define SVR4_SYS_svr4_mmap 115
#define SVR4_SYS_mprotect 116
#define SVR4_SYS_munmap 117
#define SVR4_SYS_fpathconf 118
#define SVR4_SYS_vfork 119
#define SVR4_SYS_fchdir 120
#define SVR4_SYS_readv 121
#define SVR4_SYS_writev 122
#define SVR4_SYS_svr4_setrlimit 128
#define SVR4_SYS_svr4_getrlimit 129
#define SVR4_SYS_rename 134
#define SVR4_SYS_svr4_uname 135
#define SVR4_SYS_setegid 136
#define SVR4_SYS_svr4_sysconfig 137
#define SVR4_SYS_adjtime 138
#define SVR4_SYS_seteuid 141
#define SVR4_SYS_svr4_fchroot 153
#define SVR4_SYS_svr4_vhangup 155
#define SVR4_SYS_gettimeofday 156
#define SVR4_SYS_getitimer 157
#define SVR4_SYS_setitimer 158

View File

@ -0,0 +1,212 @@
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from: syscalls.master,v 1.15 1994/05/07 05:06:35
*/
char *svr4_syscallnames[] = {
"syscall", /* 0 = syscall */
"exit", /* 1 = exit */
"fork", /* 2 = fork */
"read", /* 3 = read */
"write", /* 4 = write */
"svr4_open", /* 5 = svr4_open */
"close", /* 6 = close */
"svr4_wait", /* 7 = svr4_wait */
"svr4_creat", /* 8 = svr4_creat */
"link", /* 9 = link */
"unlink", /* 10 = unlink */
"svr4_execv", /* 11 = svr4_execv */
"chdir", /* 12 = chdir */
"time", /* 13 = time */
"svr4_mknod", /* 14 = svr4_mknod */
"chmod", /* 15 = chmod */
"chown", /* 16 = chown */
"break", /* 17 = break */
"svr4_stat", /* 18 = svr4_stat */
"lseek", /* 19 = lseek */
"getpid", /* 20 = getpid */
"#21", /* 21 = svr4_old_mount */
"#22", /* 22 = System V umount */
"setuid", /* 23 = setuid */
"getuid", /* 24 = getuid */
"#25", /* 25 = svr4_stime */
"#26", /* 26 = svr4_ptrace */
"#27", /* 27 = svr4_alarm */
"svr4_fstat", /* 28 = svr4_fstat */
"#29", /* 29 = svr4_pause */
"#30", /* 30 = svr4_utime */
"#31", /* 31 = was stty */
"#32", /* 32 = was gtty */
"access", /* 33 = access */
"#34", /* 34 = svr4_nice */
"#35", /* 35 = svr4_statfs */
"sync", /* 36 = sync */
"kill", /* 37 = kill */
"#38", /* 38 = svr4_fstatfs */
"#39", /* 39 = svr4_pgrpsys */
"#40", /* 40 = svr4_xenix */
"dup", /* 41 = dup */
"pipe", /* 42 = pipe */
"#43", /* 43 = svr4_times */
"profil", /* 44 = profil */
"#45", /* 45 = svr4_plock */
"#46", /* 46 = svr4_setgid */
"getgid", /* 47 = getgid */
"#48", /* 48 = svr4_signal */
#ifdef SYSVMSG
"msgsys", /* 49 = msgsys */
#else
"#49", /* 49 = nosys */
#endif
"svr4_syssun", /* 50 = svr4_syssun */
"acct", /* 51 = acct */
#ifdef SYSVSHM
"shmsys", /* 52 = shmsys */
#else
"#52", /* 52 = nosys */
#endif
#ifdef SYSVSEM
"semsys", /* 53 = semsys */
#else
"#53", /* 53 = nosys */
#endif
"svr4_ioctl", /* 54 = svr4_ioctl */
"#55", /* 55 = svr4_uadmin */
"#56", /* 56 = svr4_exch */
"#57", /* 57 = svr4_utssys */
"fsync", /* 58 = fsync */
"execve", /* 59 = execve */
"umask", /* 60 = umask */
"chroot", /* 61 = chroot */
"#62", /* 62 = svr4_fcntl */
"#63", /* 63 = nosys */
"#64", /* 64 = reserved for unix/pc */
"#65", /* 65 = reserved for unix/pc */
"#66", /* 66 = reserved for unix/pc */
"#67", /* 67 = reserved for unix/pc */
"#68", /* 68 = reserved for unix/pc */
"#69", /* 69 = reserved for unix/pc */
"obs_svr4_advfs", /* 70 = obsolete svr4_advfs */
"obs_svr4_unadvfs", /* 71 = obsolete svr4_unadvfs */
"obs_svr4_rmount", /* 72 = obsolete svr4_rmount */
"obs_svr4_rumount", /* 73 = obsolete svr4_rumount */
"obs_svr4_rfstart", /* 74 = obsolete svr4_rfstart */
"obs_svr4_sigret", /* 75 = obsolete svr4_sigret */
"obs_svr4_rdebug", /* 76 = obsolete svr4_rdebug */
"obs_svr4_rfstop", /* 77 = obsolete svr4_rfstop */
"#78", /* 78 = svr4_rfsys */
"rmdir", /* 79 = rmdir */
"mkdir", /* 80 = mkdir */
"#81", /* 81 = svr4_getdents */
"obs_svr4_libattach", /* 82 = obsolete svr4_libattach */
"obs_svr4_libdetach", /* 83 = obsolete svr4_libdetach */
"#84", /* 84 = svr4_sysfs */
"#85", /* 85 = getmsg */
"#86", /* 86 = putmsg */
"#87", /* 87 = poll */
"svr4_lstat", /* 88 = svr4_lstat */
"symlink", /* 89 = symlink */
"readlink", /* 90 = readlink */
"setgroups", /* 91 = setgroups */
"getgroups", /* 92 = getgroups */
"fchmod", /* 93 = fchmod */
"fchown", /* 94 = fchown */
"sigprocmask", /* 95 = sigprocmask */
"sigaltstack", /* 96 = sigaltstack */
"sigsuspend", /* 97 = sigsuspend */
"sigaction", /* 98 = sigaction */
"svr4_sigpending", /* 99 = svr4_sigpending */
"#100", /* 100 = svr4_context */
"#101", /* 101 = svr4_evsys */
"#102", /* 102 = svr4_evtrapret */
"#103", /* 103 = svr4_statvfs */
"#104", /* 104 = svr4_fstatvfs */
"#105", /* 105 = svr4 reserved */
#ifdef NFSSERVER
"#106", /* 106 = svr4_nfssvc */
#else
"#106", /* 106 = nosys */
#endif
"#107", /* 107 = svr4_waitsys */
"#108", /* 108 = svr4_sigsendsys */
"#109", /* 109 = svr4_hrtsys */
"#110", /* 110 = svr4_acancel */
"#111", /* 111 = svr4_async */
"#112", /* 112 = svr4_priocntlsys */
"pathconf", /* 113 = pathconf */
"mincore", /* 114 = mincore */
"svr4_mmap", /* 115 = svr4_mmap */
"mprotect", /* 116 = mprotect */
"munmap", /* 117 = munmap */
"fpathconf", /* 118 = fpathconf */
"vfork", /* 119 = vfork */
"fchdir", /* 120 = fchdir */
"readv", /* 121 = readv */
"writev", /* 122 = writev */
"#123", /* 123 = svr4_xstat */
"#124", /* 124 = svr4_lxstat */
"#125", /* 125 = svr4_fxstat */
"#126", /* 126 = svr4_xmknod */
"#127", /* 127 = svr4_clocal */
"svr4_setrlimit", /* 128 = svr4_setrlimit */
"svr4_getrlimit", /* 129 = svr4_getrlimit */
"#130", /* 130 = svr4_lchown */
"#131", /* 131 = svr4_memcntl */
"#132", /* 132 = svr4_getpmsg */
"#133", /* 133 = svr4_putpmsg */
"rename", /* 134 = rename */
"svr4_uname", /* 135 = svr4_uname */
"setegid", /* 136 = setegid */
"svr4_sysconfig", /* 137 = svr4_sysconfig */
"adjtime", /* 138 = adjtime */
"#139", /* 139 = svr4_systeminfo */
"#140", /* 140 = reserved */
"seteuid", /* 141 = seteuid */
"#142", /* 142 = vtrace */
"#143", /* 143 = svr4_fork1 */
"#144", /* 144 = svr4_sigwait */
"#145", /* 145 = svr4_lwp_info */
"#146", /* 146 = svr4_yield */
"#147", /* 147 = svr4_lwp_sema_p */
"#148", /* 148 = svr4_lwp_sema_v */
"#149", /* 149 = reserved */
"#150", /* 150 = reserved */
"#151", /* 151 = reserved */
"#152", /* 152 = svr4_modctl */
"svr4_fchroot", /* 153 = svr4_fchroot */
"#154", /* 154 = svr4_utimes */
"svr4_vhangup", /* 155 = svr4_vhangup */
"gettimeofday", /* 156 = gettimeofday */
"getitimer", /* 157 = getitimer */
"setitimer", /* 158 = setitimer */
"#159", /* 159 = svr4_lwp_create */
"#160", /* 160 = svr4_lwp_exit */
"#161", /* 161 = svr4_lwp_suspend */
"#162", /* 162 = svr4_lwp_continue */
"#163", /* 163 = svr4_lwp_kill */
"#164", /* 164 = svr4_lwp_self */
"#165", /* 165 = svr4_lwp_getprivate */
"#166", /* 166 = svr4_lwp_setprivate */
"#167", /* 167 = svr4_lwp_wait */
"#168", /* 168 = svr4_lwp_mutex_unlock */
"#169", /* 169 = svr4_lwp_mutex_lock */
"#170", /* 170 = svr4_lwp_cond_wait */
"#171", /* 171 = svr4_lwp_cond_signal */
"#172", /* 172 = svr4_lwp_cond_broadcast */
"#173", /* 173 = svr4_pread */
"#174", /* 174 = svr4_pwrite */
"#175", /* 175 = svr4_llseek */
"#176", /* 176 = svr4_inst_sync */
"#177", /* 177 = reserved */
"#178", /* 178 = reserved */
"#179", /* 179 = reserved */
"#180", /* 180 = reserved */
"#181", /* 181 = reserved */
"#182", /* 182 = reserved */
"#183", /* 183 = reserved */
"#184", /* 184 = reserved */
"#185", /* 185 = reserved */
"#186", /* 186 = svr4_auditsys */
};

View File

@ -0,0 +1,330 @@
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from: syscalls.master,v 1.15 1994/05/07 05:06:35
*/
#include <sys/param.h>
#include <sys/systm.h>
int nosys();
int nosys();
int exit();
int fork();
int read();
int write();
int svr4_open();
int close();
int svr4_wait();
int svr4_creat();
int link();
int unlink();
int svr4_execv();
int chdir();
int time();
int svr4_mknod();
int chmod();
int chown();
int obreak();
int svr4_stat();
int olseek();
int getpid();
int setuid();
int getuid();
int svr4_fstat();
int access();
int sync();
int kill();
int dup();
int pipe();
int profil();
int getgid();
#ifdef SYSVMSG
int msgsys();
#else
#endif
int svr4_syssun();
int acct();
#ifdef SYSVSHM
int shmsys();
#else
#endif
#ifdef SYSVSEM
int semsys();
#else
#endif
int svr4_ioctl();
int fsync();
int execve();
int umask();
int chroot();
int rmdir();
int mkdir();
int svr4_lstat();
int symlink();
int readlink();
int setgroups();
int getgroups();
int fchmod();
int fchown();
int sigprocmask();
int sigaltstack();
int sigsuspend();
int sigaction();
int svr4_sigpending();
#ifdef NFSSERVER
#else
#endif
int pathconf();
int mincore();
int svr4_mmap();
int mprotect();
int munmap();
int fpathconf();
int vfork();
int fchdir();
int readv();
int writev();
int svr4_setrlimit();
int svr4_getrlimit();
int rename();
int svr4_uname();
int setegid();
int svr4_sysconfig();
int adjtime();
int seteuid();
int svr4_fchroot();
int svr4_vhangup();
int gettimeofday();
int getitimer();
int setitimer();
#ifdef XXX_UNUSED
#define compat(n, name) n, __CONCAT(o,name)
#ifdef SYSVMSG
#else
#endif
#ifdef SYSVSHM
#else
#endif
#ifdef SYSVSEM
#else
#endif
#ifdef NFSSERVER
#else
#endif
#else /* XXX_UNUSED */
#define compat(n, name) 0, nosys
#endif /* XXX_UNUSED */
struct sysent svr4_sysent[] = {
{ 0, nosys }, /* 0 = syscall */
{ 1, exit }, /* 1 = exit */
{ 0, fork }, /* 2 = fork */
{ 3, read }, /* 3 = read */
{ 3, write }, /* 4 = write */
{ 3, svr4_open }, /* 5 = svr4_open */
{ 1, close }, /* 6 = close */
{ 4, svr4_wait }, /* 7 = svr4_wait */
{ 2, svr4_creat }, /* 8 = svr4_creat */
{ 2, link }, /* 9 = link */
{ 1, unlink }, /* 10 = unlink */
{ 2, svr4_execv }, /* 11 = svr4_execv */
{ 1, chdir }, /* 12 = chdir */
{ 0, time }, /* 13 = time */
{ 3, svr4_mknod }, /* 14 = svr4_mknod */
{ 2, chmod }, /* 15 = chmod */
{ 3, chown }, /* 16 = chown */
{ 1, obreak }, /* 17 = break */
{ 2, svr4_stat }, /* 18 = svr4_stat */
{ 3, olseek }, /* 19 = lseek */
{ 0, getpid }, /* 20 = getpid */
{ 0, nosys }, /* 21 = svr4_old_mount */
{ 0, nosys }, /* 22 = System V umount */
{ 1, setuid }, /* 23 = setuid */
{ 0, getuid }, /* 24 = getuid */
{ 0, nosys }, /* 25 = svr4_stime */
{ 0, nosys }, /* 26 = svr4_ptrace */
{ 0, nosys }, /* 27 = svr4_alarm */
{ 1, svr4_fstat }, /* 28 = svr4_fstat */
{ 0, nosys }, /* 29 = svr4_pause */
{ 0, nosys }, /* 30 = svr4_utime */
{ 0, nosys }, /* 31 = was stty */
{ 0, nosys }, /* 32 = was gtty */
{ 2, access }, /* 33 = access */
{ 0, nosys }, /* 34 = svr4_nice */
{ 0, nosys }, /* 35 = svr4_statfs */
{ 0, sync }, /* 36 = sync */
{ 2, kill }, /* 37 = kill */
{ 0, nosys }, /* 38 = svr4_fstatfs */
{ 0, nosys }, /* 39 = svr4_pgrpsys */
{ 0, nosys }, /* 40 = svr4_xenix */
{ 2, dup }, /* 41 = dup */
{ 0, pipe }, /* 42 = pipe */
{ 0, nosys }, /* 43 = svr4_times */
{ 4, profil }, /* 44 = profil */
{ 0, nosys }, /* 45 = svr4_plock */
{ 0, nosys }, /* 46 = svr4_setgid */
{ 0, getgid }, /* 47 = getgid */
{ 0, nosys }, /* 48 = svr4_signal */
#ifdef SYSVMSG
{ 6, msgsys }, /* 49 = msgsys */
#else
{ 0, nosys }, /* 49 = nosys */
#endif
{ 1, svr4_syssun }, /* 50 = svr4_syssun */
{ 1, acct }, /* 51 = acct */
#ifdef SYSVSHM
{ 4, shmsys }, /* 52 = shmsys */
#else
{ 0, nosys }, /* 52 = nosys */
#endif
#ifdef SYSVSEM
{ 5, semsys }, /* 53 = semsys */
#else
{ 0, nosys }, /* 53 = nosys */
#endif
{ 3, svr4_ioctl }, /* 54 = svr4_ioctl */
{ 0, nosys }, /* 55 = svr4_uadmin */
{ 0, nosys }, /* 56 = svr4_exch */
{ 0, nosys }, /* 57 = svr4_utssys */
{ 1, fsync }, /* 58 = fsync */
{ 3, execve }, /* 59 = execve */
{ 1, umask }, /* 60 = umask */
{ 1, chroot }, /* 61 = chroot */
{ 0, nosys }, /* 62 = svr4_fcntl */
{ 0, nosys }, /* 63 = nosys */
{ 0, nosys }, /* 64 = reserved for unix/pc */
{ 0, nosys }, /* 65 = reserved for unix/pc */
{ 0, nosys }, /* 66 = reserved for unix/pc */
{ 0, nosys }, /* 67 = reserved for unix/pc */
{ 0, nosys }, /* 68 = reserved for unix/pc */
{ 0, nosys }, /* 69 = reserved for unix/pc */
{ 0, nosys }, /* 70 = obsolete svr4_advfs */
{ 0, nosys }, /* 71 = obsolete svr4_unadvfs */
{ 0, nosys }, /* 72 = obsolete svr4_rmount */
{ 0, nosys }, /* 73 = obsolete svr4_rumount */
{ 0, nosys }, /* 74 = obsolete svr4_rfstart */
{ 0, nosys }, /* 75 = obsolete svr4_sigret */
{ 0, nosys }, /* 76 = obsolete svr4_rdebug */
{ 0, nosys }, /* 77 = obsolete svr4_rfstop */
{ 0, nosys }, /* 78 = svr4_rfsys */
{ 1, rmdir }, /* 79 = rmdir */
{ 2, mkdir }, /* 80 = mkdir */
{ 0, nosys }, /* 81 = svr4_getdents */
{ 0, nosys }, /* 82 = obsolete svr4_libattach */
{ 0, nosys }, /* 83 = obsolete svr4_libdetach */
{ 0, nosys }, /* 84 = svr4_sysfs */
{ 0, nosys }, /* 85 = getmsg */
{ 0, nosys }, /* 86 = putmsg */
{ 0, nosys }, /* 87 = poll */
{ 2, svr4_lstat }, /* 88 = svr4_lstat */
{ 2, symlink }, /* 89 = symlink */
{ 3, readlink }, /* 90 = readlink */
{ 2, setgroups }, /* 91 = setgroups */
{ 2, getgroups }, /* 92 = getgroups */
{ 2, fchmod }, /* 93 = fchmod */
{ 3, fchown }, /* 94 = fchown */
{ 2, sigprocmask }, /* 95 = sigprocmask */
{ 2, sigaltstack }, /* 96 = sigaltstack */
{ 1, sigsuspend }, /* 97 = sigsuspend */
{ 3, sigaction }, /* 98 = sigaction */
{ 1, svr4_sigpending }, /* 99 = svr4_sigpending */
{ 0, nosys }, /* 100 = svr4_context */
{ 0, nosys }, /* 101 = svr4_evsys */
{ 0, nosys }, /* 102 = svr4_evtrapret */
{ 0, nosys }, /* 103 = svr4_statvfs */
{ 0, nosys }, /* 104 = svr4_fstatvfs */
{ 0, nosys }, /* 105 = svr4 reserved */
#ifdef NFSSERVER
{ 0, nosys }, /* 106 = svr4_nfssvc */
#else
{ 0, nosys }, /* 106 = nosys */
#endif
{ 0, nosys }, /* 107 = svr4_waitsys */
{ 0, nosys }, /* 108 = svr4_sigsendsys */
{ 0, nosys }, /* 109 = svr4_hrtsys */
{ 0, nosys }, /* 110 = svr4_acancel */
{ 0, nosys }, /* 111 = svr4_async */
{ 0, nosys }, /* 112 = svr4_priocntlsys */
{ 2, pathconf }, /* 113 = pathconf */
{ 3, mincore }, /* 114 = mincore */
{ 6, svr4_mmap }, /* 115 = svr4_mmap */
{ 3, mprotect }, /* 116 = mprotect */
{ 2, munmap }, /* 117 = munmap */
{ 2, fpathconf }, /* 118 = fpathconf */
{ 0, vfork }, /* 119 = vfork */
{ 1, fchdir }, /* 120 = fchdir */
{ 3, readv }, /* 121 = readv */
{ 3, writev }, /* 122 = writev */
{ 0, nosys }, /* 123 = svr4_xstat */
{ 0, nosys }, /* 124 = svr4_lxstat */
{ 0, nosys }, /* 125 = svr4_fxstat */
{ 0, nosys }, /* 126 = svr4_xmknod */
{ 0, nosys }, /* 127 = svr4_clocal */
{ 2, svr4_setrlimit }, /* 128 = svr4_setrlimit */
{ 2, svr4_getrlimit }, /* 129 = svr4_getrlimit */
{ 0, nosys }, /* 130 = svr4_lchown */
{ 0, nosys }, /* 131 = svr4_memcntl */
{ 0, nosys }, /* 132 = svr4_getpmsg */
{ 0, nosys }, /* 133 = svr4_putpmsg */
{ 2, rename }, /* 134 = rename */
{ 1, svr4_uname }, /* 135 = svr4_uname */
{ 1, setegid }, /* 136 = setegid */
{ 1, svr4_sysconfig }, /* 137 = svr4_sysconfig */
{ 2, adjtime }, /* 138 = adjtime */
{ 0, nosys }, /* 139 = svr4_systeminfo */
{ 0, nosys }, /* 140 = reserved */
{ 1, seteuid }, /* 141 = seteuid */
{ 0, nosys }, /* 142 = vtrace */
{ 0, nosys }, /* 143 = svr4_fork1 */
{ 0, nosys }, /* 144 = svr4_sigwait */
{ 0, nosys }, /* 145 = svr4_lwp_info */
{ 0, nosys }, /* 146 = svr4_yield */
{ 0, nosys }, /* 147 = svr4_lwp_sema_p */
{ 0, nosys }, /* 148 = svr4_lwp_sema_v */
{ 0, nosys }, /* 149 = reserved */
{ 0, nosys }, /* 150 = reserved */
{ 0, nosys }, /* 151 = reserved */
{ 0, nosys }, /* 152 = svr4_modctl */
{ 1, svr4_fchroot }, /* 153 = svr4_fchroot */
{ 0, nosys }, /* 154 = svr4_utimes */
{ 0, svr4_vhangup }, /* 155 = svr4_vhangup */
{ 2, gettimeofday }, /* 156 = gettimeofday */
{ 2, getitimer }, /* 157 = getitimer */
{ 3, setitimer }, /* 158 = setitimer */
{ 0, nosys }, /* 159 = svr4_lwp_create */
{ 0, nosys }, /* 160 = svr4_lwp_exit */
{ 0, nosys }, /* 161 = svr4_lwp_suspend */
{ 0, nosys }, /* 162 = svr4_lwp_continue */
{ 0, nosys }, /* 163 = svr4_lwp_kill */
{ 0, nosys }, /* 164 = svr4_lwp_self */
{ 0, nosys }, /* 165 = svr4_lwp_getprivate */
{ 0, nosys }, /* 166 = svr4_lwp_setprivate */
{ 0, nosys }, /* 167 = svr4_lwp_wait */
{ 0, nosys }, /* 168 = svr4_lwp_mutex_unlock */
{ 0, nosys }, /* 169 = svr4_lwp_mutex_lock */
{ 0, nosys }, /* 170 = svr4_lwp_cond_wait */
{ 0, nosys }, /* 171 = svr4_lwp_cond_signal */
{ 0, nosys }, /* 172 = svr4_lwp_cond_broadcast */
{ 0, nosys }, /* 173 = svr4_pread */
{ 0, nosys }, /* 174 = svr4_pwrite */
{ 0, nosys }, /* 175 = svr4_llseek */
{ 0, nosys }, /* 176 = svr4_inst_sync */
{ 0, nosys }, /* 177 = reserved */
{ 0, nosys }, /* 178 = reserved */
{ 0, nosys }, /* 179 = reserved */
{ 0, nosys }, /* 180 = reserved */
{ 0, nosys }, /* 181 = reserved */
{ 0, nosys }, /* 182 = reserved */
{ 0, nosys }, /* 183 = reserved */
{ 0, nosys }, /* 184 = reserved */
{ 0, nosys }, /* 185 = reserved */
{ 0, nosys }, /* 186 = svr4_auditsys */
};
int nsvr4_sysent = sizeof(svr4_sysent) / sizeof(svr4_sysent[0]);

View File

@ -0,0 +1,225 @@
$Id: syscalls.master,v 1.1 1994/05/22 10:04:45 deraadt Exp $
; from: @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from SunOS).
; Processed to created svr4_sysent.c, svr4_syscalls.c and svr4_syscall.h.
; Columns: number type nargs name altname/comments
; number system call number, must be in order
; type one of STD, OBSOL, UNIMPL, STD
; nargs number of arguments
; name name of syscall routine
; altname name of system call if different
; for UNIMPL/OBSOL, name continues with comments
; types:
; STD always included
; STD included on COMPAT #ifdef
; LIBSTD included on COMPAT #ifdef, and placed in syscall.h
; OBSOL obsolete, not included in system, only specifies name
; UNIMPL not implemented, placeholder only
; #ifdef's, etc. may be included, and are copied to the output files.
0 STD 0 nosys syscall
1 STD 1 exit
2 STD 0 fork
3 STD 3 read
4 STD 3 write
5 STD 3 svr4_open
6 STD 1 close
7 STD 4 svr4_wait
8 STD 2 svr4_creat
9 STD 2 link
10 STD 1 unlink
11 STD 2 svr4_execv
12 STD 1 chdir
13 STD 0 time
14 STD 3 svr4_mknod
15 STD 2 chmod
16 STD 3 chown
17 STD 1 obreak break
18 STD 2 svr4_stat
19 STD 3 olseek lseek
20 STD 0 getpid
21 UNIMPL 1 svr4_old_mount
22 UNIMPL 1 System V umount
23 STD 1 setuid
24 STD 0 getuid
25 UNIMPL 1 svr4_stime
26 UNIMPL 5 svr4_ptrace
27 UNIMPL 1 svr4_alarm
28 STD 1 svr4_fstat
29 UNIMPL 0 svr4_pause
30 UNIMPL 2 svr4_utime
31 UNIMPL 0 was stty
32 UNIMPL 0 was gtty
33 STD 2 access
34 UNIMPL 1 svr4_nice
35 UNIMPL 1 svr4_statfs
36 STD 0 sync
37 STD 2 kill
38 UNIMPL 1 svr4_fstatfs
39 UNIMPL 3 svr4_pgrpsys
40 UNIMPL 9 svr4_xenix
41 STD 2 dup
42 STD 0 pipe
43 UNIMPL 1 svr4_times
44 STD 4 profil
45 UNIMPL 0 svr4_plock
46 UNIMPL 1 svr4_setgid
47 STD 0 getgid
48 UNIMPL 3 svr4_signal
#ifdef SYSVMSG
49 STD 6 msgsys
#else
49 UNIMPL 0 nosys
#endif
50 STD 1 svr4_syssun
51 STD 1 acct
#ifdef SYSVSHM
52 STD 4 shmsys
#else
52 UNIMPL 0 nosys
#endif
#ifdef SYSVSEM
53 STD 5 semsys
#else
53 UNIMPL 0 nosys
#endif
54 STD 3 svr4_ioctl
55 UNIMPL 0 svr4_uadmin
56 UNIMPL 0 svr4_exch
57 UNIMPL 4 svr4_utssys
58 STD 1 fsync
59 STD 3 execve
60 STD 1 umask
61 STD 1 chroot
62 UNIMPL 3 svr4_fcntl
63 UNIMPL 0 nosys
64 UNIMPL 0 reserved for unix/pc
65 UNIMPL 0 reserved for unix/pc
66 UNIMPL 0 reserved for unix/pc
67 UNIMPL 0 reserved for unix/pc
68 UNIMPL 0 reserved for unix/pc
69 UNIMPL 0 reserved for unix/pc
70 OBSOL 0 svr4_advfs
71 OBSOL 0 svr4_unadvfs
72 OBSOL 0 svr4_rmount
73 OBSOL 0 svr4_rumount
74 OBSOL 0 svr4_rfstart
75 OBSOL 0 svr4_sigret
76 OBSOL 0 svr4_rdebug
77 OBSOL 0 svr4_rfstop
78 UNIMPL 0 svr4_rfsys
79 STD 1 rmdir
80 STD 2 mkdir
81 UNIMPL 3 svr4_getdents
82 OBSOL 0 svr4_libattach
83 OBSOL 0 svr4_libdetach
84 UNIMPL 0 svr4_sysfs
85 UNIMPL 4 getmsg
86 UNIMPL 4 putmsg
87 UNIMPL 3 poll
88 STD 2 svr4_lstat
89 STD 2 symlink
90 STD 3 readlink
91 STD 2 setgroups
92 STD 2 getgroups
93 STD 2 fchmod
94 STD 3 fchown
95 STD 2 sigprocmask
96 STD 2 sigaltstack
97 STD 1 sigsuspend
98 STD 3 sigaction
99 STD 1 svr4_sigpending
100 UNIMPL 0 svr4_context
101 UNIMPL 0 svr4_evsys
102 UNIMPL 0 svr4_evtrapret
103 UNIMPL 0 svr4_statvfs
104 UNIMPL 0 svr4_fstatvfs
105 UNIMPL 0 svr4 reserved
#ifdef NFSSERVER
106 UNIMPL 0 svr4_nfssvc
#else
106 UNIMPL 0 nosys
#endif
107 UNIMPL 0 svr4_waitsys
108 UNIMPL 0 svr4_sigsendsys
109 UNIMPL 0 svr4_hrtsys
110 UNIMPL 0 svr4_acancel
111 UNIMPL 0 svr4_async
112 UNIMPL 0 svr4_priocntlsys
113 STD 2 pathconf
114 STD 3 mincore
115 STD 6 svr4_mmap
116 STD 3 mprotect
117 STD 2 munmap
118 STD 2 fpathconf
119 STD 0 vfork
120 STD 1 fchdir
121 STD 3 readv
122 STD 3 writev
123 UNIMPL 0 svr4_xstat
124 UNIMPL 0 svr4_lxstat
125 UNIMPL 0 svr4_fxstat
126 UNIMPL 0 svr4_xmknod
127 UNIMPL 0 svr4_clocal
128 STD 2 svr4_setrlimit
129 STD 2 svr4_getrlimit
130 UNIMPL 2 svr4_lchown
131 UNIMPL 0 svr4_memcntl
132 UNIMPL 0 svr4_getpmsg
133 UNIMPL 0 svr4_putpmsg
134 STD 2 rename
135 STD 1 svr4_uname
136 STD 1 setegid
137 STD 1 svr4_sysconfig
138 STD 2 adjtime
139 UNIMPL 0 svr4_systeminfo
140 UNIMPL 0 reserved
141 STD 1 seteuid
142 UNIMPL 3 vtrace
143 UNIMPL 0 svr4_fork1
144 UNIMPL 0 svr4_sigwait
145 UNIMPL 0 svr4_lwp_info
146 UNIMPL 0 svr4_yield
147 UNIMPL 0 svr4_lwp_sema_p
148 UNIMPL 0 svr4_lwp_sema_v
149 UNIMPL 0 reserved
150 UNIMPL 0 reserved
151 UNIMPL 0 reserved
152 UNIMPL 0 svr4_modctl
153 STD 1 svr4_fchroot
154 UNIMPL 2 svr4_utimes
155 STD 0 svr4_vhangup
156 STD 2 gettimeofday
157 STD 2 getitimer
158 STD 3 setitimer
159 UNIMPL 0 svr4_lwp_create
160 UNIMPL 0 svr4_lwp_exit
161 UNIMPL 0 svr4_lwp_suspend
162 UNIMPL 0 svr4_lwp_continue
163 UNIMPL 0 svr4_lwp_kill
164 UNIMPL 0 svr4_lwp_self
165 UNIMPL 0 svr4_lwp_getprivate
166 UNIMPL 0 svr4_lwp_setprivate
167 UNIMPL 0 svr4_lwp_wait
168 UNIMPL 0 svr4_lwp_mutex_unlock
169 UNIMPL 0 svr4_lwp_mutex_lock
170 UNIMPL 0 svr4_lwp_cond_wait
171 UNIMPL 0 svr4_lwp_cond_signal
172 UNIMPL 0 svr4_lwp_cond_broadcast
173 UNIMPL 0 svr4_pread
174 UNIMPL 0 svr4_pwrite
175 UNIMPL 0 svr4_llseek
176 UNIMPL 0 svr4_inst_sync
177 UNIMPL 0 reserved
178 UNIMPL 0 reserved
179 UNIMPL 0 reserved
180 UNIMPL 0 reserved
181 UNIMPL 0 reserved
182 UNIMPL 0 reserved
183 UNIMPL 0 reserved
184 UNIMPL 0 reserved
185 UNIMPL 0 reserved
186 UNIMPL 0 svr4_auditsys