Initial revision

This commit is contained in:
Wichert Akkerman
1999-02-19 00:21:36 +00:00
commit 76baf7c9f6
104 changed files with 33797 additions and 0 deletions

30
COPYRIGHT Normal file
View File

@ -0,0 +1,30 @@
Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
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$

33
CREDITS Normal file
View File

@ -0,0 +1,33 @@
The primary authors of strace are:
Paul Kranenburg <pk@cs.few.eur.nl>
Branko Lankester <branko@hacktic.nl>
Rick Sladkey <jrs@world.std.com>
Thanks to the follow people for contributing to strace by reporting
bugs, providing fixes, providing information, providing resources or
porting to new systems:
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Marty Leisner <leisner@sdsp.mc.xerox.com>
Lupe Christoph <lupe@alanya.isar.muc.de>
Thanh Ma <tma@encore.com>
Keith Thompson <kst@alsys.com>
Roland Borde <bo@uebemc.siemens.de>
Matt Day <mday@artisoft.com>
Joe Ilacqua <spike@world.std.com>
Ju"rgen Fluk <louis@marco.de>
Bo Kullmar <bk@kullmar.se>
Leonard N. Zubkoff <lnz@dandelion.com>
Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>
Juergen Weigert <jnweiger@immd4.informatik.uni-erlangen.de>
Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI>
Michael E Chastain <mec@duracef.shout.net>
Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>
David S. Miller <davem@caip.rutgers.edu>
Matthias Pfaller <leo@dachau.marco.de>
Thomas Bogendoerfer <tsbogend@bigbug.franken.de>
Richard Henderson <richard@twiddle.tamu.edu>
Tom Dyas <tdyas@eden.rutgers.edu>
Henrik Storner <storner@osiris.ping.dk>
David Mosberger-Tang <davidm@AZStarNet.com>

595
ChangeLog Normal file
View File

@ -0,0 +1,595 @@
Sun Oct 27 22:28:00 1996 J. Richard Sladkey <jrs@world.std.com>
* util.c (umovestr) [LINUX]: Handle Linux like SunOS4
instead of SVR4. That is, read a few bytes at a time
to avoid overrunning the end of the stack.
Fri May 31 01:48:49 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.1 is released.
Thu May 23 01:04:43 1996 J. Richard Sladkey <jrs@world.std.com>
* aclocal.m4 (AC_DECL_SYS_ERRLIST): Try looking in stdio.h
as well since that's where glibc declares it. Go figure.
* signal.c (sys_sigreturn) [ALPHA]: Use sigcontext
instead of sigcontext_struct since glibc v5+ apparently
plays games with the native OS namespace.
From David Mosberger-Tang <davidm@AZStarNet.com>.
Mon May 20 23:17:14 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.14 is released.
* aclocal.m4 (AC_STRUCT_MSG_CONTROL): New macro.
* configure.in: Add call to AC_STRUCT_MSG_CONTROL.
* net.c (printmsghdr): Handle BSD 4.3 and 4.4 msghdr members
differently.
Reported by Henrik Storner <storner@osiris.ping.dk>.
* configure.in: (AC_CHECK_{HEADERS,FUNCS}): Add checks for
sys/filio.h and sys/stream.h and remove check for poll.
* desc.c (decode_select, sys_select, sys_oldselect) [LINUX]:
Handle old and new styles of argument passing for select on Linux.
* ioctl.c, stream.c: Conditionalize stream code on presence of
sys/stream.h instead of poll because glibc implements poll but
not the rest of the stream interface.
* signal.c [LINUX]: Standardize on the name sigcontext_struct.
(sys_sigprocmask) [ALPHA]: Handle OSF flavor which is more like
sigsetmask.
* term.c (term_ioctl): Use _VMIN, if present, for TC{G,S}ETA*.
* util.c (umoven, umovestr): Move data in long-sized chunks
at a time, instead of hard coding it to be 4.
From David Mosberger-Tang <davidm@AZStarNet.com>.
Mon May 20 01:19:36 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.13 is released.
* configure.in (AC_CHECK_HEADERS): Add check for asm/sigcontext.h.
* signal.c [HAVE_ASM_SIGCONTEXT_H]: Conditionally include
asm/sigcontext.h to define sigcontext_struct and don't define it
locally if the header is present.
* syscall.c (nerrnos{0,2}): Correct size computation.
* Makefile.in: Remove dependencies and rules relating to files
normally found in the os directory. Because of the new scheme we
don't know precisely where they come from. Sigh.
* signalent.sh: Make it work for sunos4, linux, and svr4.
* {sunos4,linux{,/alpha},svr4}/Makefile.in: Make rules correspond
to traditional make syntax. Add signalent.h to files which can
unconditionally be rebuilt. Prevent signalent.h from being
unconditionally being rebuilt since it's customized.
* {sunos4,linux{,/alpha},svr4}/{ioctlent,errnoent,signalent}.h:
Use versions built by {ioctlent,errnoent,signaltent}.sh.
* sunos4/ioctlent.sh: Work around sprintf troubles with SunOS
4.1.4 and gcc 2.7.2.
Sun May 19 17:14:09 1996 J. Richard Sladkey <jrs@world.std.com>
* configure.in, Makefile.in: Add OSARCH concept to finish
build support for the alpha.
* Makefile.in, linux/Makefile.in: Rewrite clean, distclean,
and maintainer-clean rules.
* defs.h, ioctlsort.c: Make ioctl code member unsigned.
* ioctl.c, ioctlsort.c (compare): Perform explicit checking
for less, greater, and equal since subtraction on two's
complement numbers isn't an order relation (it isn't transitive)!
* linux/Makefile.in: Add rules for the signalent.h file.
* linux/alpha/Makefile.in: New file.
Sun May 19 01:12:28 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.12 is released.
* linux{,alpha}/ioctlent.sh: Tweak for recent kernels.
From Michael E Chastain <mec@duracef.shout.net>.
* defs.h (SUPPORTED_PERSONALITES, DEFAULT_PERSONALITY): New.
* syscall.c (set_personality): New.
* strace.c (main): Call set_personality.
* defs.h, syscall.c, ioctl.c, signal.c: Make sysent, errnoent,
ioctlent, and signalent indirect pointers and redirect them
based on personality.
* {sunos4,svr4,linux{,/alpha}}/signalent.h: New files.
Suggested by Tom Dyas <tdyas@eden.rutgers.edu>.
* util.c (upeek): Handle case where ptrace returns a long
and sizeof(long) != sizeof(int).
From Richard Henderson <richard@twiddle.tamu.edu>
Fri May 17 21:03:36 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.11 is released.
* many files: Fix more printf warnings for other platforms.
* ipc.c (sys_msgrcv) [LINUX]: Conditionalize definition of ipc_wrapper.
* linux/dummy.h: Handle missing library support for {send,recv}msg.
Reported by Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
* linux/syscall.h (sys_utimes): Fix a typo in the declaration.
From Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
Fri May 17 00:50:06 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.10 is released.
* Makfile.in: Add os/arch to includes so that a given arch
(like alpha) can override the native arch (like i386).
* configure.in: Check for sendmsg.
* net.c: Make sendmsg and recvmsg dependent on an autoconf
test. Reported by Michael E Chastain <mec@duracef.shout.net>.
* acconfig.h, configure.in: Detect the alpha.
* ioctl.c: Handle the alpha.
* defs.h: Make some members long for the alpha. Define
some register nicknames. Add support for WAITEXECVE.
* file.c [ALPHA]: Support the alpha for statfs. Add
osf_statfs and osf_fstatfs for the alpha. Make damn sure
major and minor results are suitable for passing to printf.
* signal.c, syscall.c: Support the alpha.
* process.c: Add alpha user offsets.
* most files: Use %l? for printf arguments since
most are now longs for the alpha.
* linux/alpha/{errnoent.h,ioctlent.{h,sh},syscallent.h}:
New for the alpha.
From Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
Wed May 15 00:29:37 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.9 is released.
* config.in, config.sub, install-sh: Upgrade to autoconf 2.10.
* linux/dummy.h, linux/syscallent.h, linux/syscall.h: Add recent
Linux kernel version system calls.
Wed Mar 13 01:03:38 1996 J. Richard Sladkey <jrs@world.std.com>
* ipc.c [SUNOS4]: Add SunOS support for decoding IPC calls.
* syscall.c [SUNOS4]: Compile decode_subcall on SunOS and
decode IPC calls using it.
* sunos4/dummy.h: Alias sys_semop to printargs.
* sunos4/syscall.h: Add new pseudo syscalls for IPC.
* sunos4/syscallent.h: Include new subcalls for IPC.
From Matthias Pfaller <leo@dachau.marco.de>.
Tue Feb 13 22:08:25 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.8 is released.
* time.c [LINUX]: Explicitly include linux/version.h.
* strace.c (main): Don't let them even *try* to
get strace to attach to itself since some systems
don't handle this case very gracefully.
Reported by David S. Miller <davem@caip.rutgers.edu>.
* Makefile.in (distclean): Fix it for subdirectories.
* sunos4/syscallent.h, svr4/syscallent.h: Fill in the new
sys_flags member for each defined system call.
Fri Dec 8 01:17:28 1995 Rick Sladkey <jrs@world.std.com>
* defs.h (TRACE_*): New flags to describe what class
of system call each system call is.
(sysent): Add sys_flags member.
* syscall.c (sysent): Define (and later undef) abbreviations
for the system call class flags.
(lookup_class): New function to translate strings to
system call class flags.
(qualify): Handle new system call class mechanism.
* linux/syscallent.h: Fill in the new sys_flags member
for each defined system call.
* defs.h (print_sock): Remove redundant and non-K&R C
compatible prototype. From Juergen Weigert
<jnweiger@immd4.informatik.uni-erlangen.de>.
Thu Dec 7 01:17:40 1995 Rick Sladkey <jrs@world.std.com>
* linux/ioctlent.sh: Tweak to improve ioctl accuracy.
From Michael E Chastain <mec@duracef.shout.net>.
* system.c (includes) [LINUX]: Add linux/nfs.h for recent
kernels. From Michael E Chastain <mec@duracef.shout.net>.
Wed Dec 6 21:52:28 1995 Rick Sladkey <jrs@world.std.com>
* file.c (sprintfstype): Enclose string result in double
quotes.
* time.c (sys_adjtimex) [LINUX]: Conditionalize
constantly evolving timex structure.
From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
* defs.h, syscall.c, strace.c: Rename syscall to
trace_syscall and change prototype and all callers
because of broken Linux shared libraries.
From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
* Makefile.in (clean): Check for a file with test -f not
test -d. From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
Tue Sep 26 02:32:31 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.7 is released.
* util.c (string_quote): Fix thinko which caused core
dumps for strings with quotes in them.
Reported by Marty Leisner <leisner@sdsp.mc.xerox.com>.
* linux/Makefile.in (errnoent.h rule): Grab all errno.h
files from /usr/include, not just the linux one.
From Michael E Chastain <mec@duracef.shout.net>.
* linux/errnoent.sh: Total rewrite to handle more ioctls with
fewer false positives on more kernel flavors.
From Michael E Chastain <mec@duracef.shout.net>.
Mon Sep 4 01:29:22 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.6 is released.
* linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add
sys_msync.
* mem.c (mctl_funcs, mctl_lockas, sys_mctl): Conditionalize
on MC_SYNC instead of HAVE_MCTL.
(mctl_sync): Conditionalize on MS_ASYNC instead of HAVE_MCTL.
(sys_msync): New function.
Sat Sep 2 12:06:04 1995 Rick Sladkey <jrs@world.std.com>
* linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add
sys_flock and sys_getdents.
* desc.c (flockcmds, sys_flock): Conditionalize on LOCK_SH
not SUNOS4.
* file.c (sys_getdents): Define unconditionally and handle
LINUX case.
* strace.c (main): Disallow username option unless both real
and effective uids are root.
Wed Aug 30 01:29:58 1995 Rick Sladkey <jrs@world.std.com>
* strace.c (main): Ensure that run_uid and run_gid are
always set to something meaningful.
(main, newoutf) [!SVR4]: Swap real and effective uids while
opening any output files.
(main) [!SVR4]: Treat effective uid of root as a request
to handle suid binaries correctly using the real uid of
the invoking user.
Sat Aug 19 00:06:08 1995 Rick Sladkey <jrs@world.std.com>
* Makefile.in: Add `|| true' to clean rule because
although GNU make 3.74 uses `sh -c' to invoke commands
every other make in the world uses `sh -ec'.
* syscall.c (syscall) [SVR4, MIPS]: The fifth and subsequent
arguments appear to be stored on the stack, not in the
registers following A3 (empirical result).
* defs.h: Add prototype for printsock.
* svr4/dummy.h: Remove generic handling of sys_mount.
* system.c [SVR4, MIPS]: Include several system headers to cleanly
get access to SGI mount information.
(mount_flags, nfs_flags) [SVR4, MIPS]: New objects.
(sys_mount) [SVR4, MIPS]: New function.
(sys_mount) [SVR4, !MIPS]: New function.
Tue Jul 4 00:30:34 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.5 is released.
* desc.c, resource.c, strace.c, syscall.c, time.c: Cast tv_sec and
tv_usec members to long when using printf.
* ipc.c: Omit define of __KERNEL__.
({MSG,SEM,SHM}_{STAT,INFO}): Explicitly define those things we
want which __KERNEL__ used to provide.
(sys_msgrcv): Change reference to ipc_kludge structure to
look-alike ipc_wrapper to avoid dependence on __KERNEL__.
mem.c (mmap_flags) [MAP_{GROWSDOWN,DENYWRITE,EXECUTABLE}]: Add
Linux specific options.
syscall.c: Use SYS_ERRLIST_DECLARED instead of guessing.
[E{RESTART{SYS,NO{INTR,HAND}},NOIOCTLCMD}]: Explicitly define
instead of depending of __KERNEL__.
term.c: Cast c_{i,o,c,l}flag to long when using printf.
Tue Jun 6 00:27:48 1995 Rick Sladkey <jrs@world.std.com>
* aclocal.m4 (AC_DECL_SYS_ERRLIST, AC_DECL__SYS_SIGLIST): New.
* configure.in: Call AC_DECL_SYS_ERRLIST, AC_DECL_SYS_SIGLIST,
and AC_DECL__SYS_SIGLIST.
* acconfig.h (SYS_ERRLIST_DECLARED): New.
* strace.c (strerror): Use SYS_ERRLIST_DECLARED.
(strsignal): Use SYS_SIGLIST_DECLARED.
net.c (sys_socket): Omit inadvertent surplus comma when
protocol family isn't PF_INET.
util.c (dumpstr): Fix incorrect printing of one too many
characters when the length is not an even multiple of 16 bytes.
Reported by Juergen Weigert
<jnweiger@immd4.informatik.uni-erlangen.de>.
Thu May 4 23:37:47 1995 Rick Sladkey <jrs@world.std.com>
* ioctl.c (compare): Change prototype to match POSIX qsort.
* signal.c (sigishandled) [SVR4]: Omit everything after return.
* strace.c (trace) [SVR4]: Break out of for loop instead of
returning when finished so final return statement is executed.
* syscall.c (internal_syscall): Add more SYS_wait* variations.
(syscall) [LINUX]: Correct typo which commented out the M68K
argument to ifdef.
* util.c (printstr): Cast unsigned char pointer argument
to char pointer in umovestr call.
(dumpstr): Likewise for umoven.
Wed May 3 01:10:56 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.4 is released.
* signal.c (sys_sigblock): Move after the definition of
sys_sigsetmask that it calls to avoid an implicit declaration.
* stream.c (transport_user_options, transport_server_options):
Only needed if TI_BIND is defined.
* configure.in: Add -Wno-implicit to WARNFLAGS on SunOS 4.x.
* process.c (internal_fork) [SVR4]: Fix a typo that omitted
the tcp arguement from the call to exiting. Add getrval2
check so no fork processing is done in the child.
(printwaitn): Initialize exited so that its value is defined
for all flows of execution.
Tue May 2 22:39:42 1995 Rick Sladkey <jrs@world.std.com>
* linux/dummy.h: Add aliases for sysfs, personality, afs_syscall,
setfsuid, setfsgid, and _llseek syscalls.
* linux/syscall.h: Add prototypes for them.
* linux/syscallent.h: Add them to the syscall entries table.
* system.c (headers) [LINUX]: Include linux/unistd.h to get __NR_*
defines and conditionally include linux/personality.h if
__NR_personality is defined.
(personality_options) [LINUX]: New table.
(sys_personality) [LINUX]: New function.
Tue May 2 00:20:39 1995 Rick Sladkey <jrs@world.std.com>
* strace.c (trace) [!SVR4]: Change forever loop to one predicated
on the number of traced processes so that we can have untraced
children (e.g. via popen).
* strace (main) [!SVR4]: Call fake_execve to get the actual
exec and its arguments into the trace.
(environ): Declare it.
* process.c (fake_execve): New function.
(headers): Include sys/syscall.h to get SYS_* defines.
* process.c (sys_execv, sys_execve): Surround argument annotations
with C comment delimiters.
(printargv, printargc): The arg vector is an array of char pointers
not ints.
* strace.c (printleader): Also check for multiple -p arguments
when deciding whether to print the pid field.
* strace.c (strerror) [!HAVE_STRERROR]: New function.
* defs.h (strerror, strsignal): Add these prototypes if we provide
the functions.
* configure.in (AC_CHECK_FUNCS): Add strerror.
* strace.c (main, proc_poller): Add SIGPIPE to the list of caught
and blocked signals.
* strace.c (main): Add username option. Verify they are root before
letting them use it. Look up the ids in the password file. Set
them just before executing the program.
From Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>.
Sat Apr 29 00:09:56 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.3 is released.
* system.c (mount_flags) [LINUX]: Omit duplicated MS_NOSUID entry.
From Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>.
* strace.c (outfname): Initialize to NULL.
(main): Defer output file processing until after arguments.
Allow either a pipe or a bang for command arguments.
Check if outfname is NULL instead of checking outf for stderr.
Reinitialize each startup TCB's outf to fix -p/-o ordering bug.
(droptcb): Reset close TCB's outf to NULL instead of stderr.
(tprintf): Avoid calling vfprintf if outf is NULL.
* strace.c (main): Use popen if -o argument begins with a pipe.
From Marty Leisner <leisner@sdsp.mc.xerox.com>.
* process.c (printstatus): Fix a typo where WIFSIGNALED was meant
but WIFSTOPPED was used.
* Makefile.in: Add an EXTRA_DEFS variable and use it in the .c.o
rule to prevent the comment from being untrue.
Fri Apr 28 22:01:56 1995 Rick Sladkey <jrs@world.std.com>
* strace.c (sys_exit): Move follow fork code to internal_exit.
(sys_fork): Move follow fork code to internal_fork.
(sys_execv, sys_execve): Move follow fork code to internal_exec.
(sys_waitpid, sys_wait4): Move follow fork code to internal_wait.
(vforking): Remove this static variable and check scno in
internal_fork instead.
(internal_exit, internal_fork, internal_exec, internal_wait): New
functions.
* defs.h: Add prototypes for the new internal_* functions.
* syscall.c (syscall): Move syscall entering trace qualifier check
and reprint checking after context decoding and precede them with
a call to internal_syscall. Precede syscall exiting trace
qualifier check with a call to internal_syscall.
(internal_syscall): New function.
* defs.h (struct tcb): Make scno signed.
* strace.c (syscall) Make u_error signed.
[LINUX, I386]: Avoid unsigned cast in eax check.
* syscall.c (sys_indir): Make i, scno, and nargs signed.
* desc.c (sys_select): Make cumlen unsigned
Mon Apr 24 23:52:47 1995 Rick Sladkey <jrs@world.std.com>
* net.c (socktypes): Add SOCK_PACKET.
Sun Apr 2 23:50:39 1995 Rick Sladkey <jrs@world.std.com>
* Makefile (clean): Check explicitly for a Makefile in subdirs
before running make in them.
Sun Mar 26 12:37:21 1995 Rick Sladkey <jrs@world.std.com>
* strace.c [MIPS] (proc_open): Conditionalize run on MIPS.
[MIPS] (detach): Initialize error for MIPS case.
(trace): Initialize ioctl_result and ioctl_errno for overly helpful
compilers.
* syscall.c (decode_subcall): Move variable i into conditionals
that use use it.
* system.c (syssgi_options): Conditionalize SGI_RECVLMSG and
SGI_SET_FPDEBUG that SGI decided to drop. I don't have the stomach
to change them all.
* term.c (term_ioctl): Force [c_[iocl]flags members to long before
printing since we don't know what the size of their type is.
* util.c [SVR4, MIPS] (umoven): Prevent MIPS from using pread even
if autoconf detects it since it seems to either not work or do
something else entirely on Irix 5.3.
Sun Mar 26 00:01:11 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.2 is released.
* linux/dummy.h: Make sys_fchdir like sys_close instead of printargs
so that the file descriptor arg is decimal.
Sat Mar 25 22:50:13 1995 Rick Sladkey <jrs@world.std.com>
* net.c [LINUX] (protocols): Explicitly define all IPPROTO_* entries
because on Linux they are enumerators.
* system.c [LINUX] (mount_flags): Handle renaming of MS_SYNC to
MS_SYNCHRONOUS.
* util.c (printxval): When there is no translation, print the actual
number first and the the default value as a C comment.
* net.c (sys_send, sys_sendto, sys_sendmsg, sys_getsockopt,
sys_setsockopt): Change first argument from unsigned to signed to
cater to the frequent practice of calling system calls with a file
descriptor of -1.
* mem.c (sys_mmap): Likewise.
Sun Mar 19 13:53:52 1995 Rick Sladkey <jrs@world.std.com>
* signal.c [LINUX] (signalent): Handle old and new values of SIGIO.
Sun Dec 11 22:51:51 1994 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.1 is released.
* Makefile.in, configure.in, aclocal.m4: Changes for autoconf 2.0.
* config.guess, config.guess: Update from the FSF.
* install-sh: New from the FSF.
Mon Dec 5 20:51:29 1994 Rick Sladkey <jrs@world.std.com>
* Makefile.in: Add m68k arch.
* acconfig.h (M68K): Add m68k define.
* configure.in: Add detection of arch m68k.
* process.c [M68K] (struct_user_offsets): Support m68k registers and
offsets.
* signal.c [M68K] (sigcontext_struct): Support m68k sigcontext
structure.
[M68K] (sys_sigreturn): Support m68k sigreturn handling.
* syscall.c [M68K] (syscall): Support m68k syscall number register
and errno in d0 instead of eax.
* util.c [M68K] (getpc, printcall, setbpt, clearbpt): Support m68k
program counter in PT_PC instead of EIP.
[M68K] (LOOP): Support m68k loop instruction.
From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
* mem.c [MAP_ANONYMOUS] (mmap_flags): Correct inadvertent reference
to MAP_FIXED instead of MAP_ANONYMOUS.
From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
* signal.c [LINUX] (signalent): Signal 30 is now SIGPWR.
From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
Mon Dec 5 01:05:46 1994 Rick Sladkey <jrs@world.std.com>
* defs.h (tprintf): Fix typo in non-gcc ansi prototype for tprintf.
Reported by Thanh Ma <tma@encore.com>.
* strace.c (cleanup): Send SIGCONT before SIGTERM because Linux
1.1.62 doesn't continue a traced child when the parent exits.
Reported by Matt Day <mday@artisoft.com>.
* system.c [LINUX]: Include netinet/in.h before arpa/inet.h.
* util.c (printstr): Fix longstanding bug in notating string
continuation.
* strace.c [SVR4] (proc_open): Specifically wait for the child the
child to go into the execve syscall to avoid spurious traces.
[LINUX] (detach): Conditionalize the status variable.
Sun Dec 4 23:21:42 1994 Rick Sladkey <jrs@world.std.com>
* Makefile.in: Add mips arch.
* acconfig.h (MIPS): Add mips define.
* configure.in: Add detection of opsys irix5 and arch mips. Check
for prctl function.
Check for sys/sysconfig.h header.
* defs.h (MAX_ARGS): Bump maximum syscall arguments from 8 to 32.
* file.c [SVR4]: Include sys/cred.h.
(access_flags): Update access flags for SGI.
(sprinttime): Change type of sprinttime argument from unsigned
long to time_t.
* process.c [HAVE_PRCTL]: Include sys/prctl.h.
[HAVE_PRCTL] (prctl_options, sys_prctl): New for SGI.
(printsiginfo): Conditionally compile SI_TIMER and SI_MESGQ.
Cast si_band member to long before printing.
* signal.c (sigact_flags): Add _SA_BSDCALL for SGI.
(sigprocmaskcmds): Add SIG_SETMASK32 for SGI.
* strace.c [SVR4] [MIPS]:
(foobar): New dummy signal handler.
(main): Install a dummy signal handler in the child before pausing
to work around an SGI bug in PRSABORT.
(proc_open): Send a interrupt to the child instead of aborting the
syscall which doesn't work on Irix5.2.
* svr4/dummy.h: Add new unfinished SGI syscalls
(e.g. sys_sysmp, sys_sginap, etc.). Handle some SGI syscalls like
existing calls (e.g. sys_ksigaction like sys_sigaction).
Printargs does the print thing for sys_sethostid.
* svr4/syscall.h: Declare all new SGI syscalls.
(SGI_KLUDGE): Define syscall table starting index to be 1 for SGI
and add it to all subcall entry points.
(SYS_pgrpsys_subcall, SYS_sigcall_subcall, SYS_context): Don't
decode as subcalls on MIPS. Instead, use the normal syscalls.
* svr4/syscallent.h [MIPS]: Lead syscall table with a dummy entry
since SGI syscall numbers are off by one.
[MIPS] (sys_pgrpsys): Rename to sys_setpgrp on SGI.
[MIPS] (sys_xenix): Rename to sys_syssgi on SGI.
[MIPS] (sys_sysmachine): Rename to sys_sysmips on SGI.
[MIPS]: Conditionalize SVR4 extension into SGI and Solaris classes.
* syscall.c (dumpio): Validate descriptor against MAX_QUALS.
[HAVE_PR_SYSCALL] (syscall): Conditionalize SYS_vfork.
[MIPS] (syscall): Add SGI section for decoding u_error and u_rval.
Add workaround for broken SGI pr_sysarg on syscall entry.
[SVR4] (syscall): Conditionalize subcall decoding for
SYS_ptrpsys_subcall, SYS_sigcall_subcall and SYS_context_subcall.
[SVR4] [MIPS] (getrval2): Handle SGI.
* syscallent.sh: Dork the sed line to be choosier about SYS_ lines.
* system.c [HAVE_SYSCONFIG_H]: Include sys/sysconfig.h.
[MIPS] (syssgi_options, sys_syssgi): New for SGI.

181
INSTALL Normal file
View File

@ -0,0 +1,181 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

105
Makefile.in Normal file
View File

@ -0,0 +1,105 @@
# Makefile.in -- strace Makefile prototype -*- Makefile -*-
#
# $Id$
#
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
WARNFLAGS = @WARNFLAGS@
# OS is one of `linux', `sunos4', or `svr4'.
OS = @opsys@
# ARCH is one of `i386', `m68k', `sparc', or `mips'.
ARCH = @arch@
# OSARCH is OS/ARCH if it exists, otherwise just OS.
OSARCH = @osarch@
# You may define any of MAX_PROCS, DEFAULT_STRLEN, DEFAULT_ACOLUMN,
# or DEFAULT_SORTBY here.
EXTRA_DEFS =
# Where include files are located, useful for cross-compiling.
includedir = @includedir@
# Where to install the program:
# I recommend `/usr' for Linux, `/usr/local' for the others.
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
man1dir = $(prefix)/man/man1
man1ext = .1
SHELL = /bin/sh
INCLUDES = -I. -I$(OS)/$(ARCH) -I$(srcdir)/$(OS)/$(ARCH) -I$(OS) -I$(srcdir)/$(OS)
SUBDIRS = $(OSARCH)
ALL_SUBDIRS = test linux linux/alpha linux/powerpc sunos4 svr4
OBJ = strace.o version.o syscall.o util.o \
desc.o file.o ipc.o io.o ioctl.o mem.o net.o process.o bjm.o \
resource.o signal.o sock.o system.o term.o time.o proc.o stream.o
all: strace
strace: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
install: all
$(INSTALL_PROGRAM) strace $(bindir)/strace
$(INSTALL_DATA) $(srcdir)/strace.1 $(man1dir)/strace$(man1ext)
clean: clean-local
for i in $(ALL_SUBDIRS); do \
(test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
done; exit 0
clean-local:
rm -f *.o a.out core strace make.out
distclean: distclean-local
for i in $(ALL_SUBDIRS); do \
(test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
done; exit 0
distclean-local: clean-local
rm -f machine
rm -f Makefile config.h config.status config.cache config.log
maintainer-clean: maintainter-clean-local
for i in $(ALL_SUBDIRS); do \
(test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
done; exit 0
maintainer-clean-local: distclean-local
.c.o:
$(CC) $(WARNFLAGS) $(DEFS) $(EXTRA_DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $<
desc.o: desc.c defs.h config.h
file.o: file.c defs.h config.h
io.o: io.c defs.h config.h
ioctl.o: ioctl.c defs.h config.h
mem.o: mem.c defs.h config.h
net.o: net.c defs.h config.h
process.o: process.c defs.h config.h
resource.o: resource.c defs.h config.h
signal.o: signal.c defs.h config.h
socket.o: socket.c defs.h config.h
strace.o: strace.c defs.h config.h
syscall.o: syscall.c defs.h config.h
system.o: system.c defs.h config.h
time.o: time.c defs.h config.h
util.o: util.c defs.h config.h

45
NEWS Normal file
View File

@ -0,0 +1,45 @@
Changes in version 3.1
======================
* Irix5 is supported
* Linux 68k is supported
* Linux alpha is supported
* configure is upgraded to autoconf 2.x
* using -f in combination with -e now works correctly
* output can be piped to a program
* tracing setuid programs works better
* it is now reasonable to install strace setuid to root in some circumstances
* new useful tracing names like file and process to trace whole
classes of system calls, e.g. -efile traces all system calls that
take a file name as an argument
* IPC calls on SunOS 4.1.x are decoded
* Linux program memory is reliably dereferenced
* Linux decodes at least the name of all syscalls as of pre2.0.4
* various cosmetic changes and bug fixes
Changes from versions 2.x to version 3.0
========================================
* filename arguments are neither abbreviated nor stringified
* string arguments are now true C strings using octal instead of hex by default
* preprocessor constants are never shortened (e.g. was RDONLY => now O_RDONLY)
* by default the output for multiple processes now goes into one file
* all structures, vectors, bitsets, etc. use consistent output formats
* the -c option now means count calls, -i does what the old -c used to do
New Features in version 3.0
===========================
* non-ascii strings can be optionally printed entirely in hex
* the output format is readable when mutiple processes are generating output
* exit values are printed in an alignment column
* is is possible to suppress messages about attaching and detaching
* various tracing features can be enabled on a per syscall/signal/desc basis
* selective tracing of syscalls
* selective printing of syscall structures
* selective abbreviation of long structures on a per syscall basis
* selective printing of raw syscall arguments and results
* selective tracing of signals
* selective dumping of all I/O read from file descriptors
* selective dumping of all I/O written to file descriptors
* optional counting of time, calls, and errors for each syscall

70
PORTING Normal file
View File

@ -0,0 +1,70 @@
I am frequently asked to port strace to a given platform. Less
frequently I am asked how one would go about porting strace to a given
platform. :-) Since I have ported strace to a few platforms already I
have some advice to the would-be strace porter.
The number one question is ``Does the native operating support a
concept which enables even the mere possibility of tracing?''. So far
I have seen two mechanisms which support system call tracing. They
are the SunOS originated feature of the PTRACE_SYSCALL argument to the
ptrace system call and the PIOCSENTRY/PIOCSEXIT ioctl for the /proc
filesystem under System V release 4 style Unix derived systems. There
may be others (surely a better one could be devised :-) but innovation
is a rare commodity so unless one of these is supported you may be
SOL.
Therefore the first step is to try `man 2 ptrace' and `man 4 proc' to
see if there is even a glimmer of hope. Without assistance from the
operating system, system call tracing is a lost cause. If there is a
native system call tracing program (however pathetic it might be :-),
you may be able to use it to trace itself to determine what mechanism
it is using for tracing the system calls of another process. If the
interface is documented you should be a happy camper. Otherwise,
unless you can tolerate the thought of many thankless hours
single-stepping in a debugger with little or nothing to show for it,
you should consider other tasks to distract you from your friends,
family, education, job, spouse and/or significant other.
If you have arrived here, your OS should have ptrace or proc or you
should have a high tolerance for pain. Then again, curious but
detached readers are invited to continue with little to risk but
boredom. If the mechanism is neither ptrace nor proc then examine how
it is intended to work and see how well it fits with what strace
already does. If it fits, fine, add a few more ifdefs. If there is a
gross mismatch, write a whole new event loop.
At this point you are responsible for determining three things: how is
the specific system call communicated, how are system call arguments
handled, and how is errno handled. These things can usually be
resolved in a day or two using a decent assembly level debugger and
some educated guesswork. For example, set a breakpoint on `read'.
Then disassemble the code and see where the arguments go. Do they go
on the stack? Do they go into registers? Some combination of the
two? Find the point where the transition from user mode to kernel
mode is made. Can you identify the arguments at this point? When the
call returns where does errno go? Into a specific register? Into a
global variable?
Next you need to determine how to decode numeric system call numbers
into system call names (syscallent.h), errno values into errno names
(errnoent.h) and ioctl values into ioctl names (ioctlent.h). Often
this fragile step can be accomplished by massaging system header files
with ad hoc shell scripts. Expect your scripts to break with every
dot rev of each OS release.
Finally, once you have the basic framework in which system calls and
their arguments can be decoded, you must do the dirty work of decoding
every useful call. Some may be similar or identical to like-named
calls in other operating systems. Go ahead and tweak what is there
to achieve what you want. If there is more difference than similarity,
then just write your own version of it using one of the existing
implementations for ideas.
The first order of decoding is the generation of suitable system call,
errno, ioctl and signal tables. Sample scripts are included to assist
with the generation of a first pass at these tables.
Good luck and feel free to contact me before and/or during any major
project.
Rick Sladkey <jrs@world.std.com>

37
README Normal file
View File

@ -0,0 +1,37 @@
This is strace 3.1, a system call tracer for SunOS 4.x, Linux, System
V release 4, Solaris 2.x and Irix 5.x. strace is released under a
Berkeley-style license at the request of Paul Kranenburg; see the file
COPYRIGHT for details.
Read the INSTALL file for generic instructions on how to install
strace. If configure cannot guess your system configuration, you can
specify it on the command line after the other options like this:
./configure --prefix=/usr i486-linux
The following configurations are supposed to work (in porting order):
sparc-sun-sunos4.1
i486-linux
sparc-sun-solaris2
i486-ncr-sysv4
i486-sun-solaris2
m68k-linux
mips-sgi-irix5
alpha-linux
A single sunos4.1 binary should work on all the sun4, sun4c and sun4m
kernel architectures. Let me know if sun4d doesn't work. Other
i486-*-sysv4 systems may work with little or no tweaking.
See the file NEWS for information on what has changed in recent
versions.
See the file PORTING if you like strace but it doesn't work on an
operating system you use frequently.
See the file CREDITS to see who has contributed to strace.
See the file TODO if you feel like helping out.
Please send bug reports and enhancements to Rick Sladkey <jrs@world.std.com>.

52
README-linux Normal file
View File

@ -0,0 +1,52 @@
========================================================================
This is the unmodified README from Branko Lankester's release of strace
for Linux. Some of the notes and instructions are no longer valid
however the file has been retained for its historical value. -- jrs
========================================================================
This is the second release of strace for linux, it requires linux
version 0.99.10 or newer. strace was written by Paul Kranenburg for
SunOS, I have modified it to work with linux. Read the file README and
the strace.1 for more info on strace.
Changes for this release are:
- bugfixes
- support for new system calls and ioctls
- symbolic output for: termio ioctls, sysv ipc, fcntl file locking,
statfs and ptrace
- microsecond time stamps
A lot of the changes and bugfixes for this version were done by
Rick Sladkey <jrs@world.std.com>, System V IPC support was added
by Ulrich Pegelow <pegelow@moorea.uni-muenster.de>.
FILES:
README.first this file
README the original readme file for SunOS strace
getioctls script to create the ioctlents.h file for linux.
Sun/* files from the original package I didn't use
Notes:
- With older versions of Linux (before 0.99.10) signals can get lost
for a traced process.
- strace works best if you have a proc fs mounted on /proc, the
/proc/##/mem frame buffers are used for reading system call arguments.
You can use /dev/ram or some other unused block device for mounting
the proc fs:
mount -t proc /dev/ram /proc
or in /etc/fstab:
/dev/hda /proc proc defaults
Branko Lankester Jun 18 1993
branko@hacktic.nl || lankeste@fwi.uva.nl

85
README-sunos4 Normal file
View File

@ -0,0 +1,85 @@
========================================================================
This is the unmodified README from Paul Kranenburg's release of strace
for SunOS 4.1.x. Some of the notes and instructions are no longer valid
however the file has been retained for its historical value. -- jrs
========================================================================
/*
* @(#)README 2.4 92/01/21
*
* Copyright (C) 1991 Paul Kranenburg.
*
* Please send comments, enhancements or any other useful ideas to
* the address at the end of this file.
*
*/
strace(1) is a system call tracer for Sun(tm) systems much like the
Sun supplied program trace(1). strace(1) is a useful utility to sort
of debug programs for which no source is available which unfortunately
includes almost all of the Sun supplied system software.
Like trace(1), strace displays each system call and its arguments as it
is invoked by the traced process, but tries to do a better job of
decoding the arguments, displaying them in symbolic format whenever
possible. Passed structures/character arrays are read from the process'
address space and displayed in an appropriate format.
It is also possible to instruct strace to trace child processes as
they are created by the fork(2) system call. However, this is slightly
involved for two reasons: 1) the trace flag is cleared in the child
process by the fork system call, so we must make a special effort to
gain control of the child (see NOTES below), 2) our tracing manipulations
of the child may interfere with a possible wait(2) system call executed
by the (also traced) parent process. In this case we don't allow the parent
to continue until one of its children enters a state that may cause the
parent's wait(2) call to return.
NOTES.
o Not all system calls have been implemented yet as described
above (see dummy.h for a list), these calls only have their args
displayed as hex numbers.
o The program draws heavily on Sun's extensions to the ptrace(2)
system call.
o This release is based upon SunOS 4.1.1. The syscall list (syscall.h)
and ioctl's (ioctlent.m4) are probably most critically dependant
on the OS version (see also /sys/os/init_sysent.c).
You may have to edit `ioctlsort.c' and/or `ioctlent.m4' to get
`ioctlsort.c' to compile with your suite of system header files.
o The way in which child processes are caught and attached to after
the fork() call is Sparc-specific (in fact it has the looks of a
terrible hack). Also, this trick won't work with vfork(2).
Enhancements are sollicited for.
o Dynamically linked executables can be convinced to use the fork(2)
system call in stead of vfork(2) by modifying their (internal)
symbol table immediately after such a program is exec'ed. Be
warned that programs which depend on vfork's peculiar semantics
may not run as expected. Enable by the `-F' switch.
INSTALLATION.
Edit the paths in the Makefile to suit your local system.
Enter the usual make commands (`make debug' to enable the
compiler `-g' flag).
Not all sites have a complete set of include files, depending
on the selected software categories at OS install time. The
makefile tries to detect the presence of the Sunview category,
if other files are missing you may have to edit `ioctlent.h'.
COMMENTS TO:
P. Kranenburg
Department of Computer Science
Erasmus University Rotterdam
P.O. Box 1738
NL-3000 DR Rotterdam
e-mail: pk@cs.few.eur.nl

12
README-svr4 Normal file
View File

@ -0,0 +1,12 @@
Even though SVR4 has truss, you may prefer using strace for a number
of reasons. Not the least of which are portability and source code.
The main event loop is awkward on systems for which procfs isn't
pollable. I think a pollable procfs is a Solaris invention so most SVR4
systems have this weakness. On Solaris, strace runs as a single
controlling process. This is a big improvement if you are debugging a
lot of processes at once.
There is no thread support but it wouldn't be very difficult to add it.
Rick Sladkey <jrs@world.std.com>

25
TODO Normal file
View File

@ -0,0 +1,25 @@
require override to run suid and/or sgid executables normally
attempt reopen of /proc file if we get EAGAIN from any /proc ioctl
kill procs we error out of on svr4
enclose "total x dents" in a comment
declare gettimeofday and pread for solaris2
update automatic remaking of autoconf targets
I don't like run on last close, change it?
parse long options?
count signals too with -c
treat attach, detach messages like signals
add readv, writev to I/O dumping
add pread, pwrite to I/O dumping
add system assist for qualifiers on svr4
change printcall to getcaller and fix for linux and svr4
fix fork hang for svr4 without pollable procfs
add thread support
print events on entry to and revents on exit from poll
monitor procfs open and release the other child if the process wants to own it
fix incorrect syscall number if exit without entry on svr4 without pr_syscall
fix clean targets so config.h and config.status can be removed
ignore faults which occur before exec
look for more ioctls on solaris, used in nslookup for example
consider adding backtrace support
consider adding general purpose interpreter
rename program to sctrace to avoid conflict with svr4 strace?

46
acconfig.h Normal file
View File

@ -0,0 +1,46 @@
/* Define if this is running the Linux operating system. */
#undef LINUX
/* Define if this is running the SunOS 4.x operating system. */
#undef SUNOS4
/* Define if this is running the System V release 4 operating system
or a derivative like Solaris 2.x or Irix 5.x. */
#undef SVR4
/* Define if this is an i386, i486 or pentium architecture. */
#undef I386
/* Define if this is an m68k architecture. */
#undef M68K
/* Define if this is a sparc architecture. */
#undef SPARC
/* Define if this is a mips architecture. */
#undef MIPS
/* Define if this is an alpha architecture. */
#undef ALPHA
/* Define if you have SVR4 and the poll system call works on /proc files. */
#undef HAVE_POLLABLE_PROCFS
/* Define if the prstatus structure in sys/procfs.h has a pr_syscall member. */
#undef HAVE_PR_SYSCALL
/* Define if you are have a SPARC with SUNOS4 and your want a version
of strace that will work on sun4, sun4c and sun4m kernel architectures.
Only useful if you have a symbolic link from machine to /usr/include/sun4
in the compilation directory. */
#undef SUNOS4_KERNEL_ARCH_KLUDGE
/* Define if signal.h defines the type sig_atomic_t. */
#undef HAVE_SIG_ATOMIC_T
/* Define if sys_errlist is declared. */
#undef SYS_ERRLIST_DECLARED
/* Define if the msghdr structure has a msg_control member. */
#undef HAVE_MSG_CONTROL

211
aclocal.m4 vendored Normal file
View File

@ -0,0 +1,211 @@
dnl ### A macro to find the include directory, useful for cross-compiling.
AC_DEFUN(AC_INCLUDEDIR,
[AC_REQUIRE([AC_PROG_AWK])dnl
AC_SUBST(includedir)
AC_MSG_CHECKING(for primary include directory)
includedir=/usr/include
if test -n "$GCC"
then
>conftest.c
new_includedir=`
$CC -v -E conftest.c 2>&1 | $AWK '
/^End of search list/ { print last; exit }
{ last = [$]1 }
'
`
rm -f conftest.c
if test -n "$new_includedir" && test -d "$new_includedir"
then
includedir=$new_includedir
fi
fi
AC_MSG_RESULT($includedir)
])
dnl ### A macro to automatically set different CC and HOSTCC if using gcc.
define(AC_PROG_HOSTCC,
[AC_SUBST(HOSTCC)dnl
if test -z "$HOSTCC"
then
HOSTCC="$CC"
if test -n "$GCC"
then
# Find out if gcc groks our host.
worked=
last=
for i in $1
do
test "x$i" = "x$last" && continue
last="$i"
CC="$HOSTCC -b $i"
AC_MSG_CHECKING([for working $CC])
AC_TRY_LINK(,,
worked=1
break
)
AC_MSG_RESULT(no)
done
if test -z "$worked"
then
CC="$HOSTCC"
else
AC_MSG_RESULT(yes)
fi
fi
fi
])
dnl ### A macro to set gcc warning flags.
define(AC_WARNFLAGS,
[AC_SUBST(WARNFLAGS)
if test -z "$WARNFLAGS"
then
if test -n "$GCC"
then
# If we're using gcc we want warning flags.
WARNFLAGS=-Wall
fi
fi
])
dnl ### A macro to determine if procfs is pollable.
AC_DEFUN(AC_POLLABLE_PROCFS,
[AC_MSG_CHECKING(for pollable procfs)
AC_CACHE_VAL(ac_cv_pollable_procfs,
[AC_TRY_RUN([
#include <stdio.h>
#include <signal.h>
#include <sys/procfs.h>
#include <sys/stropts.h>
#include <poll.h>
main()
{
int pid;
char proc[32];
FILE *pfp;
struct pollfd pfd;
if ((pid = fork()) == 0) {
pause();
exit(0);
}
sprintf(proc, "/proc/%d", pid);
if ((pfp = fopen(proc, "r+")) == NULL)
goto fail;
if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
goto fail;
pfd.fd = fileno(pfp);
pfd.events = POLLPRI;
if (poll(&pfd, 1, 0) < 0)
goto fail;
if (!(pfd.revents & POLLPRI))
goto fail;
kill(pid, SIGKILL);
exit(0);
fail:
kill(pid, SIGKILL);
exit(1);
}
],
ac_cv_pollable_procfs=yes,
ac_cv_pollable_procfs=no,
[
# Guess or punt.
case "$host_os" in
solaris2*|irix5*)
ac_cv_pollable_procfs=yes
;;
*)
ac_cv_pollable_procfs=no
;;
esac
])])
AC_MSG_RESULT($ac_cv_pollable_procfs)
if test "$ac_cv_pollable_procfs" = yes
then
AC_DEFINE(HAVE_POLLABLE_PROCFS)
fi
])
dnl ### A macro to determine if the prstatus structure has a pr_syscall member.
AC_DEFUN(AC_STRUCT_PR_SYSCALL,
[AC_MSG_CHECKING(for pr_syscall in struct prstatus)
AC_CACHE_VAL(ac_cv_struct_pr_syscall,
[AC_TRY_COMPILE([#include <sys/procfs.h>],
[struct prstatus s; s.pr_syscall;],
ac_cv_struct_pr_syscall=yes,
ac_cv_struct_pr_syscall=no)])
AC_MSG_RESULT($ac_cv_struct_pr_syscall)
if test "$ac_cv_struct_pr_syscall" = yes
then
AC_DEFINE(HAVE_PR_SYSCALL)
fi
])
dnl ### A macro to detect the presence of the sig_atomic_t in signal.h
AC_DEFUN(AC_SIG_ATOMIC_T,
[AC_MSG_CHECKING(for sig_atomic_t in signal.h)
AC_CACHE_VAL(ac_cv_sig_atomic_t,
[AC_TRY_COMPILE([#include <signal.h>],
[sig_atomic_t x;],
ac_cv_sig_atomic_t=yes,
ac_cv_sig_atomic_t=no)])
AC_MSG_RESULT($ac_cv_sig_atomic_t)
if test "$ac_cv_sig_atomic_t" = yes
then
AC_DEFINE(HAVE_SIG_ATOMIC_T)
fi
])
dnl ### A macro to determine if sys_errlist is declared.
AC_DEFUN(AC_DECL_SYS_ERRLIST,
[AC_MSG_CHECKING([for sys_errlist declaration])
AC_CACHE_VAL(ac_cv_decl_sys_errlist,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
/* Somebody might declare sys_errlist in unistd.h. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif], [char *msg = *(sys_errlist + 1);],
ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])dnl
AC_MSG_RESULT($ac_cv_decl_sys_errlist)
if test $ac_cv_decl_sys_errlist = yes; then
AC_DEFINE(SYS_ERRLIST_DECLARED)
fi
])
dnl ### A macro to determine if _sys_siglist is declared.
AC_DEFUN(AC_DECL__SYS_SIGLIST,
[AC_MSG_CHECKING([for _sys_siglist declaration])
AC_CACHE_VAL(ac_cv_decl__sys_siglist,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <signal.h>
/* Somebody might declare _sys_siglist in unistd.h. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif], [char *msg = *(_sys_siglist + 1);],
ac_cv_decl__sys_siglist=yes, ac_cv_decl__sys_siglist=no)])dnl
AC_MSG_RESULT($ac_cv_decl__sys_siglist)
if test $ac_cv_decl__sys_siglist = yes; then
AC_DEFINE(SYS_SIGLIST_DECLARED)
fi
])
dnl ### A macro to determine if the msghdr structure has a msg_control member.
AC_DEFUN(AC_STRUCT_MSG_CONTROL,
[AC_MSG_CHECKING(for msg_control in struct msghdr)
AC_CACHE_VAL(ac_cv_struct_msg_control,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>],
[#undef msg_control
struct msghdr m; m.msg_control;],
ac_cv_struct_msg_control=yes,
ac_cv_struct_msg_control=no)])
AC_MSG_RESULT($ac_cv_struct_msg_control)
if test "$ac_cv_struct_msg_control" = yes
then
AC_DEFINE(HAVE_MSG_CONTROL)
fi
])

61
bjm.c Normal file
View File

@ -0,0 +1,61 @@
#include "defs.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/resource.h>
#include <sys/utsname.h>
#include <sys/user.h>
#include <sys/syscall.h>
#include <signal.h>
#include <linux/module.h>
/* WTA: #define these here: since Debian uses glibc2's includefiles
* instead of the kernel includes we miss these otherwise.
*/
#if !defined(QM_MODULES)
#define QM_MODULES 1
#define QM_DEPS 2
#define QM_REFS 3
#define QM_SYMBOLS 4
#define QM_INFO 5
#endif
static struct xlat which[] = {
{ 0, "0" },
{ QM_MODULES, "QM_MODULES" },
{ QM_DEPS, "QM_DEPS" },
{ QM_REFS, "QM_REFS" },
{ QM_SYMBOLS, "QM_SYMBOLS" },
{ QM_INFO, "QM_INFO" },
{ 0, NULL },
};
int
sys_query_module(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
tprintf(", ");
printxval(which, tcp->u_arg[1], "L_???");
tprintf(", ");
printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
tprintf(", %#lx", tcp->u_arg[4]);
}
return 0;
}
int
sys_delete_module(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
}
return 0;
}

940
config.guess vendored Executable file
View File

@ -0,0 +1,940 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit system type (host/target name).
#
# Only a few systems have been added to this list; please add others
# (but try to keep the structure clean).
#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
macppc:NetBSD:*:*)
echo powerpc-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else echo i586-dg-dgux${UNAME_RELEASE}
fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
*:AIX:*:4)
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/7?? | 9000/8?[1679] )
sed 's/^ //' << EOF >dummy.c
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && HP_ARCH=`./dummy`
rm -f dummy.c dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i?86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit 0 ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit 0 ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
#if !defined (ultrix)
printf ("vax-dec-bsd\n"); exit (0);
#else
printf ("vax-dec-ultrix\n"); exit (0);
#endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
c34*)
echo c34-convex-bsd
exit 0 ;;
c38*)
echo c38-convex-bsd
exit 0 ;;
c4*)
echo c4-convex-bsd
exit 0 ;;
esac
fi
#echo '(Unable to guess system type)' 1>&2
exit 1

169
config.h.in Normal file
View File

@ -0,0 +1,169 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
#undef const
/* Define to the type of elements in the array set by `getgroups'.
Usually this is either `int' or `gid_t'. */
#undef GETGROUPS_T
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if your struct stat has st_blksize. */
#undef HAVE_ST_BLKSIZE
/* Define if your struct stat has st_blocks. */
#undef HAVE_ST_BLOCKS
/* Define if your struct stat has st_rdev. */
#undef HAVE_ST_RDEV
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
#undef MAJOR_IN_MKDEV
/* Define if major, minor, and makedev are declared in <sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
/* Define to `int' if <sys/types.h> doesn't define. */
#undef mode_t
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define on System V Release 4. */
#undef SVR4
/* Define if `sys_siglist' is declared by <signal.h>. */
#undef SYS_SIGLIST_DECLARED
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if this is running the Linux operating system. */
#undef LINUX
/* Define if this is running the SunOS 4.x operating system. */
#undef SUNOS4
/* Define if this is running the System V release 4 operating system
or a derivative like Solaris 2.x or Irix 5.x. */
#undef SVR4
/* Define if this is an i386, i486 or pentium architecture. */
#undef I386
/* Define if this is an m68k architecture. */
#undef M68K
/* Define if this is a sparc architecture. */
#undef SPARC
/* Define if this is a mips architecture. */
#undef MIPS
/* Define if this is an alpha architecture. */
#undef ALPHA
/* Define if this is an powerpc architecture. */
#undef POWERPC
/* Define if this is a arm architecture. */
#undef ARM
/* Define if you have SVR4 and the poll system call works on /proc files. */
#undef HAVE_POLLABLE_PROCFS
/* Define if the prstatus structure in sys/procfs.h has a pr_syscall member. */
#undef HAVE_PR_SYSCALL
/* Define if you are have a SPARC with SUNOS4 and your want a version
of strace that will work on sun4, sun4c and sun4m kernel architectures.
Only useful if you have a symbolic link from machine to /usr/include/sun4
in the compilation directory. */
#undef SUNOS4_KERNEL_ARCH_KLUDGE
/* Define if signal.h defines the type sig_atomic_t. */
#undef HAVE_SIG_ATOMIC_T
/* Define if sys_errlist is declared. */
#undef SYS_ERRLIST_DECLARED
/* Define if the msghdr structure has a msg_control member. */
#undef HAVE_MSG_CONTROL
/* Define if you have the _sys_siglist function. */
#undef HAVE__SYS_SIGLIST
/* Define if you have the getdents function. */
#undef HAVE_GETDENTS
/* Define if you have the mctl function. */
#undef HAVE_MCTL
/* Define if you have the prctl function. */
#undef HAVE_PRCTL
/* Define if you have the pread function. */
#undef HAVE_PREAD
/* Define if you have the putpmsg function. */
#undef HAVE_PUTPMSG
/* Define if you have the sendmsg function. */
#undef HAVE_SENDMSG
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the strsignal function. */
#undef HAVE_STRSIGNAL
/* Define if you have the sys_siglist function. */
#undef HAVE_SYS_SIGLIST
/* Define if you have the <asm/sigcontext.h> header file. */
#undef HAVE_ASM_SIGCONTEXT_H
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <sys/asynch.h> header file. */
#undef HAVE_SYS_ASYNCH_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/stream.h> header file. */
#undef HAVE_SYS_STREAM_H
/* Define if you have the <sys/sysconfig.h> header file. */
#undef HAVE_SYS_SYSCONFIG_H
/* Define if you have the <sys/tiuser.h> header file. */
#undef HAVE_SYS_TIUSER_H
/* Define if you have the nsl library (-lnsl). */
#undef HAVE_LIBNSL

955
config.sub vendored Executable file
View File

@ -0,0 +1,955 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
os=
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | alphapca56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[34567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
| alpha-* | alphaev5-* | alphaev56-* | alphapca56 | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigaos | amigados)
basic_machine=m68k-cbm
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
miniframe)
basic_machine=m68000-convergent
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
np1)
basic_machine=np1-gould
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sparc)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-xenix)
os=-xenix
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-semi)
os=-aout
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-ibm)
os=-aix
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f301-fujitsu)
os=-uxpv
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-aix*)
vendor=ibm
;;
-hpux*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os

2674
configure vendored Executable file

File diff suppressed because it is too large Load Diff

133
configure.in Normal file
View File

@ -0,0 +1,133 @@
AC_INIT(strace.c)
AC_CANONICAL_HOST()
AC_MSG_CHECKING(for supported operating system)
changequote(,)dnl
case "$host_os" in
linux*)
opsys=linux
;;
sunos4*)
opsys=sunos4
;;
solaris2*)
opsys=svr4
;;
sysv4*)
opsys=svr4
;;
irix5*)
opsys=svr4
;;
*)
AC_MSG_ERROR(this operating system is not yet supported by strace)
;;
esac
AC_MSG_RESULT($opsys)
# Autoheader trick. Heh, heh.
opsys_list='
@@@syms="$syms LINUX SUNOS4 SVR4"@@@
'
AC_MSG_CHECKING(for supported architecture)
case "$host_cpu" in
i[3456]86|pentium)
arch=i386
;;
m68k)
arch=m68k
;;
sparc)
arch=sparc
;;
mips)
arch=mips
;;
alpha*)
arch=alpha
;;
ppc|powerpc)
arch=powerpc
;;
arm)
arch=arm
;;
*)
AC_MSG_ERROR(this architecture is not yet supported by strace)
;;
esac
AC_MSG_RESULT($arch)
# Autoheader trick. Heh, heh.
arch_list='
@@@syms="$syms I386 M68K SPARC MIPS ALPHA ARM"@@@
'
osarch="$opsys"
if [ -d "$srcdir/$opsys/$arch" ]; then
osarch="$opsys/$arch"
fi
OPSYS=`echo $opsys | tr '[a-z]' '[A-Z]'`
ARCH=`echo $arch | tr '[a-z]' '[A-Z]'`
changequote([,])dnl
AC_CONFIG_HEADER(config.h)
AC_SUBST(opsys)
AC_DEFINE_UNQUOTED($OPSYS)
AC_SUBST(arch)
AC_DEFINE_UNQUOTED($ARCH)
AC_SUBST(osarch)
AC_PROG_CC
AC_PROG_HOSTCC($host_alias $host)
AC_C_CROSS
AC_POLLABLE_PROCFS
AC_STRUCT_PR_SYSCALL
AC_STRUCT_MSG_CONTROL
AC_INCLUDEDIR
if test "x$OPSYS" = "xSUNOS4" && test "x$ARCH" = "xSPARC"
then
AC_MSG_CHECKING(for valid machine include directory)
if test -d "$includedir/sun4"
then
rm -f machine
ln -s $includedir/sun4 machine
AC_MSG_RESULT(yes)
AC_DEFINE(SUNOS4_KERNEL_ARCH_KLUDGE)
else
AC_MSG_RESULT(no)
fi
fi
AC_WARNFLAGS
if test "x$OPSYS" = "xSUNOS4"
then
if test -n "$GCC"
then
# SunOS 4.x header files don't declare int functions.
WARNFLAGS="$WARNFLAGS -Wno-implicit"
fi
fi
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_C_CONST
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_TYPE_SIGNAL
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_RDEV
AC_HEADER_STAT
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_GETGROUPS
AC_HEADER_MAJOR
AC_SIG_ATOMIC_T
AC_CHECK_LIB(nsl, main)
AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg)
AC_CHECK_HEADERS(sys/filio.h sys/asynch.h sys/stream.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h)
AC_DECL_SYS_ERRLIST
AC_DECL_SYS_SIGLIST
AC_DECL__SYS_SIGLIST
AC_OUTPUT(Makefile $osarch/Makefile)

378
defs.h Normal file
View File

@ -0,0 +1,378 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* configuration section */
#ifndef MAX_QUALS
#define MAX_QUALS 1024 /* maximum number of syscalls, signals, etc. */
#endif
#ifndef MAX_PROCS
#define MAX_PROCS 32 /* maximum number of processes tracable */
#endif
#ifndef DEFAULT_STRLEN
#define DEFAULT_STRLEN 32 /* default maximum # of bytes printed in
`printstr', change with `-s' switch */
#endif
#ifndef DEFAULT_ACOLUMN
#define DEFAULT_ACOLUMN 40 /* default alignment column for results */
#endif
#ifndef MAX_ARGS
#define MAX_ARGS 32 /* maximum number of args to a syscall */
#endif
#ifndef DEFAULT_SORTBY
#define DEFAULT_SORTBY "time" /* default sorting method for call profiling */
#endif
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <sys/time.h>
#include <errno.h>
#ifdef STDC_HEADERS
#include <stddef.h>
#endif /* STDC_HEADERS */
#if defined(LINUX) && defined(SPARC)
#define LINUXSPARC
#endif /* LINUX && SPARC */
#ifdef SVR4
#include <sys/procfs.h>
#else /* !SVR4 */
#if defined(LINUXSPARC) && defined(__GLIBC__)
#include <sys/ptrace.h>
#else
/* Work around awkward prototype in ptrace.h. */
#define ptrace xptrace
#include <sys/ptrace.h>
#undef ptrace
#ifdef POWERPC
#define __KERNEL__
#include <asm/ptrace.h>
#undef __KERNEL__
/* TEMP */
#define UESP PT_R1
#define EIP PT_NIP
#define EAX PT_R3
#define ORIG_EAX PT_ORIG_R3
#endif
#ifdef __STDC__
#ifdef LINUX
extern long ptrace(int, int, char *, long);
#else /* !LINUX */
extern int ptrace(int, int, char *, int, ...);
#endif /* !LINUX */
#else /* !__STDC__ */
extern int ptrace();
#endif /* !__STDC__ */
#endif /* !LINUXSPARC */
#endif /* !SVR4 */
#ifdef LINUX
#if !defined(LINUXSPARC) || !defined(__GLIBC__)
#define PTRACE_PEEKUSER PTRACE_PEEKUSR
#define PTRACE_POKEUSER PTRACE_POKEUSR
#endif
#ifdef ALPHA
#define REG_R0 0
#define REG_A0 16
#define REG_A3 19
#define REG_FP 30
#define REG_PC 64
#endif /* ALPHA */
#endif /* LINUX */
#define SUPPORTED_PERSONALITIES 1
#define DEFAULT_PERSONALITY 0
#ifdef LINUXSPARC
#include <linux/a.out.h>
#include <asm/psr.h>
#undef SUPPORTED_PERSONALITIES
#define SUPPORTED_PERSONALITIES 3
#endif /* LINUXSPARC */
/* Trace Control Block */
struct tcb {
short flags; /* See below for TCB_ values */
int pid; /* Process Id of this entry */
long scno; /* System call number */
int u_nargs; /* System call arguments */
long u_arg[MAX_ARGS]; /* System call arguments */
int u_error; /* Error code */
long u_rval; /* (first) return value */
FILE *outf; /* Output file for this process */
char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */
struct timeval stime; /* System time usage as of last process wait */
struct timeval dtime; /* Delta for system time usage */
struct timeval etime; /* Syscall entry time */
/* Support for tracing forked processes */
struct tcb *parent; /* Parent of this process */
int nchildren; /* # of traced children */
int waitpid; /* pid(s) this process is waiting for */
/* (1st arg of wait4()) */
long baddr; /* `Breakpoint' address */
long inst[2]; /* Instructions on above */
int pfd; /* proc file descriptor */
#ifdef SVR4
prstatus_t status; /* procfs status structure */
#endif
};
/* TCB flags */
#define TCB_STARTUP 00001 /* We have just begun ptracing this process */
#define TCB_INUSE 00002 /* This table entry is in use */
#define TCB_INSYSCALL 00004 /* A system call is in progress */
#define TCB_ATTACHED 00010 /* Process is not our own child */
#define TCB_EXITING 00020 /* As far as we know, this process is exiting */
#define TCB_SUSPENDED 00040 /* Process has done a wait(4), that can
not be allowed to complete just now */
#define TCB_BPTSET 00100 /* "Breakpoint" set after fork(2) */
#define TCB_SIGTRAPPED 00200 /* Process wanted to block SIGTRAP */
#define TCB_FOLLOWFORK 00400 /* Process should have forks followed */
#define TCB_REPRINT 01000 /* We should reprint this syscall on exit */
#ifdef LINUX
#if defined(ALPHA) || defined(SPARC) || defined(POWERPC)
#define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
#endif /* ALPHA */
#endif /* LINUX */
/* qualifier flags */
#define QUAL_TRACE 0001 /* this system call should be traced */
#define QUAL_ABBREV 0002 /* abbreviate the structures of this syscall */
#define QUAL_VERBOSE 0004 /* decode the structures of this syscall */
#define QUAL_RAW 0010 /* print all args in hex for this syscall */
#define QUAL_SIGNAL 0020 /* report events with this signal */
#define QUAL_FAULT 0040 /* report events with this fault */
#define QUAL_READ 0100 /* dump data read on this file descriptor */
#define QUAL_WRITE 0200 /* dump data written to this file descriptor */
#define entering(tcp) (!((tcp)->flags & TCB_INSYSCALL))
#define exiting(tcp) ((tcp)->flags & TCB_INSYSCALL)
#define syserror(tcp) ((tcp)->u_error != 0)
#define verbose(tcp) (qual_flags[(tcp)->scno] & QUAL_VERBOSE)
#define abbrev(tcp) (qual_flags[(tcp)->scno] & QUAL_ABBREV)
#define waiting_parent(tcp) \
(tcp->parent && \
(tcp->parent->flags & TCB_SUSPENDED) && \
(tcp->parent->waitpid <= 0 || tcp->parent->waitpid == tcp->pid))
struct xlat {
int val;
char *str;
};
/* Format of syscall return values */
#define RVAL_DECIMAL 000 /* decimal format */
#define RVAL_HEX 001 /* hex format */
#define RVAL_OCTAL 002 /* octal format */
#define RVAL_UDECIMAL 003 /* unsigned decimal format */
#define RVAL_MASK 007 /* mask for these values */
#define RVAL_STR 010 /* Print `auxstr' field after return val */
#define RVAL_NONE 020 /* Print nothing */
#ifndef offsetof
#define offsetof(type, member) (((char *) &(((type *) NULL)->member)) - \
((char *) (type *) NULL))
#endif /* !offsetof */
/* get offset of member within a user struct */
#define uoff(member) offsetof(struct user, member)
#define TRACE_FILE 001 /* Trace file-related syscalls. */
#define TRACE_IPC 002 /* Trace IPC-related syscalls. */
#define TRACE_NETWORK 004 /* Trace network-related syscalls. */
#define TRACE_PROCESS 010 /* Trace process-related syscalls. */
#define TRACE_SIGNAL 020 /* Trace signal-related syscalls. */
extern struct tcb tcbtab[];
extern int qual_flags[];
extern int debug, followfork, followvfork;
extern int rflag, tflag, dtime, cflag, xflag, qflag;
extern int acolumn;
extern char *outfname;
extern int nprocs;
extern int max_strlen;
extern struct tcb *tcp_last;
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern int set_personality P((int personality));
extern char *xlookup P((struct xlat *, int));
extern struct tcb *alloctcb P((int));
extern void droptcb P((struct tcb *));
extern void set_sortby P((char *));
extern void set_overhead P((int));
extern void qualify P((char *));
extern void newoutf P((struct tcb *));
extern int trace_syscall P((struct tcb *));
extern void printxval P((struct xlat *, int, char *));
extern int printargs P((struct tcb *));
extern int addflags P((struct xlat *, int));
extern int printflags P((struct xlat *, int));
extern int umoven P((struct tcb *, long, int, char *));
extern int umovestr P((struct tcb *, long, int, char *));
extern int upeek P((int, long, long *));
extern void dumpstr P((struct tcb *, long, int));
extern void string_quote P((char *str));
extern void printstr P((struct tcb *, long, int));
extern void printnum P((struct tcb *, long, char *));
extern void printpath P((struct tcb *, long));
extern void printpathn P((struct tcb *, long, int));
extern void printtv P((struct tcb *, long));
extern void printsock P((struct tcb *, long));
extern void printrusage P((struct tcb *, long));
extern int clearbpt P((struct tcb *));
extern int setbpt P((struct tcb *));
extern int sigishandled P((struct tcb *, int));
extern void printcall P((struct tcb *));
extern void printsignal P((int));
extern void printleader P((struct tcb *));
extern void printtrailer P((struct tcb *));
extern void tabto P((int));
extern void call_summary P((FILE *));
extern void fake_execve P((struct tcb *, char *, char *[], char *[]));
extern int internal_fork P((struct tcb *));
extern int internal_exec P((struct tcb *));
extern int internal_wait P((struct tcb *));
extern int internal_exit P((struct tcb *));
extern char *ioctl_lookup P((long));
extern int ioctl_decode P((struct tcb *, long, long));
extern int term_ioctl P((struct tcb *, long, long));
extern int sock_ioctl P((struct tcb *, long, long));
extern int proc_ioctl P((struct tcb *, int, int));
extern int stream_ioctl P((struct tcb *, int, int));
extern void tv_tv P((struct timeval *, int, int));
extern int tv_nz P((struct timeval *));
extern int tv_cmp P((struct timeval *, struct timeval *));
extern double tv_float P((struct timeval *));
extern void tv_add P((struct timeval *, struct timeval *, struct timeval *));
extern void tv_sub P((struct timeval *, struct timeval *, struct timeval *));
extern void tv_mul P((struct timeval *, struct timeval *, int));
extern void tv_div P((struct timeval *, struct timeval *, int));
#ifdef SUNOS4
extern int fixvfork P((struct tcb *));
#endif
#if !(defined(LINUX) && !defined(SPARC))
extern long getrval2 P((struct tcb *));
#endif
#ifdef SVR4
extern int proc_open P((struct tcb *tcp, int attaching));
#endif
#define umove(pid, addr, objp) \
umoven((pid), (addr), sizeof *(objp), (char *) (objp))
#ifdef __STDC__
#ifdef __GNUC__
extern void tprintf(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
#else
extern void tprintf(const char *fmt, ...);
#endif
#else
extern void tprintf();
#endif
#ifndef HAVE_STRERROR
const char *strerror P((int));
#endif
#ifndef HAVE_STRSIGNAL
const char *strsignal P((int));
#endif
extern int current_personality;
struct sysent {
int nargs;
int sys_flags;
int (*sys_func)();
char *sys_name;
};
extern struct sysent *sysent;
extern int nsyscalls;
extern char **errnoent;
extern int nerrnos;
struct ioctlent {
char *doth;
char *symbol;
unsigned long code;
};
extern struct ioctlent *ioctlent;
extern int nioctlent;
extern char **signalent;
extern int nsignals;
extern struct ioctlent *ioctlent;
extern int nioctlents;
extern char **signalent;
extern int nsignals;
extern struct ioctlent ioctlent0[];
extern int nioctlents0;
extern char *signalent0[];
extern int nsignals0;
#if SUPPORTED_PERSONALITIES >= 2
extern struct ioctlent ioctlent1[];
extern int nioctlents1;
extern char *signalent1[];
extern int nsignals1;
#endif /* SUPPORTED_PERSONALITIES >= 2 */
#if SUPPORTED_PERSONALITIES >= 3
extern struct ioctlent ioctlent2[];
extern int nioctlents2;
extern char *signalent2[];
extern int nsignals2;
#endif /* SUPPORTED_PERSONALITIES >= 3 */

390
desc.c Normal file
View File

@ -0,0 +1,390 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#include <fcntl.h>
#include <sys/file.h>
static struct xlat fcntlcmds[] = {
{ F_DUPFD, "F_DUPFD" },
{ F_GETFD, "F_GETFD" },
{ F_SETFD, "F_SETFD" },
{ F_GETFL, "F_GETFL" },
{ F_SETFL, "F_SETFL" },
{ F_GETLK, "F_GETLK" },
{ F_SETLK, "F_SETLK" },
{ F_SETLKW, "F_SETLKW" },
{ F_GETOWN, "F_GETOWN" },
{ F_SETOWN, "F_SETOWN" },
#ifdef F_RSETLK
{ F_RSETLK, "F_RSETLK" },
#endif
#ifdef F_RSETLKW
{ F_RSETLKW, "F_RSETLKW" },
#endif
#ifdef F_RGETLK
{ F_RGETLK, "F_RGETLK" },
#endif
#ifdef F_CNVT
{ F_CNVT, "F_CNVT" },
#endif
{ 0, NULL },
};
static struct xlat fdflags[] = {
#ifdef FD_CLOEXEC
{ FD_CLOEXEC, "FD_CLOEXEC" },
#endif
{ 0, NULL },
};
#ifdef LOCK_SH
static struct xlat flockcmds[] = {
{ LOCK_SH, "LOCK_SH" },
{ LOCK_EX, "LOCK_EX" },
{ LOCK_NB, "LOCK_NB" },
{ LOCK_UN, "LOCK_UN" },
{ 0, NULL },
};
#endif /* LOCK_SH */
static struct xlat lockfcmds[] = {
{ F_RDLCK, "F_RDLCK" },
{ F_WRLCK, "F_WRLCK" },
{ F_UNLCK, "F_UNLCK" },
#ifdef F_EXLCK
{ F_EXLCK, "F_EXLCK" },
#endif
#ifdef F_SHLCK
{ F_SHLCK, "F_SHLCK" },
#endif
{ 0, NULL },
};
static struct xlat whence[] = {
{ SEEK_SET, "SEEK_SET" },
{ SEEK_CUR, "SEEK_CUR" },
{ SEEK_END, "SEEK_END" },
{ 0, NULL },
};
/* fcntl/lockf */
static void
printflock(tcp, addr, getlk)
struct tcb *tcp;
int addr;
int getlk;
{
struct flock fl;
if (umove(tcp, addr, &fl) < 0) {
tprintf("{...}");
return;
}
tprintf("{type=");
printxval(lockfcmds, fl.l_type, "F_???");
tprintf(", whence=");
printxval(whence, fl.l_whence, "SEEK_???");
tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len);
if (getlk)
tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
else
tprintf("}");
}
static char *
sprintflags(xlat, flags)
struct xlat *xlat;
int flags;
{
static char outstr[1024];
char *sep;
strcpy(outstr, "flags ");
sep = "";
for (; xlat->str; xlat++) {
if ((flags & xlat->val) == xlat->val) {
sprintf(outstr + strlen(outstr),
"%s%s", sep, xlat->str);
sep = "|";
flags &= ~xlat->val;
}
}
if (flags)
sprintf(outstr + strlen(outstr),
"%s%#x", sep, flags);
return outstr;
}
int
sys_fcntl(tcp)
struct tcb *tcp;
{
extern struct xlat openmodes[];
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printxval(fcntlcmds, tcp->u_arg[1], "F_???");
switch (tcp->u_arg[1]) {
case F_SETFD:
tprintf(", ");
if (printflags(fdflags, tcp->u_arg[2]) == 0)
tprintf("0");
break;
case F_SETOWN: case F_DUPFD:
tprintf(", %ld", tcp->u_arg[2]);
break;
case F_SETFL:
tprintf(", ");
if (printflags(openmodes, tcp->u_arg[2] + 1) == 0)
tprintf("0");
break;
case F_SETLK: case F_SETLKW:
tprintf(", ");
printflock(tcp, tcp->u_arg[2], 0);
break;
}
}
else {
switch (tcp->u_arg[1]) {
case F_DUPFD:
case F_SETFD: case F_SETFL:
case F_SETLK: case F_SETLKW:
case F_SETOWN: case F_GETOWN:
break;
case F_GETFD:
if (tcp->u_rval == 0)
return 0;
tcp->auxstr = sprintflags(fdflags, tcp->u_rval);
return RVAL_HEX|RVAL_STR;
case F_GETFL:
tcp->auxstr = sprintflags(openmodes, tcp->u_rval + 1);
return RVAL_HEX|RVAL_STR;
case F_GETLK:
tprintf(", ");
printflock(tcp, tcp->u_arg[2], 1);
break;
default:
tprintf(", %#lx", tcp->u_arg[2]);
break;
}
}
return 0;
}
#ifdef LOCK_SH
int
sys_flock(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
if (!printflags(flockcmds, tcp->u_arg[1]))
tprintf("LOCK_???");
}
return 0;
}
#endif /* LOCK_SH */
int
sys_close(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld", tcp->u_arg[0]);
}
return 0;
}
int
sys_dup(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld", tcp->u_arg[0]);
}
return 0;
}
int
sys_dup2(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, %ld", tcp->u_arg[0], tcp->u_arg[1]);
}
return 0;
}
int
sys_getdtablesize(tcp)
struct tcb *tcp;
{
return 0;
}
static int
decode_select(tcp, args)
struct tcb *tcp;
long *args;
{
int i, j, nfds;
fd_set fds;
struct timeval tv;
static char outstr[1024];
char *sep;
long arg;
if (entering(tcp)) {
nfds = args[0];
tprintf("%d", nfds);
for (i = 0; i < 3; i++) {
arg = args[i+1];
if (arg == 0) {
tprintf(", NULL");
continue;
}
if (!verbose(tcp)) {
tprintf(", %#lx", arg);
continue;
}
if (umove(tcp, arg, &fds) < 0) {
tprintf(", [?]");
continue;
}
tprintf(", [");
for (j = 0, sep = ""; j < nfds; j++) {
if (FD_ISSET(j, &fds)) {
tprintf("%s%u", sep, j);
sep = " ";
}
}
tprintf("]");
}
if (!args[4])
tprintf(", NULL");
else if (!verbose(tcp))
tprintf(", %#lx", args[4]);
else if (umove(tcp, args[4], &tv) < 0)
tprintf(", {...}");
else {
tprintf(", {%lu, %lu}",
(long) tv.tv_sec, (long) tv.tv_usec);
}
}
else {
unsigned int cumlen = 0;
char *sep = "";
if (syserror(tcp))
return 0;
if ((nfds = tcp->u_rval) == 0) {
tcp->auxstr = "Timeout";
return RVAL_STR;
}
outstr[0] = '\0';
for (i = 0; i < 3; i++) {
int first = 1;
char str[20];
tcp->auxstr = outstr;
arg = args[i+1];
if (!arg || umove(tcp, arg, &fds) < 0)
continue;
for (j = 0; j < args[0]; j++) {
if (FD_ISSET(j, &fds)) {
if (first) {
sprintf(str, "%s%s [%u", sep,
i == 0 ? "in" :
i == 1 ? "out" :
"except", j);
first = 0;
sep = ", ";
}
else
sprintf(str, " %u", j);
cumlen += strlen(str);
if (cumlen < sizeof(outstr))
strcat(outstr, str);
nfds--;
}
}
if (cumlen)
strcat(outstr, "]");
if (nfds == 0)
break;
}
#ifdef LINUX
/* This contains no useful information on SunOS. */
if (args[4]) {
char str[20];
if (umove(tcp, args[4], &tv) >= 0)
sprintf(str, "%sleft {%lu, %lu}", sep,
(long) tv.tv_sec, (long) tv.tv_usec);
if ((cumlen += strlen(str)) < sizeof(outstr))
strcat(outstr, str);
}
#endif /* LINUX */
return RVAL_STR;
}
return 0;
}
#ifdef LINUX
int
sys_oldselect(tcp)
struct tcb *tcp;
{
long args[5];
if (umoven(tcp, tcp->u_arg[0], sizeof args, (char *) args) < 0) {
tprintf("[...]");
return 0;
}
return decode_select(tcp, args);
}
#endif /* LINUX */
int
sys_select(tcp)
struct tcb *tcp;
{
long *args = tcp->u_arg;
return decode_select(tcp, args);
}

42
errnoent.sh Normal file
View File

@ -0,0 +1,42 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
# 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$
awk '
/^#define[ ]+E[A-Z0-9_]+[ ]+[0-9]+/ {
errno[$3] = $2
if ($3 > max)
max = $3
}
END {
for (i = 0; i <= max; i++) {
if (!errno[i])
errno[i] = "ERRNO_" i
printf "\t\"%s\", /* %d */\n", errno[i], i
}
}
' $*

1302
file.c Normal file

File diff suppressed because it is too large Load Diff

238
install-sh Executable file
View File

@ -0,0 +1,238 @@
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

228
io.c Normal file
View File

@ -0,0 +1,228 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#include <fcntl.h>
#include <sys/uio.h>
int
sys_read(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
int
sys_write(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
int
sys_readv(tcp)
struct tcb *tcp;
{
struct iovec *iov;
int i, len;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu",
tcp->u_arg[1], tcp->u_arg[2]);
return 0;
}
len = tcp->u_arg[2];
if ((iov = (struct iovec *) malloc(len * sizeof *iov)) == NULL) {
fprintf(stderr, "No memory");
return 0;
}
if (umoven(tcp, tcp->u_arg[1],
len * sizeof *iov, (char *) iov) < 0) {
tprintf("%#lx", tcp->u_arg[1]);
} else {
tprintf("[");
for (i = 0; i < len; i++) {
if (i)
tprintf(", ");
tprintf("{");
printstr(tcp, (long) iov[i].iov_base,
iov[i].iov_len);
tprintf(", %u}", iov[i].iov_len);
}
tprintf("]");
}
free((char *) iov);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
int
sys_writev(tcp)
struct tcb *tcp;
{
struct iovec *iov;
int i, len;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
len = tcp->u_arg[2];
iov = (struct iovec *) malloc(len * sizeof *iov);
if (iov == NULL) {
fprintf(stderr, "No memory");
return 0;
}
if (umoven(tcp, tcp->u_arg[1],
len * sizeof *iov, (char *) iov) < 0) {
tprintf("%#lx", tcp->u_arg[1]);
} else {
tprintf("[");
for (i = 0; i < len; i++) {
if (i)
tprintf(", ");
tprintf("{");
printstr(tcp, (long) iov[i].iov_base,
iov[i].iov_len);
tprintf(", %u}", iov[i].iov_len);
}
tprintf("]");
}
free((char *) iov);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
#ifdef SVR4
int
sys_pread(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf(", %lu, %llu", tcp->u_arg[2],
(((unsigned long long) tcp->u_arg[4]) << 32
| tcp->u_arg[3]));
}
return 0;
}
int
sys_pwrite(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, %llu", tcp->u_arg[2],
(((unsigned long long) tcp->u_arg[4]) << 32
| tcp->u_arg[3]));
}
return 0;
}
#endif /* SVR4 */
#ifdef LINUX
int
sys_pread(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf(", %lu, %lu", tcp->u_arg[2], tcp->u_arg[3]);
}
return 0;
}
int
sys_pwrite(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, %lu", tcp->u_arg[2], tcp->u_arg[3]);
}
return 0;
}
#endif /* LINUX */
int
sys_ioctl(tcp)
struct tcb *tcp;
{
char *symbol;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
symbol = ioctl_lookup(tcp->u_arg[1]);
if (symbol)
tprintf("%s", symbol);
else
tprintf("%#lx", tcp->u_arg[1]);
ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
}
else {
if (ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]) == 0)
tprintf(", %#lx", tcp->u_arg[2]);
}
return 0;
}

171
ioctl.c Normal file
View File

@ -0,0 +1,171 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
struct ioctlent ioctlent0[] = {
/*
* `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary
* program `ioctlsort', such that the list is sorted by the `code' field.
* This has the side-effect of resolving the _IO.. macros into
* plain integers, eliminating the need to include here everything
* in "/usr/include" .
*/
#include "ioctlent.h"
};
int nioctlents0 = sizeof ioctlent0 / sizeof ioctlent0[0];
#if SUPPORTED_PERSONALITIES >= 2
struct ioctlent ioctlent1[] = {
#include "ioctlent1.h"
};
int nioctlents1 = sizeof ioctlent1 / sizeof ioctlent1[0];
#endif /* SUPPORTED_PERSONALITIES >= 2 */
#if SUPPORTED_PERSONALITIES >= 3
struct ioctlent ioctlent2[] = {
#include "ioctlent2.h"
};
int nioctlents1 = sizeof ioctlent2 / sizeof ioctlent2[0];
#endif /* SUPPORTED_PERSONALITIES >= 3 */
struct ioctlent *ioctlent;
int nioctlents;
static int
compare(a, b)
const void *a;
const void *b;
{
unsigned long code1 = ((struct ioctlent *) a)->code;
unsigned long code2 = ((struct ioctlent *) b)->code;
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
}
char *
ioctl_lookup(code)
long code;
{
struct ioctlent *iop, ioent;
ioent.code = code;
iop = (struct ioctlent *) bsearch((char *) &ioent, (char *) ioctlent,
nioctlents, sizeof(struct ioctlent), compare);
return iop ? iop->symbol : NULL;
}
int
ioctl_decode(tcp, code, arg)
struct tcb *tcp;
long code, arg;
{
switch ((code >> 8) & 0xff) {
#ifdef LINUX
#ifdef ALPHA
case 'f': case 't': case 'T':
#else /* !ALPHA */
case 0x54:
#endif /* !ALPHA */
#else /* !LINUX */
case 'f': case 't': case 'T':
#endif /* !LINUX */
return term_ioctl(tcp, code, arg);
#ifdef LINUX
case 0x89:
#else /* !LINUX */
case 'r': case 's': case 'i': case 'p':
#endif /* !LINUX */
return sock_ioctl(tcp, code, arg);
#ifdef SVR4
case 'q':
return proc_ioctl(tcp, code, arg);
#endif /* SVR4 */
#ifdef HAVE_SYS_STREAM_H
case 'S':
return stream_ioctl(tcp, code, arg);
#endif /* HAVE_SYS_STREAM_H */
default:
break;
}
return 0;
}
/*
* Registry of ioctl characters, culled from
* @(#)ioccom.h 1.7 89/06/16 SMI; from UCB ioctl.h 7.1 6/4/86
*
* char file where defined notes
* ---- ------------------ -----
* F sun/fbio.h
* G sun/gpio.h
* H vaxif/if_hy.h
* M sundev/mcpcmd.h *overlap*
* M sys/modem.h *overlap*
* S sys/stropts.h
* T sys/termio.h -no overlap-
* T sys/termios.h -no overlap-
* V sundev/mdreg.h
* a vaxuba/adreg.h
* d sun/dkio.h -no overlap with sys/des.h-
* d sys/des.h (possible overlap)
* d vax/dkio.h (possible overlap)
* d vaxuba/rxreg.h (possible overlap)
* f sys/filio.h
* g sunwindow/win_ioctl.h -no overlap-
* g sunwindowdev/winioctl.c !no manifest constant! -no overlap-
* h sundev/hrc_common.h
* i sys/sockio.h *overlap*
* i vaxuba/ikreg.h *overlap*
* k sundev/kbio.h
* m sundev/msio.h (possible overlap)
* m sundev/msreg.h (possible overlap)
* m sys/mtio.h (possible overlap)
* n sun/ndio.h
* p net/nit_buf.h (possible overlap)
* p net/nit_if.h (possible overlap)
* p net/nit_pf.h (possible overlap)
* p sundev/fpareg.h (possible overlap)
* p sys/sockio.h (possible overlap)
* p vaxuba/psreg.h (possible overlap)
* q sun/sqz.h
* r sys/sockio.h
* s sys/sockio.h
* t sys/ttold.h (possible overlap)
* t sys/ttycom.h (possible overlap)
* v sundev/vuid_event.h *overlap*
* v sys/vcmd.h *overlap*
*
* End of Registry
*/

74
ioctlsort.c Normal file
View File

@ -0,0 +1,74 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
#endif
struct ioctlent {
char *doth;
char *symbol;
unsigned long code;
};
#include "ioctlent.raw"
int nioctlents = sizeof ioctlent / sizeof ioctlent[0];
int
compare(a, b)
const void *a;
const void *b;
{
unsigned long code1 = ((struct ioctlent *) a)->code;
unsigned long code2 = ((struct ioctlent *) b)->code;
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
}
int
main(argc, argv)
int argc;
char *argv[];
{
int i;
qsort(ioctlent, nioctlents, sizeof ioctlent[0], compare);
for (i = 0; i < nioctlents; i++) {
printf("{\"%s\", \"%s\", %#lx},\n",
ioctlent[i].doth, ioctlent[i].symbol, ioctlent[i].code);
}
return 0;
}

354
ipc.c Normal file
View File

@ -0,0 +1,354 @@
/*
* Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#if defined(LINUX) || defined(SUNOS4)
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <sys/shm.h>
#ifndef MSG_STAT
#define MSG_STAT 11
#endif
#ifndef MSG_INFO
#define MSG_INFO 12
#endif
#ifndef SHM_STAT
#define SHM_STAT 13
#endif
#ifndef SHM_INFO
#define SHM_INFO 14
#endif
#ifndef SEM_STAT
#define SEM_STAT 18
#endif
#ifndef SEM_INFO
#define SEM_INFO 19
#endif
static struct xlat msgctl_flags[] = {
{ IPC_RMID, "IPC_RMID" },
{ IPC_SET, "IPC_SET" },
{ IPC_STAT, "IPC_STAT" },
#ifdef LINUX
{ IPC_INFO, "IPC_INFO" },
{ MSG_STAT, "MSG_STAT" },
{ MSG_INFO, "MSG_INFO" },
#endif /* LINUX */
{ 0, NULL },
};
static struct xlat semctl_flags[] = {
{ IPC_RMID, "IPC_RMID" },
{ IPC_SET, "IPC_SET" },
{ IPC_STAT, "IPC_STAT" },
#ifdef LINUX
{ IPC_INFO, "IPC_INFO" },
{ SEM_STAT, "SEM_STAT" },
{ SEM_INFO, "SEM_INFO" },
#endif /* LINUX */
{ GETPID, "GETPID" },
{ GETVAL, "GETVAL" },
{ GETALL, "GETALL" },
{ GETNCNT, "GETNCNT" },
{ GETZCNT, "GETZCNT" },
{ SETVAL, "SETVAL" },
{ SETALL, "SETALL" },
{ 0, NULL },
};
static struct xlat shmctl_flags[] = {
{ IPC_RMID, "IPC_RMID" },
{ IPC_SET, "IPC_SET" },
{ IPC_STAT, "IPC_STAT" },
#ifdef LINUX
{ IPC_INFO, "IPC_INFO" },
{ SHM_STAT, "SHM_STAT" },
{ SHM_INFO, "SHM_INFO" },
#endif /* LINUX */
{ SHM_LOCK, "SHM_LOCK" },
{ SHM_UNLOCK, "SHM_UNLOCK" },
{ 0, NULL },
};
static struct xlat resource_flags[] = {
{ IPC_CREAT, "IPC_CREAT" },
{ IPC_EXCL, "IPC_EXCL" },
{ IPC_NOWAIT, "IPC_NOWAIT" },
{ 0, NULL },
};
static struct xlat shm_flags[] = {
#ifdef LINUX
{ SHM_REMAP, "SHM_REMAP" },
#endif /* LINUX */
{ SHM_RDONLY, "SHM_RDONLY" },
{ SHM_RND, "SHM_RND" },
{ 0, NULL },
};
static struct xlat msg_flags[] = {
{ MSG_NOERROR, "MSG_NOERROR" },
#ifdef LINUX
{ MSG_EXCEPT, "MSG_EXCEPT" },
#endif /* LINUX */
{ IPC_NOWAIT, "IPC_NOWAIT" },
{ 0, NULL },
};
int sys_msgget(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
if (tcp->u_arg[0])
tprintf("%lu", tcp->u_arg[0]);
else
tprintf("IPC_PRIVATE");
tprintf(", ");
if (printflags(resource_flags, tcp->u_arg[1]) != 0)
tprintf("|");
tprintf("%#lo", tcp->u_arg[1] & 0666);
}
return 0;
}
int sys_msgctl(tcp)
struct tcb *tcp;
{
char *cmd = xlookup(msgctl_flags, tcp->u_arg[1]);
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
tprintf(", %s", cmd == NULL ? "MSG_???" : cmd);
#ifdef LINUX
tprintf(", %#lx", tcp->u_arg[3]);
#else /* !LINUX */
tprintf(", %#lx", tcp->u_arg[2]);
#endif /* !LINUX */
}
return 0;
}
int sys_msgsnd(tcp)
struct tcb *tcp;
{
long mtype;
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
#ifdef LINUX
umove(tcp, tcp->u_arg[3], &mtype);
tprintf(", {%lu, ", mtype);
printstr(tcp, tcp->u_arg[3] + sizeof(long),
tcp->u_arg[1]);
tprintf("}, %lu", tcp->u_arg[1]);
tprintf(", ");
if (printflags(msg_flags, tcp->u_arg[2]) == 0)
tprintf("0");
#else /* !LINUX */
umove(tcp, tcp->u_arg[1], &mtype);
tprintf(", {%lu, ", mtype);
printstr(tcp, tcp->u_arg[1] + sizeof(long),
tcp->u_arg[2]);
tprintf("}, %lu", tcp->u_arg[2]);
tprintf(", ");
if (printflags(msg_flags, tcp->u_arg[3]) == 0)
tprintf("0");
#endif /* !LINUX */
}
return 0;
}
int sys_msgrcv(tcp)
struct tcb *tcp;
{
long mtype;
#ifdef LINUX
struct ipc_wrapper {
struct msgbuf *msgp;
long msgtyp;
} tmp;
#endif
if (exiting(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
#ifdef LINUX
umove(tcp, tcp->u_arg[3], &tmp);
umove(tcp, (long) tmp.msgp, &mtype);
tprintf(", {%lu, ", mtype);
printstr(tcp, (long) (tmp.msgp) + sizeof(long),
tcp->u_arg[1]);
tprintf("}, %lu", tcp->u_arg[1]);
tprintf(", %ld", tmp.msgtyp);
tprintf(", ");
if (printflags(msg_flags, tcp->u_arg[2]) == 0)
tprintf("0");
#else /* !LINUX */
umove(tcp, tcp->u_arg[1], &mtype);
tprintf(", {%lu, ", mtype);
printstr(tcp, tcp->u_arg[1] + sizeof(long),
tcp->u_arg[2]);
tprintf("}, %lu", tcp->u_arg[2]);
tprintf(", %ld", tcp->u_arg[3]);
tprintf(", ");
if (printflags(msg_flags, tcp->u_arg[4]) == 0)
tprintf("0");
#endif /* !LINUX */
}
return 0;
}
int sys_semop(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
#ifdef LINUX
tprintf(", %#lx", tcp->u_arg[3]);
tprintf(", %lu", tcp->u_arg[1]);
#else /* !LINUX */
tprintf(", %#lx", tcp->u_arg[1]);
tprintf(", %lu", tcp->u_arg[2]);
#endif /* !LINUX */
}
return 0;
}
int sys_semget(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
if (tcp->u_arg[0])
tprintf("%lu", tcp->u_arg[0]);
else
tprintf("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
tprintf(", ");
if (printflags(resource_flags, tcp->u_arg[2]) != 0)
tprintf("|");
tprintf("%#lo", tcp->u_arg[2] & 0666);
}
return 0;
}
int sys_semctl(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
tprintf(", %lu, ", tcp->u_arg[1]);
printxval(semctl_flags, tcp->u_arg[2], "SEM_???");
tprintf(", %#lx", tcp->u_arg[3]);
}
return 0;
}
int sys_shmget(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
if (tcp->u_arg[0])
tprintf("%lu", tcp->u_arg[0]);
else
tprintf("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
tprintf(", ");
if (printflags(resource_flags, tcp->u_arg[2]) != 0)
tprintf("|");
tprintf("%#lo", tcp->u_arg[2] & 0666);
}
return 0;
}
int sys_shmctl(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
printxval(shmctl_flags, tcp->u_arg[1], "SHM_???");
#ifdef LINUX
tprintf(", %#lx", tcp->u_arg[3]);
#else /* !LINUX */
tprintf(", %#lx", tcp->u_arg[2]);
#endif /* !LINUX */
}
return 0;
}
int sys_shmat(tcp)
struct tcb *tcp;
{
#ifdef LINUX
unsigned long raddr;
#endif /* LINUX */
if (exiting(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
#ifdef LINUX
tprintf(", %#lx", tcp->u_arg[3]);
tprintf(", ");
if (printflags(shm_flags, tcp->u_arg[1]) == 0)
tprintf("0");
#else /* !LINUX */
tprintf(", %#lx", tcp->u_arg[1]);
tprintf(", ");
if (printflags(shm_flags, tcp->u_arg[2]) == 0)
tprintf("0");
#endif /* !LINUX */
if (syserror(tcp))
return 0;
#ifdef LINUX
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
return RVAL_NONE;
tcp->u_rval = raddr;
#endif /* LINUX */
return RVAL_HEX;
}
return 0;
}
int sys_shmdt(tcp)
struct tcb *tcp;
{
if (entering(tcp))
#ifdef LINUX
tprintf("%#lx", tcp->u_arg[3]);
#else /* !LINUX */
tprintf("%#lx", tcp->u_arg[0]);
#endif /* !LINUX */
return 0;
}
#endif /* defined(LINUX) || defined(SUNOS4) */

57
linux/Makefile.in Normal file
View File

@ -0,0 +1,57 @@
#
# $Id$
#
srcdir = @srcdir@
VPATH = $(srcdir)
CC = @CC@
CPP = @CPP@
SHELL = /bin/sh
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = -g
LDFLAGS = -g
WARNFLAGS = @WARNFLAGS@
CPPFLAGS =
INCLUDES = -I. -I.. -I$(srcdir)
includedir = @includedir@
all: ioctlent.h errnoent.h signalent.h syscallent.h
ioctlent.raw: ioctlent.sh
$(SHELL) $(srcdir)/ioctlent.sh $(includedir) >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort: ioctlsort.o
$(CC) $(LDFLAGS) ioctlsort.o -o ioctlsort
ioctlsort.o: ../ioctlsort.c
$(CC) $(WARNFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $(srcdir)/../ioctlsort.c
ioctlsort.o: ioctlent.raw
errnoent.h: ../errnoent.sh $(includedir)/linux/errno.h
$(SHELL) $(srcdir)/../errnoent.sh $(includedir)/*/errno.h >$@
signalent.h: ../signalent.sh $(includedir)/linux/signal.h
$(SHELL) $(srcdir)/../signalent.sh $(includedir)/*/signal.h >$@
#syscallent.h: ../syscallent.sh $(includedir)/sys/syscall.h
syscallent.h:
$(SHELL) $(srcdir)/../syscallent.sh $(includedir)/sys/syscall.h >$@
clean:
rm -f ioctlent.c *.raw *.tmp *.o ioctlsort
distclean: clean
rm -f Makefile
maintainer-clean: distclean
rm -f ioctlent.h errnoent.h signalent.h

57
linux/alpha/Makefile.in Normal file
View File

@ -0,0 +1,57 @@
#
# $Id$
#
srcdir = @srcdir@
VPATH = $(srcdir)
CC = @CC@
CPP = @CPP@
SHELL = /bin/sh
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = -g
LDFLAGS = -g
WARNFLAGS = @WARNFLAGS@
CPPFLAGS =
INCLUDES = -I. -I.. -I$(srcdir)/.. -I../.. -I$(srcdir)
includedir = @includedir@
all: ioctlent.h errnoent.h signalent.h syscallent.h
ioctlent.raw: ioctlent.sh
$(SHELL) $(srcdir)/ioctlent.sh $(includedir) >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort: ioctlsort.o
$(CC) $(LDFLAGS) ioctlsort.o -o ioctlsort
ioctlsort.o: ../../ioctlsort.c
$(CC) $(WARNFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $(srcdir)/../../ioctlsort.c
ioctlsort.o: ioctlent.raw
errnoent.h: ../../errnoent.sh $(includedir)/asm/errno.h
$(SHELL) $(srcdir)/../../errnoent.sh $(includedir)/asm/errno.h >$@
signalent.h: ../../signalent.sh $(includedir)/asm/signal.h
$(SHELL) $(srcdir)/../../signalent.sh $(includedir)/asm/signal.h >$@
#syscallent.h: ../../syscallent.sh $(includedir)/sys/syscall.h
syscallent.h:
$(SHELL) $(srcdir)/../../syscallent.sh $(includedir)/sys/syscall.h >$@
clean:
rm -f ioctlent.c *.raw *.tmp *.o ioctlsort
distclean: clean
rm -f Makefile
maintainer-clean: distclean
rm -f ioctlent.h errnoent.h signalent.h

516
linux/alpha/errnoent.h Normal file
View File

@ -0,0 +1,516 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EDEADLK", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"EAGAIN", /* 35 */
"EINPROGRESS", /* 36 */
"EALREADY", /* 37 */
"ENOTSOCK", /* 38 */
"EDESTADDRREQ", /* 39 */
"EMSGSIZE", /* 40 */
"EPROTOTYPE", /* 41 */
"ENOPROTOOPT", /* 42 */
"EPROTONOSUPPORT", /* 43 */
"ESOCKTNOSUPPORT", /* 44 */
"EOPNOTSUPP", /* 45 */
"EPFNOSUPPORT", /* 46 */
"EAFNOSUPPORT", /* 47 */
"EADDRINUSE", /* 48 */
"EADDRNOTAVAIL", /* 49 */
"ENETDOWN", /* 50 */
"ENETUNREACH", /* 51 */
"ENETRESET", /* 52 */
"ECONNABORTED", /* 53 */
"ECONNRESET", /* 54 */
"ENOBUFS", /* 55 */
"EISCONN", /* 56 */
"ENOTCONN", /* 57 */
"ESHUTDOWN", /* 58 */
"ETOOMANYREFS", /* 59 */
"ETIMEDOUT", /* 60 */
"ECONNREFUSED", /* 61 */
"ELOOP", /* 62 */
"ENAMETOOLONG", /* 63 */
"EHOSTDOWN", /* 64 */
"EHOSTUNREACH", /* 65 */
"ENOTEMPTY", /* 66 */
"ERRNO_67", /* 67 */
"EUSERS", /* 68 */
"EDQUOT", /* 69 */
"ESTALE", /* 70 */
"EREMOTE", /* 71 */
"ERRNO_72", /* 72 */
"ERRNO_73", /* 73 */
"ERRNO_74", /* 74 */
"ERRNO_75", /* 75 */
"ERRNO_76", /* 76 */
"ENOLCK", /* 77 */
"ENOSYS", /* 78 */
"ERRNO_79", /* 79 */
"ENOMSG", /* 80 */
"EIDRM", /* 81 */
"ENOSR", /* 82 */
"ETIME", /* 83 */
"EBADMSG", /* 84 */
"EPROTO", /* 85 */
"ENODATA", /* 86 */
"ENOSTR", /* 87 */
"ECHRNG", /* 88 */
"EL2NSYNC", /* 89 */
"EL3HLT", /* 90 */
"EL3RST", /* 91 */
"ENOPKG", /* 92 */
"ELNRNG", /* 93 */
"EUNATCH", /* 94 */
"ENOCSI", /* 95 */
"EL2HLT", /* 96 */
"EBADE", /* 97 */
"EBADR", /* 98 */
"EXFULL", /* 99 */
"ENOANO", /* 100 */
"EBADRQC", /* 101 */
"EBADSLT", /* 102 */
"EDEADLOCK", /* 103 */
"EBFONT", /* 104 */
"ENONET", /* 105 */
"ENOLINK", /* 106 */
"EADV", /* 107 */
"ESRMNT", /* 108 */
"ECOMM", /* 109 */
"EMULTIHOP", /* 110 */
"EDOTDOT", /* 111 */
"EOVERFLOW", /* 112 */
"ENOTUNIQ", /* 113 */
"EBADFD", /* 114 */
"EREMCHG", /* 115 */
"EILSEQ", /* 116 */
"EUCLEAN", /* 117 */
"ENOTNAM", /* 118 */
"ENAVAIL", /* 119 */
"EISNAM", /* 120 */
"EREMOTEIO", /* 121 */
"ELIBACC", /* 122 */
"ELIBBAD", /* 123 */
"ELIBSCN", /* 124 */
"ELIBMAX", /* 125 */
"ELIBEXEC", /* 126 */
"ERESTART", /* 127 */
"ESTRPIPE", /* 128 */
"ERRNO_129", /* 129 */
"ERRNO_130", /* 130 */
"ERRNO_131", /* 131 */
"ERRNO_132", /* 132 */
"ERRNO_133", /* 133 */
"ERRNO_134", /* 134 */
"ERRNO_135", /* 135 */
"ERRNO_136", /* 136 */
"ERRNO_137", /* 137 */
"ERRNO_138", /* 138 */
"ERRNO_139", /* 139 */
"ERRNO_140", /* 140 */
"ERRNO_141", /* 141 */
"ERRNO_142", /* 142 */
"ERRNO_143", /* 143 */
"ERRNO_144", /* 144 */
"ERRNO_145", /* 145 */
"ERRNO_146", /* 146 */
"ERRNO_147", /* 147 */
"ERRNO_148", /* 148 */
"ERRNO_149", /* 149 */
"ERRNO_150", /* 150 */
"ERRNO_151", /* 151 */
"ERRNO_152", /* 152 */
"ERRNO_153", /* 153 */
"ERRNO_154", /* 154 */
"ERRNO_155", /* 155 */
"ERRNO_156", /* 156 */
"ERRNO_157", /* 157 */
"ERRNO_158", /* 158 */
"ERRNO_159", /* 159 */
"ERRNO_160", /* 160 */
"ERRNO_161", /* 161 */
"ERRNO_162", /* 162 */
"ERRNO_163", /* 163 */
"ERRNO_164", /* 164 */
"ERRNO_165", /* 165 */
"ERRNO_166", /* 166 */
"ERRNO_167", /* 167 */
"ERRNO_168", /* 168 */
"ERRNO_169", /* 169 */
"ERRNO_170", /* 170 */
"ERRNO_171", /* 171 */
"ERRNO_172", /* 172 */
"ERRNO_173", /* 173 */
"ERRNO_174", /* 174 */
"ERRNO_175", /* 175 */
"ERRNO_176", /* 176 */
"ERRNO_177", /* 177 */
"ERRNO_178", /* 178 */
"ERRNO_179", /* 179 */
"ERRNO_180", /* 180 */
"ERRNO_181", /* 181 */
"ERRNO_182", /* 182 */
"ERRNO_183", /* 183 */
"ERRNO_184", /* 184 */
"ERRNO_185", /* 185 */
"ERRNO_186", /* 186 */
"ERRNO_187", /* 187 */
"ERRNO_188", /* 188 */
"ERRNO_189", /* 189 */
"ERRNO_190", /* 190 */
"ERRNO_191", /* 191 */
"ERRNO_192", /* 192 */
"ERRNO_193", /* 193 */
"ERRNO_194", /* 194 */
"ERRNO_195", /* 195 */
"ERRNO_196", /* 196 */
"ERRNO_197", /* 197 */
"ERRNO_198", /* 198 */
"ERRNO_199", /* 199 */
"ERRNO_200", /* 200 */
"ERRNO_201", /* 201 */
"ERRNO_202", /* 202 */
"ERRNO_203", /* 203 */
"ERRNO_204", /* 204 */
"ERRNO_205", /* 205 */
"ERRNO_206", /* 206 */
"ERRNO_207", /* 207 */
"ERRNO_208", /* 208 */
"ERRNO_209", /* 209 */
"ERRNO_210", /* 210 */
"ERRNO_211", /* 211 */
"ERRNO_212", /* 212 */
"ERRNO_213", /* 213 */
"ERRNO_214", /* 214 */
"ERRNO_215", /* 215 */
"ERRNO_216", /* 216 */
"ERRNO_217", /* 217 */
"ERRNO_218", /* 218 */
"ERRNO_219", /* 219 */
"ERRNO_220", /* 220 */
"ERRNO_221", /* 221 */
"ERRNO_222", /* 222 */
"ERRNO_223", /* 223 */
"ERRNO_224", /* 224 */
"ERRNO_225", /* 225 */
"ERRNO_226", /* 226 */
"ERRNO_227", /* 227 */
"ERRNO_228", /* 228 */
"ERRNO_229", /* 229 */
"ERRNO_230", /* 230 */
"ERRNO_231", /* 231 */
"ERRNO_232", /* 232 */
"ERRNO_233", /* 233 */
"ERRNO_234", /* 234 */
"ERRNO_235", /* 235 */
"ERRNO_236", /* 236 */
"ERRNO_237", /* 237 */
"ERRNO_238", /* 238 */
"ERRNO_239", /* 239 */
"ERRNO_240", /* 240 */
"ERRNO_241", /* 241 */
"ERRNO_242", /* 242 */
"ERRNO_243", /* 243 */
"ERRNO_244", /* 244 */
"ERRNO_245", /* 245 */
"ERRNO_246", /* 246 */
"ERRNO_247", /* 247 */
"ERRNO_248", /* 248 */
"ERRNO_249", /* 249 */
"ERRNO_250", /* 250 */
"ERRNO_251", /* 251 */
"ERRNO_252", /* 252 */
"ERRNO_253", /* 253 */
"ERRNO_254", /* 254 */
"ERRNO_255", /* 255 */
"ERRNO_256", /* 256 */
"ERRNO_257", /* 257 */
"ERRNO_258", /* 258 */
"ERRNO_259", /* 259 */
"ERRNO_260", /* 260 */
"ERRNO_261", /* 261 */
"ERRNO_262", /* 262 */
"ERRNO_263", /* 263 */
"ERRNO_264", /* 264 */
"ERRNO_265", /* 265 */
"ERRNO_266", /* 266 */
"ERRNO_267", /* 267 */
"ERRNO_268", /* 268 */
"ERRNO_269", /* 269 */
"ERRNO_270", /* 270 */
"ERRNO_271", /* 271 */
"ERRNO_272", /* 272 */
"ERRNO_273", /* 273 */
"ERRNO_274", /* 274 */
"ERRNO_275", /* 275 */
"ERRNO_276", /* 276 */
"ERRNO_277", /* 277 */
"ERRNO_278", /* 278 */
"ERRNO_279", /* 279 */
"ERRNO_280", /* 280 */
"ERRNO_281", /* 281 */
"ERRNO_282", /* 282 */
"ERRNO_283", /* 283 */
"ERRNO_284", /* 284 */
"ERRNO_285", /* 285 */
"ERRNO_286", /* 286 */
"ERRNO_287", /* 287 */
"ERRNO_288", /* 288 */
"ERRNO_289", /* 289 */
"ERRNO_290", /* 290 */
"ERRNO_291", /* 291 */
"ERRNO_292", /* 292 */
"ERRNO_293", /* 293 */
"ERRNO_294", /* 294 */
"ERRNO_295", /* 295 */
"ERRNO_296", /* 296 */
"ERRNO_297", /* 297 */
"ERRNO_298", /* 298 */
"ERRNO_299", /* 299 */
"ERRNO_300", /* 300 */
"ERRNO_301", /* 301 */
"ERRNO_302", /* 302 */
"ERRNO_303", /* 303 */
"ERRNO_304", /* 304 */
"ERRNO_305", /* 305 */
"ERRNO_306", /* 306 */
"ERRNO_307", /* 307 */
"ERRNO_308", /* 308 */
"ERRNO_309", /* 309 */
"ERRNO_310", /* 310 */
"ERRNO_311", /* 311 */
"ERRNO_312", /* 312 */
"ERRNO_313", /* 313 */
"ERRNO_314", /* 314 */
"ERRNO_315", /* 315 */
"ERRNO_316", /* 316 */
"ERRNO_317", /* 317 */
"ERRNO_318", /* 318 */
"ERRNO_319", /* 319 */
"ERRNO_320", /* 320 */
"ERRNO_321", /* 321 */
"ERRNO_322", /* 322 */
"ERRNO_323", /* 323 */
"ERRNO_324", /* 324 */
"ERRNO_325", /* 325 */
"ERRNO_326", /* 326 */
"ERRNO_327", /* 327 */
"ERRNO_328", /* 328 */
"ERRNO_329", /* 329 */
"ERRNO_330", /* 330 */
"ERRNO_331", /* 331 */
"ERRNO_332", /* 332 */
"ERRNO_333", /* 333 */
"ERRNO_334", /* 334 */
"ERRNO_335", /* 335 */
"ERRNO_336", /* 336 */
"ERRNO_337", /* 337 */
"ERRNO_338", /* 338 */
"ERRNO_339", /* 339 */
"ERRNO_340", /* 340 */
"ERRNO_341", /* 341 */
"ERRNO_342", /* 342 */
"ERRNO_343", /* 343 */
"ERRNO_344", /* 344 */
"ERRNO_345", /* 345 */
"ERRNO_346", /* 346 */
"ERRNO_347", /* 347 */
"ERRNO_348", /* 348 */
"ERRNO_349", /* 349 */
"ERRNO_350", /* 350 */
"ERRNO_351", /* 351 */
"ERRNO_352", /* 352 */
"ERRNO_353", /* 353 */
"ERRNO_354", /* 354 */
"ERRNO_355", /* 355 */
"ERRNO_356", /* 356 */
"ERRNO_357", /* 357 */
"ERRNO_358", /* 358 */
"ERRNO_359", /* 359 */
"ERRNO_360", /* 360 */
"ERRNO_361", /* 361 */
"ERRNO_362", /* 362 */
"ERRNO_363", /* 363 */
"ERRNO_364", /* 364 */
"ERRNO_365", /* 365 */
"ERRNO_366", /* 366 */
"ERRNO_367", /* 367 */
"ERRNO_368", /* 368 */
"ERRNO_369", /* 369 */
"ERRNO_370", /* 370 */
"ERRNO_371", /* 371 */
"ERRNO_372", /* 372 */
"ERRNO_373", /* 373 */
"ERRNO_374", /* 374 */
"ERRNO_375", /* 375 */
"ERRNO_376", /* 376 */
"ERRNO_377", /* 377 */
"ERRNO_378", /* 378 */
"ERRNO_379", /* 379 */
"ERRNO_380", /* 380 */
"ERRNO_381", /* 381 */
"ERRNO_382", /* 382 */
"ERRNO_383", /* 383 */
"ERRNO_384", /* 384 */
"ERRNO_385", /* 385 */
"ERRNO_386", /* 386 */
"ERRNO_387", /* 387 */
"ERRNO_388", /* 388 */
"ERRNO_389", /* 389 */
"ERRNO_390", /* 390 */
"ERRNO_391", /* 391 */
"ERRNO_392", /* 392 */
"ERRNO_393", /* 393 */
"ERRNO_394", /* 394 */
"ERRNO_395", /* 395 */
"ERRNO_396", /* 396 */
"ERRNO_397", /* 397 */
"ERRNO_398", /* 398 */
"ERRNO_399", /* 399 */
"ERRNO_400", /* 400 */
"ERRNO_401", /* 401 */
"ERRNO_402", /* 402 */
"ERRNO_403", /* 403 */
"ERRNO_404", /* 404 */
"ERRNO_405", /* 405 */
"ERRNO_406", /* 406 */
"ERRNO_407", /* 407 */
"ERRNO_408", /* 408 */
"ERRNO_409", /* 409 */
"ERRNO_410", /* 410 */
"ERRNO_411", /* 411 */
"ERRNO_412", /* 412 */
"ERRNO_413", /* 413 */
"ERRNO_414", /* 414 */
"ERRNO_415", /* 415 */
"ERRNO_416", /* 416 */
"ERRNO_417", /* 417 */
"ERRNO_418", /* 418 */
"ERRNO_419", /* 419 */
"ERRNO_420", /* 420 */
"ERRNO_421", /* 421 */
"ERRNO_422", /* 422 */
"ERRNO_423", /* 423 */
"ERRNO_424", /* 424 */
"ERRNO_425", /* 425 */
"ERRNO_426", /* 426 */
"ERRNO_427", /* 427 */
"ERRNO_428", /* 428 */
"ERRNO_429", /* 429 */
"ERRNO_430", /* 430 */
"ERRNO_431", /* 431 */
"ERRNO_432", /* 432 */
"ERRNO_433", /* 433 */
"ERRNO_434", /* 434 */
"ERRNO_435", /* 435 */
"ERRNO_436", /* 436 */
"ERRNO_437", /* 437 */
"ERRNO_438", /* 438 */
"ERRNO_439", /* 439 */
"ERRNO_440", /* 440 */
"ERRNO_441", /* 441 */
"ERRNO_442", /* 442 */
"ERRNO_443", /* 443 */
"ERRNO_444", /* 444 */
"ERRNO_445", /* 445 */
"ERRNO_446", /* 446 */
"ERRNO_447", /* 447 */
"ERRNO_448", /* 448 */
"ERRNO_449", /* 449 */
"ERRNO_450", /* 450 */
"ERRNO_451", /* 451 */
"ERRNO_452", /* 452 */
"ERRNO_453", /* 453 */
"ERRNO_454", /* 454 */
"ERRNO_455", /* 455 */
"ERRNO_456", /* 456 */
"ERRNO_457", /* 457 */
"ERRNO_458", /* 458 */
"ERRNO_459", /* 459 */
"ERRNO_460", /* 460 */
"ERRNO_461", /* 461 */
"ERRNO_462", /* 462 */
"ERRNO_463", /* 463 */
"ERRNO_464", /* 464 */
"ERRNO_465", /* 465 */
"ERRNO_466", /* 466 */
"ERRNO_467", /* 467 */
"ERRNO_468", /* 468 */
"ERRNO_469", /* 469 */
"ERRNO_470", /* 470 */
"ERRNO_471", /* 471 */
"ERRNO_472", /* 472 */
"ERRNO_473", /* 473 */
"ERRNO_474", /* 474 */
"ERRNO_475", /* 475 */
"ERRNO_476", /* 476 */
"ERRNO_477", /* 477 */
"ERRNO_478", /* 478 */
"ERRNO_479", /* 479 */
"ERRNO_480", /* 480 */
"ERRNO_481", /* 481 */
"ERRNO_482", /* 482 */
"ERRNO_483", /* 483 */
"ERRNO_484", /* 484 */
"ERRNO_485", /* 485 */
"ERRNO_486", /* 486 */
"ERRNO_487", /* 487 */
"ERRNO_488", /* 488 */
"ERRNO_489", /* 489 */
"ERRNO_490", /* 490 */
"ERRNO_491", /* 491 */
"ERRNO_492", /* 492 */
"ERRNO_493", /* 493 */
"ERRNO_494", /* 494 */
"ERRNO_495", /* 495 */
"ERRNO_496", /* 496 */
"ERRNO_497", /* 497 */
"ERRNO_498", /* 498 */
"ERRNO_499", /* 499 */
"ERRNO_500", /* 500 */
"ERRNO_501", /* 501 */
"ERRNO_502", /* 502 */
"ERRNO_503", /* 503 */
"ERRNO_504", /* 504 */
"ERRNO_505", /* 505 */
"ERRNO_506", /* 506 */
"ERRNO_507", /* 507 */
"ERRNO_508", /* 508 */
"ERRNO_509", /* 509 */
"ERRNO_510", /* 510 */
"ERRNO_511", /* 511 */
"ERESTARTSYS", /* 512 */
"ERESTARTNOINTR", /* 513 */
"ERESTARTNOHAND", /* 514 */
"ENOIOCTLCMD", /* 515 */

546
linux/alpha/ioctlent.h Normal file
View File

@ -0,0 +1,546 @@
{"linux/ip_fw.h", "IP_FW_TYPE", 0x300},
{"linux/quota.h", "Q_GETQUOTA", 0x300},
{"linux/hdreg.h", "HDIO_GETGEO", 0x301},
{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302},
{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304},
{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x307},
{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308},
{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309},
{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a},
{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b},
{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f},
{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321},
{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322},
{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323},
{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324},
{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325},
{"linux/hdreg.h", "HDIO_SET_DMA", 0x326},
{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327},
{"linux/quota.h", "Q_SYNC", 0x600},
{"linux/lp.h", "LPCHAR", 0x601},
{"linux/lp_m68k.h", "LPCHAR", 0x601},
{"linux/lp.h", "LPTIME", 0x602},
{"linux/lp_m68k.h", "LPTIME", 0x602},
{"linux/lp.h", "LPABORT", 0x604},
{"linux/lp_m68k.h", "LPABORT", 0x604},
{"linux/lp.h", "LPSETIRQ", 0x605},
{"linux/lp_m68k.h", "LPSETIRQ", 0x605},
{"linux/lp.h", "LPGETIRQ", 0x606},
{"linux/lp_m68k.h", "LPGETIRQ", 0x606},
{"linux/lp.h", "LPWAIT", 0x608},
{"linux/lp_m68k.h", "LPWAIT", 0x608},
{"linux/lp.h", "LPCAREFUL", 0x609},
{"linux/lp_m68k.h", "LPCAREFUL", 0x609},
{"linux/lp.h", "LPABORTOPEN", 0x60a},
{"linux/lp_m68k.h", "LPABORTOPEN", 0x60a},
{"linux/lp.h", "LPGETSTATUS", 0x60b},
{"linux/lp_m68k.h", "LPGETSTATUS", 0x60b},
{"linux/lp.h", "LPRESET", 0x60c},
{"linux/lp_m68k.h", "LPRESET", 0x60c},
{"linux/lp.h", "LPGETSTATS", 0x60d},
{"linux/lp.h", "LPGETFLAGS", 0x60e},
{"linux/scc.h", "TIOCSCCCFG", 0x2200},
{"linux/scc.h", "TIOCSCCINI", 0x2201},
{"linux/scc.h", "TIOCCHANINI", 0x2202},
{"linux/scc.h", "TIOCCHANMEM", 0x2210},
{"linux/scc.h", "TIOCGKISS", 0x2282},
{"linux/scc.h", "TIOCSKISS", 0x2283},
{"linux/scc.h", "TIOCSCCSTAT", 0x2284},
{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
{"linux/fb.h", "FBIOGETCMAP", 0x4604},
{"linux/fb.h", "FBIOPUTCMAP", 0x4605},
{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
{"linux/fb.h", "FBIOGET_FCURSORINFO", 0x4607},
{"linux/fb.h", "FBIOGET_VCURSORINFO", 0x4608},
{"linux/fb.h", "FBIOPUT_VCURSORINFO", 0x4609},
{"linux/fb.h", "FBIOGET_CURSORSTATE", 0x460a},
{"linux/fb.h", "FBIOPUT_CURSORSTATE", 0x460b},
{"linux/fb.h", "FBCMD_DRAWLINE", 0x4621},
{"linux/fb.h", "FBCMD_MOVE", 0x4622},
{"linux/kd.h", "KIOCSOUND", 0x4b2f},
{"linux/kd.h", "KDMKTONE", 0x4b30},
{"linux/kd.h", "KDGETLED", 0x4b31},
{"linux/kd.h", "KDSETLED", 0x4b32},
{"linux/kd.h", "KDGKBTYPE", 0x4b33},
{"linux/kd.h", "KDADDIO", 0x4b34},
{"linux/kd.h", "KDDELIO", 0x4b35},
{"linux/kd.h", "KDENABIO", 0x4b36},
{"linux/kd.h", "KDDISABIO", 0x4b37},
{"linux/kd.h", "KDSETMODE", 0x4b3a},
{"linux/kd.h", "KDGETMODE", 0x4b3b},
{"linux/kd.h", "KDMAPDISP", 0x4b3c},
{"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
{"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
{"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
{"linux/kd.h", "KDGKBMODE", 0x4b44},
{"linux/kd.h", "KDSKBMODE", 0x4b45},
{"linux/kd.h", "KDGKBENT", 0x4b46},
{"linux/kd.h", "KDSKBENT", 0x4b47},
{"linux/kd.h", "KDGKBSENT", 0x4b48},
{"linux/kd.h", "KDSKBSENT", 0x4b49},
{"linux/kd.h", "KDGKBDIACR", 0x4b4a},
{"linux/kd.h", "KDSKBDIACR", 0x4b4b},
{"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
{"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
{"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
{"linux/kd.h", "GIO_FONT", 0x4b60},
{"linux/kd.h", "PIO_FONT", 0x4b61},
{"linux/kd.h", "KDGKBMETA", 0x4b62},
{"linux/kd.h", "KDSKBMETA", 0x4b63},
{"linux/kd.h", "KDGKBLED", 0x4b64},
{"linux/kd.h", "KDSKBLED", 0x4b65},
{"linux/kd.h", "GIO_UNIMAP", 0x4b66},
{"linux/kd.h", "PIO_UNIMAP", 0x4b67},
{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
{"linux/kd.h", "GIO_FONTX", 0x4b6b},
{"linux/kd.h", "PIO_FONTX", 0x4b6c},
{"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
{"linux/kd.h", "GIO_CMAP", 0x4b70},
{"linux/kd.h", "PIO_CMAP", 0x4b71},
{"linux/loop.h", "LOOP_SET_FD", 0x4c00},
{"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
{"linux/cdrom.h", "CDROMPAUSE", 0x5301},
{"linux/cdrom.h", "CDROMRESUME", 0x5302},
{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
{"linux/cdrom.h", "CDROMSTOP", 0x5307},
{"linux/cdrom.h", "CDROMSTART", 0x5308},
{"linux/cdrom.h", "CDROMEJECT", 0x5309},
{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
{"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
{"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
{"linux/cdrom.h", "CDROM_GET_UPC", 0x5311},
{"linux/cm206.h", "CDROM_GET_UPC", 0x5311},
{"linux/cdrom.h", "CDROMRESET", 0x5312},
{"linux/cm206.h", "CDROMRESET", 0x5312},
{"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
{"linux/cdrom.h", "CDROMREADRAW", 0x5314},
{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
{"linux/cdrom.h", "CDROMSEEK", 0x5316},
{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
{"linux/cdrom.h", "CDROMREADALL", 0x5318},
{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
{"linux/cdrom.h", "CDROMLOADFROMSLOT", 0x531a},
{"linux/ucdrom.h", "CDROM_SET_OPTIONS", 0x5320},
{"linux/ucdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
{"linux/ucdrom.h", "CDROM_SELECT_SPEED", 0x5322},
{"linux/ucdrom.h", "CDROM_SELECT_DISC", 0x5323},
{"linux/ucdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
{"linux/ucdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
{"linux/ucdrom.h", "CDROM_DISC_STATUS", 0x5327},
{"linux/sbpcd.h", "CDROMAUDIOBUFSIZ", 0x5382},
{"asm/ioctls.h", "TIOCEXCL", 0x540c},
{"asm/ioctls.h", "TIOCNXCL", 0x540d},
{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm/ioctls.h", "TIOCSTI", 0x5412},
{"asm/ioctls.h", "TIOCMGET", 0x5415},
{"asm/ioctls.h", "TIOCMBIS", 0x5416},
{"asm/ioctls.h", "TIOCMBIC", 0x5417},
{"asm/ioctls.h", "TIOCMSET", 0x5418},
{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
{"asm/ioctls.h", "TIOCCONS", 0x541d},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm/ioctls.h", "TIOCPKT", 0x5420},
{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm/ioctls.h", "TIOCSETD", 0x5423},
{"asm/ioctls.h", "TIOCGETD", 0x5424},
{"asm/ioctls.h", "TCSBRKP", 0x5425},
{"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
{"linux/vt.h", "VT_OPENQRY", 0x5600},
{"linux/vt.h", "VT_GETMODE", 0x5601},
{"linux/vt.h", "VT_SETMODE", 0x5602},
{"linux/vt.h", "VT_GETSTATE", 0x5603},
{"linux/vt.h", "VT_SENDSIG", 0x5604},
{"linux/vt.h", "VT_RELDISP", 0x5605},
{"linux/vt.h", "VT_ACTIVATE", 0x5606},
{"linux/vt.h", "VT_WAITACTIVE", 0x5607},
{"linux/vt.h", "VT_DISALLOCATE", 0x5608},
{"linux/vt.h", "VT_RESIZE", 0x5609},
{"linux/vt.h", "VT_RESIZEX", 0x560a},
{"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
{"asm/sockios.h", "SIOCGSTAMP", 0x8906},
{"linux/sockios.h", "SIOCADDRT", 0x890b},
{"linux/sockios.h", "SIOCDELRT", 0x890c},
{"linux/sockios.h", "SIOCGIFNAME", 0x8910},
{"linux/sockios.h", "SIOCSIFLINK", 0x8911},
{"linux/sockios.h", "SIOCGIFCONF", 0x8912},
{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
{"linux/sockios.h", "SIOCGIFADDR", 0x8915},
{"linux/sockios.h", "SIOCSIFADDR", 0x8916},
{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
{"linux/sockios.h", "SIOCGIFMEM", 0x891f},
{"linux/sockios.h", "SIOCSIFMEM", 0x8920},
{"linux/sockios.h", "SIOCGIFMTU", 0x8921},
{"linux/sockios.h", "SIOCSIFMTU", 0x8922},
{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
{"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
{"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
{"linux/sockios.h", "SIOCADDMULTI", 0x8931},
{"linux/sockios.h", "SIOCDELMULTI", 0x8932},
{"linux/sockios.h", "SIOCGIFBR", 0x8940},
{"linux/sockios.h", "SIOCSIFBR", 0x8941},
{"linux/sockios.h", "OLD_SIOCDARP", 0x8950},
{"linux/sockios.h", "OLD_SIOCGARP", 0x8951},
{"linux/sockios.h", "OLD_SIOCSARP", 0x8952},
{"linux/sockios.h", "SIOCDARP", 0x8953},
{"linux/sockios.h", "SIOCGARP", 0x8954},
{"linux/sockios.h", "SIOCSARP", 0x8955},
{"linux/sockios.h", "SIOCDRARP", 0x8960},
{"linux/sockios.h", "SIOCGRARP", 0x8961},
{"linux/sockios.h", "SIOCSRARP", 0x8962},
{"linux/sockios.h", "SIOCGIFMAP", 0x8970},
{"linux/sockios.h", "SIOCSIFMAP", 0x8971},
{"linux/sockios.h", "SIOCADDDLCI", 0x8980},
{"linux/sockios.h", "SIOCDELDLCI", 0x8981},
{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
{"linux/sbpcd.h", "DDIOCSDBG", 0x9000},
{"linux/cyclades.h", "CYGETMON", 0x435901},
{"linux/cyclades.h", "CYGETTHRESH", 0x435902},
{"linux/cyclades.h", "CYSETTHRESH", 0x435903},
{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904},
{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905},
{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906},
{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907},
{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908},
{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909},
{"linux/fs.h", "FIBMAP", 0x20000001},
{"linux/fs.h", "FIGETBSZ", 0x20000002},
{"linux/fd.h", "FDCLRPRM", 0x20000241},
{"linux/fd.h", "FDMSGON", 0x20000245},
{"linux/fd.h", "FDMSGOFF", 0x20000246},
{"linux/fd.h", "FDFMTBEG", 0x20000247},
{"linux/fd.h", "FDFMTEND", 0x20000249},
{"linux/fd.h", "FDSETEMSGTRESH", 0x2000024a},
{"linux/fd.h", "FDFLUSH", 0x2000024b},
{"linux/fd.h", "FDRESET", 0x20000254},
{"linux/fd.h", "FDWERRORCLR", 0x20000256},
{"linux/fd.h", "FDRAWCMD", 0x20000258},
{"linux/fd.h", "FDTWADDLE", 0x20000259},
{"linux/fd.h", "FDEJECT", 0x2000025a},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_DOS", 0x200004d2},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_DOS", 0x200004d3},
{"linux/umsdos_fs.h", "UMSDOS_RMDIR_DOS", 0x200004d4},
{"linux/umsdos_fs.h", "UMSDOS_STAT_DOS", 0x200004d5},
{"linux/umsdos_fs.h", "UMSDOS_CREAT_EMD", 0x200004d6},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_EMD", 0x200004d7},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_EMD", 0x200004d8},
{"linux/umsdos_fs.h", "UMSDOS_GETVERSION", 0x200004d9},
{"linux/umsdos_fs.h", "UMSDOS_INIT_EMD", 0x200004da},
{"linux/umsdos_fs.h", "UMSDOS_DOS_SETUP", 0x200004db},
{"linux/umsdos_fs.h", "UMSDOS_RENAME_DOS", 0x200004dc},
{"linux/md.h", "REGISTER_DEV", 0x20000901},
{"linux/md.h", "START_MD", 0x20000902},
{"linux/md.h", "STOP_MD", 0x20000903},
{"linux/md.h", "MD_INVALID", 0x20000904},
{"linux/md.h", "MD_VALID", 0x20000905},
{"linux/fs.h", "BLKROSET", 0x2000125d},
{"linux/fs.h", "BLKROGET", 0x2000125e},
{"linux/fs.h", "BLKRRPART", 0x2000125f},
{"linux/fs.h", "BLKGETSIZE", 0x20001260},
{"linux/fs.h", "BLKFLSBUF", 0x20001261},
{"linux/fs.h", "BLKRASET", 0x20001262},
{"linux/fs.h", "BLKRAGET", 0x20001263},
{"linux/cm206.h", "CM206CTL_GET_STAT", 0x20002000},
{"linux/cm206.h", "CM206CTL_GET_LAST_STAT", 0x20002001},
{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x20004101},
{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x20004102},
{"linux/baycom.h", "BAYCOMCTL_PARAM_TXDELAY", 0x20004202},
{"linux/baycom.h", "BAYCOMCTL_PARAM_PPERSIST", 0x20004203},
{"linux/baycom.h", "BAYCOMCTL_PARAM_SLOTTIME", 0x20004204},
{"linux/baycom.h", "BAYCOMCTL_PARAM_TXTAIL", 0x20004205},
{"linux/baycom.h", "BAYCOMCTL_PARAM_FULLDUP", 0x20004206},
{"linux/baycom.h", "BAYCOMCTL_CALIBRATE", 0x2000420a},
{"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x20004300},
{"linux/isdn.h", "IIOCNETAIF", 0x20004901},
{"linux/isdn.h", "IIOCNETDIF", 0x20004902},
{"linux/isdn.h", "IIOCNETSCF", 0x20004903},
{"linux/isdn.h", "IIOCNETGCF", 0x20004904},
{"linux/isdn.h", "IIOCNETANM", 0x20004905},
{"linux/isdn.h", "IIOCNETDNM", 0x20004906},
{"linux/isdn.h", "IIOCNETGNM", 0x20004907},
{"linux/isdn.h", "IIOCGETSET", 0x20004908},
{"linux/isdn.h", "IIOCSETSET", 0x20004909},
{"linux/isdn.h", "IIOCSETVER", 0x2000490a},
{"linux/isdn.h", "IIOCNETHUP", 0x2000490b},
{"linux/isdn.h", "IIOCSETGST", 0x2000490c},
{"linux/isdn.h", "IIOCSETBRJ", 0x2000490d},
{"linux/isdn.h", "IIOCSIGPRF", 0x2000490e},
{"linux/isdn.h", "IIOCGETPRF", 0x2000490f},
{"linux/isdn.h", "IIOCSETPRF", 0x20004910},
{"linux/isdn.h", "IIOCGETMAP", 0x20004911},
{"linux/isdn.h", "IIOCSETMAP", 0x20004912},
{"linux/isdn.h", "IIOCNETASL", 0x20004913},
{"linux/isdn.h", "IIOCNETDIL", 0x20004914},
{"linux/isdn.h", "IIOCGETCPS", 0x20004915},
{"linux/isdn.h", "IIOCNETALN", 0x20004920},
{"linux/isdn.h", "IIOCNETDLN", 0x20004921},
{"linux/isdn.h", "IIOCDBGVAR", 0x2000497f},
{"linux/isdn.h", "IIOCDRVCTL", 0x20004980},
{"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x20005000},
{"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x20005001},
{"linux/soundcard.h", "SNDCTL_DSP_POST", 0x20005008},
{"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x2000500e},
{"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x20005015},
{"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x20005016},
{"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x20005100},
{"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x20005101},
{"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x20005111},
{"linux/random.h", "RNDZAPENTCNT", 0x20005204},
{"linux/random.h", "RNDCLEARPOOL", 0x20005206},
{"linux/soundcard.h", "SNDCTL_TMR_START", 0x20005402},
{"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x20005403},
{"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x20005404},
{"linux/comstats.h", "COM_GETPORTSTATS", 0x2000631e},
{"linux/comstats.h", "COM_CLRPORTSTATS", 0x2000631f},
{"linux/comstats.h", "COM_GETBRDSTATS", 0x20006320},
{"linux/comstats.h", "COM_READPORT", 0x20006328},
{"linux/comstats.h", "COM_READBOARD", 0x20006329},
{"linux/comstats.h", "COM_READPANEL", 0x2000632a},
{"asm/ioctls.h", "FIOCLEX", 0x20006601},
{"asm/ioctls.h", "FIONCLEX", 0x20006602},
{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x20006e03},
{"linux/cdk.h", "STL_BINTR", 0x20007314},
{"linux/cdk.h", "STL_BSTART", 0x20007315},
{"linux/cdk.h", "STL_BSTOP", 0x20007316},
{"linux/cdk.h", "STL_BRESET", 0x20007317},
{"linux/cdk.h", "STL_GETPFLAG", 0x20007350},
{"linux/cdk.h", "STL_SETPFLAG", 0x20007351},
{"asm/ioctls.h", "TCSBRK", 0x2000741d},
{"asm/ioctls.h", "TCXONC", 0x2000741e},
{"asm/ioctls.h", "TCFLSH", 0x2000741f},
{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x2000744e},
{"asm/ioctls.h", "TIOCSTART", 0x2000746e},
{"asm/ioctls.h", "TIOCSTOP", 0x2000746f},
{"linux/baycom.h", "BAYCOMCTL_GETDCD", 0x40014200},
{"linux/baycom.h", "BAYCOMCTL_GETPTT", 0x40014201},
{"linux/baycom.h", "BAYCOMCTL_GETSAMPLES", 0x40014210},
{"linux/baycom.h", "BAYCOMCTL_GETBITS", 0x40014211},
{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x40044d00},
{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x40044d01},
{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x40044d02},
{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x40044d03},
{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x40044d04},
{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x40044d05},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x40044d06},
{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x40044d07},
{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x40044d08},
{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x40044d09},
{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x40044d0a},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x40044d0b},
{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x40044d0c},
{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x40044d0d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x40044d0e},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x40044d0f},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x40044d10},
{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x40044d1c},
{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x40044d1d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x40044d1e},
{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x40044dfb},
{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x40044dfc},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x40044dfd},
{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x40044dfe},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x40044dff},
{"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x40045002},
{"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x40045005},
{"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x40045006},
{"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x40045007},
{"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x4004500b},
{"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x4004500f},
{"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x40045010},
{"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x40045104},
{"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x40045105},
{"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x4004510a},
{"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x4004510b},
{"linux/random.h", "RNDGETENTCNT", 0x40045200},
{"asm/sockios.h", "FIOGETOWN", 0x4004667b},
{"asm/ioctls.h", "FIONREAD", 0x4004667f},
{"asm/sockios.h", "SIOCATMARK", 0x40047307},
{"asm/sockios.h", "SIOCGPGRP", 0x40047309},
{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x40047441},
{"linux/if_ppp.h", "PPPIOCGMRU", 0x40047453},
{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x40047455},
{"linux/if_ppp.h", "PPPIOCGUNIT", 0x40047456},
{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x40047458},
{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x4004745a},
{"asm/ioctls.h", "TIOCOUTQ", 0x40047473},
{"asm/ioctls.h", "TIOCGPGRP", 0x40047477},
{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x40047482},
{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x40047501},
{"asm/ioctls.h", "TIOCGETP", 0x40067408},
{"asm/ioctls.h", "TIOCGETC", 0x40067412},
{"asm/ioctls.h", "TIOCGLTC", 0x40067474},
{"linux/baycom.h", "BAYCOMCTL_DEBUG1", 0x40084212},
{"linux/baycom.h", "BAYCOMCTL_DEBUG2", 0x40084213},
{"linux/baycom.h", "BAYCOMCTL_DEBUG3", 0x40084214},
{"linux/random.h", "RNDGETPOOL", 0x40085202},
{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x40086601},
{"linux/mtio.h", "MTIOCPOS", 0x40086d03},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x40087201},
{"asm/ioctls.h", "TIOCGWINSZ", 0x40087468},
{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x40087601},
{"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x400c5011},
{"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x400c5012},
{"linux/fd.h", "FDGETDRVTYP", 0x4010020f},
{"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x4010500c},
{"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x4010500d},
{"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x40105013},
{"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x40105014},
{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x40106e01},
{"linux/if_ppp.h", "PPPIOCGIDLE", 0x4010743f},
{"asm/ioctls.h", "TCGETA", 0x40127417},
{"linux/fd.h", "FDGETMAXERRS", 0x4014020e},
{"linux/fd.h", "FDGETPRM", 0x40200204},
{"linux/fd.h", "FDGETFDCSTAT", 0x40200215},
{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x40207450},
{"linux/baycom.h", "BAYCOMCTL_GETPARAMS", 0x40244208},
{"linux/baycom.h", "BAYCOMCTL_SETPARAMS", 0x40244209},
{"linux/fd.h", "FDWERRORGET", 0x40280217},
{"linux/baycom.h", "BAYCOMCTL_GETSTAT", 0x40284207},
{"asm/ioctls.h", "TCGETS", 0x402c7413},
{"linux/mtio.h", "MTIOCGET", 0x40306d02},
{"linux/fd.h", "FDGETDRVSTAT", 0x40500212},
{"linux/fd.h", "FDPOLLDRVSTAT", 0x40500213},
{"linux/fd.h", "FDGETDRVPRM", 0x40800211},
{"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x4fa44309},
{"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x80045010},
{"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x80045106},
{"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x80045108},
{"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x80045109},
{"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x8004510d},
{"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x8004510f},
{"linux/random.h", "RNDADDTOENTCNT", 0x80045201},
{"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x80045407},
{"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x80045408},
{"asm/sockios.h", "FIOSETOWN", 0x8004667c},
{"asm/ioctls.h", "FIOASYNC", 0x8004667d},
{"asm/ioctls.h", "FIONBIO", 0x8004667e},
{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x80046e02},
{"asm/sockios.h", "SIOCSPGRP", 0x80047308},
{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x80047440},
{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x80047451},
{"linux/if_ppp.h", "PPPIOCSMRU", 0x80047452},
{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x80047454},
{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x80047457},
{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x80047459},
{"asm/ioctls.h", "TIOCSPGRP", 0x80047476},
{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x80047481},
{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x80047483},
{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x80047484},
{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x80047485},
{"asm/ioctls.h", "TIOCSETP", 0x80067409},
{"asm/ioctls.h", "TIOCSETN", 0x8006740a},
{"asm/ioctls.h", "TIOCSETC", 0x80067411},
{"asm/ioctls.h", "TIOCSLTC", 0x80067475},
{"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x80085112},
{"linux/random.h", "RNDADDENTROPY", 0x80085203},
{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x80086602},
{"linux/mtio.h", "MTIOCTOP", 0x80086d01},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x80087202},
{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x8008744b},
{"asm/ioctls.h", "TIOCSWINSZ", 0x80087467},
{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x80087602},
{"linux/fd.h", "FDFMTTRK", 0x800c0248},
{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x8010744d},
{"asm/ioctls.h", "TCSETA", 0x80127418},
{"asm/ioctls.h", "TCSETAW", 0x80127419},
{"asm/ioctls.h", "TCSETAF", 0x8012741c},
{"linux/fd.h", "FDSETMAXERRS", 0x8014024c},
{"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x80144304},
{"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x80144305},
{"linux/fd.h", "FDSETPRM", 0x80200242},
{"linux/fd.h", "FDDEFPRM", 0x80200243},
{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x8020744f},
{"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x80285107},
{"asm/ioctls.h", "TCSETS", 0x802c7414},
{"asm/ioctls.h", "TCSETSW", 0x802c7415},
{"asm/ioctls.h", "TCSETSF", 0x802c7416},
{"linux/fd.h", "FDSETDRVPRM", 0x80800290},
{"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x8fa44308},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff},
{"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0xc0045002},
{"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0xc0045003},
{"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0xc0045004},
{"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0xc0045005},
{"linux/soundcard.h", "SOUND_PCM_WRITE_CHANNELS", 0xc0045006},
{"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0xc0045007},
{"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0xc0045009},
{"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0xc004500a},
{"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0xc0045103},
{"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0xc004510e},
{"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0xc0045401},
{"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0xc0045405},
{"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0xc0045406},
{"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0xc0046d00},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0xc0046d01},
{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c},
{"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0xc0144302},
{"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0xc0144303},
{"linux/soundcard.h", "SNDCTL_COPR_RUN", 0xc0144306},
{"linux/soundcard.h", "SNDCTL_COPR_HALT", 0xc0144307},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0xc0216d02},
{"linux/isdn_ppp.h", "PPPIOCLINKINFO", 0xc0247480},
{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0386e04},
{"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0xc074510c},
{"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0xc08c5102},
{"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0xcfb04301},
{"linux/soundcard.h", "SNDCTL_PMGR_IFACE", 0xcfb85001},
{"linux/soundcard.h", "SNDCTL_PMGR_ACCESS", 0xcfb85110},

98
linux/alpha/ioctlent.sh Normal file
View File

@ -0,0 +1,98 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
# All rights reserved.
#
# Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
# 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$
# Files to find.
file_find='asm/*.h linux/*.h scsi/*.h'
# Files to stop.
file_stop='asm/byteorder.h linux/config.h linux/pci.h linux/xd.h'
# Defs to find.
# Work on the kernel source to convert all to df_iowr.
# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h.
df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+'
df_iowr='_IO|_IOR|_IOW|_IOWR'
df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]'
df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h
df_470N='470[0-9]' # linux/fs.h (only in 1.2.13)
df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h
df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13)
df_tail='([() ]|$)'
def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail"
# Defs to stop.
ds_tail='_MAGIC|_PATCH'
ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13)
ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13)
def_stop="$ds_tail|$ds_fdmp|$ds_mtio"
# Validate arg count.
if [ $# -ne 1 ]
then
echo "usage: $0 include-directory" >&2
exit 1
fi
# Grep through the files.
(
# Construct list: find files minus stop files.
cd $1 || exit
file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u`
# Grep matching #define lines.
# Transform to C structure form.
# Filter out stop list.
egrep "$def_find" $file_list |
sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' |
egrep -v "$def_stop"
) > ioctlent.tmp
# Generate the output file.
echo '/* This file is automatically generated by ioctlent.sh */'
echo
echo '#include <sys/types.h>'
echo
echo '/* Needed for <linux/baycom.h> */'
echo '#define BAYCOM_DEBUG'
echo
echo '/* Needed for <linux/cyclades.h> */'
echo '#include <linux/termios.h>'
echo '#include <linux/tqueue.h>'
echo
awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u
echo
echo 'struct ioctlent ioctlent [] ='
echo '{'
cat ioctlent.tmp
echo '};'
# Clean up.
rm -f ioctlent.tmp

32
linux/alpha/signalent.h Normal file
View File

@ -0,0 +1,32 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGEMT", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGBUS", /* 10 */
"SIGSEGV", /* 11 */
"SIGSYS", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGURG", /* 16 */
"SIGSTOP", /* 17 */
"SIGTSTP", /* 18 */
"SIGCONT", /* 19 */
"SIGCHLD", /* 20 */
"SIGTTIN", /* 21 */
"SIGTTOU", /* 22 */
"SIGIO", /* 23 */
"SIGXCPU", /* 24 */
"SIGXFSZ", /* 25 */
"SIGVTALRM", /* 26 */
"SIGPROF", /* 27 */
"SIGWINCH", /* 28 */
"SIGINFO", /* 29 */
"SIGUSR1", /* 30 */
"SIGUSR2", /* 31 */

380
linux/alpha/syscallent.h Normal file
View File

@ -0,0 +1,380 @@
/*
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
{ 5, 0, printargs, "SYS_0" }, /* 0 */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TF, sys_read, "read" }, /* 3 */
{ 3, TF, sys_write, "write" }, /* 4 */
{ 5, 0, printargs, "SYS_5" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 4, TP, sys_wait4, "wait4" }, /* 7 */
{ 5, 0, printargs, "SYS_8" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 5, 0, printargs, "SYS_11" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "chown" }, /* 16 */
{ 1, 0, sys_brk, "brk" }, /* 17 */
{ 5, 0, printargs, "SYS_18" }, /* 18 */
{ 3, TF, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getxpid" }, /* 20 */
{ 4, 0, printargs, "osf_mount" }, /* 21 */
{ 2, 0, printargs, "osf_umount" }, /* 22 */
{ 1, 0, sys_setuid, "setuid" }, /* 23 */
{ 0, 0, sys_getuid, "getxuid" }, /* 24 */
{ 5, 0, printargs, "SYS_25" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 5, 0, printargs, "SYS_27" }, /* 27 */
{ 5, 0, printargs, "SYS_28" }, /* 28 */
{ 5, 0, printargs, "SYS_29" }, /* 29 */
{ 5, 0, printargs, "SYS_30" }, /* 30 */
{ 5, 0, printargs, "SYS_31" }, /* 31 */
{ 5, 0, printargs, "SYS_32" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
{ 5, 0, printargs, "SYS_34" }, /* 34 */
{ 5, 0, printargs, "SYS_35" }, /* 35 */
{ 0, 0, sys_sync, "sync" }, /* 36 */
{ 2, TS, sys_kill, "kill" }, /* 37 */
{ 5, 0, printargs, "SYS_38" }, /* 38 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 39 */
{ 5, 0, printargs, "SYS_40" }, /* 40 */
{ 1, 0, sys_dup, "dup" }, /* 41 */
{ 1, 0, sys_pipe, "pipe" }, /* 42 */
{ 5, 0, printargs, "SYS_43" }, /* 43 */
{ 5, 0, printargs, "SYS_44" }, /* 44 */
{ 3, TF, sys_open, "open" }, /* 45 */
{ 5, 0, printargs, "SYS_46" }, /* 46 */
{ 1, 0, sys_getgid, "getxgid" }, /* 47 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 48 */
{ 5, 0, printargs, "SYS_49" }, /* 49 */
{ 5, 0, printargs, "SYS_50" }, /* 50 */
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 52 */
{ 5, 0, printargs, "SYS_53" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 5, 0, printargs, "SYS_55" }, /* 55 */
{ 5, 0, printargs, "SYS_56" }, /* 56 */
{ 2, TF, sys_symlink, "symlink" }, /* 57 */
{ 3, TF, sys_readlink, "readlink" }, /* 58 */
{ 3, TF|TP, sys_execve, "execve" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 5, 0, printargs, "SYS_62" }, /* 62 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 63 */
{ 0, 0, sys_getpagesize, "getpagesize" }, /* 64 */
{ 5, 0, printargs, "SYS_65" }, /* 65 */
{ 0, TP, sys_fork, "osf_vfork" }, /* 66 */
{ 2, TF, sys_stat, "stat" }, /* 67 */
{ 2, TF, sys_lstat, "lstat" }, /* 68 */
{ 5, 0, printargs, "SYS_69" }, /* 69 */
{ 5, 0, printargs, "SYS_70" }, /* 70 */
{ 1, 0, sys_mmap, "mmap" }, /* 71 */
{ 5, 0, printargs, "SYS_72" }, /* 72 */
{ 2, 0, sys_munmap, "munmap" }, /* 73 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 74 */
{ 0, 0, printargs, "madvise" }, /* 75 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 76 */
{ 5, 0, printargs, "SYS_77" }, /* 77 */
{ 5, 0, printargs, "SYS_78" }, /* 78 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 79 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 80 */
{ 5, 0, printargs, "SYS_81" }, /* 81 */
{ 2, 0, sys_setpgrp, "setpgrp" }, /* 82 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 83 */
{ 5, 0, printargs, "SYS_84" }, /* 84 */
{ 5, 0, printargs, "SYS_85" }, /* 85 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 86 */
{ 2, 0, sys_gethostname, "gethostname" }, /* 87 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 88 */
{ 0, 0, sys_getdtablesize, "getdtablesize" }, /* 89 */
{ 2, 0, sys_dup2, "dup2" }, /* 90 */
{ 2, 0, sys_fstat, "fstat" }, /* 91 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 92 */
{ 5, 0, sys_select, "select" }, /* 93 */
{ 5, 0, printargs, "SYS_94" }, /* 94 */
{ 1, 0, sys_fsync, "fsync" }, /* 95 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 96 */
{ 3, TN, sys_socket, "socket" }, /* 97 */
{ 3, TN, sys_connect, "connect" }, /* 98 */
{ 3, TN, sys_accept, "accept" }, /* 99 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 100 */
{ 4, TN, sys_send, "send" }, /* 101 */
{ 4, TN, sys_recv, "recv" }, /* 102 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 103 */
{ 3, TN, sys_bind, "bind" }, /* 104 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */
{ 2, TN, sys_listen, "listen" }, /* 106 */
{ 5, 0, printargs, "SYS_107" }, /* 107 */
{ 5, 0, printargs, "SYS_108" }, /* 108 */
{ 5, 0, printargs, "SYS_109" }, /* 109 */
{ 5, 0, printargs, "SYS_110" }, /* 110 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 111 */
{ 5, 0, printargs, "SYS_112" }, /* 112 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */
{ 5, 0, printargs, "SYS_115" }, /* 115 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 116 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 117 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
{ 5, 0, printargs, "SYS_119" }, /* 119 */
{ 3, 0, sys_readv, "readv" }, /* 120 */
{ 3, 0, sys_writev, "writev" }, /* 121 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 122 */
{ 3, 0, sys_fchown, "fchown" }, /* 123 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 124 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 125 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 126 */
{ 2, 0, sys_setregid, "setregid" }, /* 127 */
{ 2, TF, sys_rename, "rename" }, /* 128 */
{ 2, TF, sys_truncate, "truncate" }, /* 129 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 130 */
{ 2, 0, sys_flock, "flock" }, /* 131 */
{ 1, 0, sys_setgid, "setgid" }, /* 132 */
{ 6, TN, sys_sendto, "sendto" }, /* 133 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 134 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 135 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 136 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 137 */
{ 2, 0, sys_utimes, "utimes" }, /* 138 */
{ 5, 0, printargs, "SYS_139" }, /* 139 */
{ 5, 0, printargs, "SYS_140" }, /* 140 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 141 */
{ 5, 0, printargs, "SYS_142" }, /* 142 */
{ 5, 0, printargs, "SYS_143" }, /* 143 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
{ 5, 0, printargs, "SYS_146" }, /* 146 */
{ 0, 0, sys_setsid, "setsid" }, /* 147 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 148 */
{ 5, 0, printargs, "SYS_149" }, /* 149 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 150 */
{ 5, 0, printargs, "SYS_151" }, /* 151 */
{ 5, 0, printargs, "SYS_152" }, /* 152 */
{ 5, 0, printargs, "SYS_153" }, /* 153 */
{ 5, 0, printargs, "SYS_154" }, /* 154 */
{ 5, 0, printargs, "SYS_155" }, /* 155 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 156 */
{ 5, 0, printargs, "SYS_157" }, /* 157 */
{ 5, 0, printargs, "SYS_158" }, /* 158 */
{ 4, 0, printargs, "osf_getdirentries"}, /* 159 */
{ 3, 0, osf_statfs, "osf_statfs" }, /* 160 */
{ 3, 0, osf_fstatfs, "osf_fstatfs" }, /* 161 */
{ 5, 0, printargs, "SYS_162" }, /* 162 */
{ 5, 0, printargs, "SYS_163" }, /* 163 */
{ 5, 0, printargs, "SYS_164" }, /* 164 */
{ 2, 0, printargs, "osf_getdomainname"}, /* 165 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 166 */
{ 5, 0, printargs, "SYS_167" }, /* 167 */
{ 5, 0, printargs, "SYS_168" }, /* 168 */
{ 5, 0, printargs, "SYS_169" }, /* 169 */
{ 5, 0, printargs, "SYS_170" }, /* 170 */
{ 5, 0, printargs, "SYS_171" }, /* 171 */
{ 5, 0, printargs, "SYS_172" }, /* 172 */
{ 5, 0, printargs, "SYS_173" }, /* 173 */
{ 5, 0, printargs, "SYS_174" }, /* 174 */
{ 5, 0, printargs, "SYS_175" }, /* 175 */
{ 5, 0, printargs, "SYS_176" }, /* 176 */
{ 5, 0, printargs, "SYS_177" }, /* 177 */
{ 5, 0, printargs, "SYS_178" }, /* 178 */
{ 5, 0, printargs, "SYS_179" }, /* 179 */
{ 5, 0, printargs, "SYS_180" }, /* 180 */
{ 5, 0, printargs, "SYS_181" }, /* 181 */
{ 5, 0, printargs, "SYS_182" }, /* 182 */
{ 5, 0, printargs, "SYS_183" }, /* 183 */
{ 5, 0, printargs, "SYS_184" }, /* 184 */
{ 5, 0, printargs, "SYS_185" }, /* 185 */
{ 5, 0, printargs, "SYS_186" }, /* 186 */
{ 5, 0, printargs, "SYS_187" }, /* 187 */
{ 5, 0, printargs, "SYS_188" }, /* 188 */
{ 5, 0, printargs, "SYS_189" }, /* 189 */
{ 5, 0, printargs, "SYS_190" }, /* 190 */
{ 5, 0, printargs, "SYS_191" }, /* 191 */
{ 5, 0, printargs, "SYS_192" }, /* 192 */
{ 5, 0, printargs, "SYS_193" }, /* 193 */
{ 5, 0, printargs, "SYS_194" }, /* 194 */
{ 5, 0, printargs, "SYS_195" }, /* 195 */
{ 5, 0, printargs, "SYS_196" }, /* 196 */
{ 5, 0, printargs, "SYS_197" }, /* 197 */
{ 5, 0, printargs, "SYS_198" }, /* 198 */
{ 4, 0, printargs, "osf_swapon" }, /* 199 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 200 */
{ 4, TI, sys_msgget, "msgget" }, /* 201 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 202 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 203 */
{ 4, TI, sys_semctl, "semctl" }, /* 204 */
{ 4, TI, sys_semget, "semget" }, /* 205 */
{ 4, TI, printargs, "semop" }, /* 206 */
{ 1, 0, printargs, "osf_utsname" }, /* 207 */
{ 5, 0, printargs, "SYS_208" }, /* 208 */
{ 3, TI, printargs, "osf_shmat" }, /* 209 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 210 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 211 */
{ 4, TI, sys_shmget, "shmget" }, /* 212 */
{ 5, 0, printargs, "SYS_213" }, /* 213 */
{ 5, 0, printargs, "SYS_214" }, /* 214 */
{ 5, 0, printargs, "SYS_215" }, /* 215 */
{ 5, 0, printargs, "SYS_216" }, /* 216 */
{ 3, 0, sys_msync, "msync" }, /* 217 */
{ 5, 0, printargs, "SYS_218" }, /* 218 */
{ 5, 0, printargs, "SYS_219" }, /* 219 */
{ 5, 0, printargs, "SYS_220" }, /* 220 */
{ 5, 0, printargs, "SYS_221" }, /* 221 */
{ 5, 0, printargs, "SYS_222" }, /* 222 */
{ 5, 0, printargs, "SYS_223" }, /* 223 */
{ 5, 0, printargs, "SYS_224" }, /* 224 */
{ 5, 0, printargs, "SYS_225" }, /* 225 */
{ 5, 0, printargs, "SYS_226" }, /* 226 */
{ 5, 0, printargs, "SYS_227" }, /* 227 */
{ 5, 0, printargs, "SYS_228" }, /* 228 */
{ 5, 0, printargs, "SYS_229" }, /* 229 */
{ 5, 0, printargs, "SYS_230" }, /* 230 */
{ 5, 0, printargs, "SYS_231" }, /* 231 */
{ 5, 0, printargs, "SYS_232" }, /* 232 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 233 */
{ 1, 0, sys_getsid, "getsid" }, /* 234 */
{ 5, 0, printargs, "SYS_235" }, /* 235 */
{ 5, 0, printargs, "SYS_236" }, /* 236 */
{ 5, 0, printargs, "SYS_237" }, /* 237 */
{ 5, 0, printargs, "SYS_238" }, /* 238 */
{ 5, 0, printargs, "SYS_239" }, /* 239 */
{ 5, 0, printargs, "SYS_240" }, /* 240 */
{ 5, 0, printargs, "SYS_241" }, /* 241 */
{ 5, 0, printargs, "SYS_242" }, /* 242 */
{ 5, 0, printargs, "SYS_243" }, /* 243 */
{ 2, 0, printargs, "osf_proplist_syscall"}, /* 244 */
{ 5, 0, printargs, "SYS_245" }, /* 245 */
{ 5, 0, printargs, "SYS_246" }, /* 246 */
{ 5, 0, printargs, "SYS_247" }, /* 247 */
{ 5, 0, printargs, "SYS_248" }, /* 248 */
{ 5, 0, printargs, "SYS_249" }, /* 249 */
{ 2, 0, printargs, "osf_usleep_thread"}, /* 250 */
{ 5, 0, printargs, "SYS_251" }, /* 251 */
{ 5, 0, printargs, "SYS_252" }, /* 252 */
{ 5, 0, printargs, "SYS_253" }, /* 253 */
{ 5, 0, sys_sysfs, "sysfs" }, /* 254 */
{ 5, 0, printargs, "SYS_255" }, /* 255 */
{ 5, 0, printargs, "osf_getsysinfo"}, /* 256 */
{ 5, 0, printargs, "osf_setsysinfo"}, /* 257 */
{ 5, 0, printargs, "SYS_258" }, /* 258 */
{ 5, 0, printargs, "SYS_259" }, /* 259 */
{ 5, 0, printargs, "SYS_260" }, /* 260 */
{ 5, 0, printargs, "SYS_261" }, /* 261 */
{ 5, 0, printargs, "SYS_262" }, /* 262 */
{ 5, 0, printargs, "SYS_263" }, /* 263 */
{ 5, 0, printargs, "SYS_264" }, /* 264 */
{ 5, 0, printargs, "SYS_265" }, /* 265 */
{ 5, 0, printargs, "SYS_266" }, /* 266 */
{ 5, 0, printargs, "SYS_267" }, /* 267 */
{ 5, 0, printargs, "SYS_268" }, /* 268 */
{ 5, 0, printargs, "SYS_269" }, /* 269 */
{ 5, 0, printargs, "SYS_270" }, /* 270 */
{ 5, 0, printargs, "SYS_271" }, /* 271 */
{ 5, 0, printargs, "SYS_272" }, /* 272 */
{ 5, 0, printargs, "SYS_273" }, /* 273 */
{ 5, 0, printargs, "SYS_274" }, /* 274 */
{ 5, 0, printargs, "SYS_275" }, /* 275 */
{ 5, 0, printargs, "SYS_276" }, /* 276 */
{ 5, 0, printargs, "SYS_277" }, /* 277 */
{ 5, 0, printargs, "SYS_278" }, /* 278 */
{ 5, 0, printargs, "SYS_279" }, /* 279 */
{ 5, 0, printargs, "SYS_280" }, /* 280 */
{ 5, 0, printargs, "SYS_281" }, /* 281 */
{ 5, 0, printargs, "SYS_282" }, /* 282 */
{ 5, 0, printargs, "SYS_283" }, /* 283 */
{ 5, 0, printargs, "SYS_284" }, /* 284 */
{ 5, 0, printargs, "SYS_285" }, /* 285 */
{ 5, 0, printargs, "SYS_286" }, /* 286 */
{ 5, 0, printargs, "SYS_287" }, /* 287 */
{ 5, 0, printargs, "SYS_288" }, /* 288 */
{ 5, 0, printargs, "SYS_289" }, /* 289 */
{ 5, 0, printargs, "SYS_290" }, /* 290 */
{ 5, 0, printargs, "SYS_291" }, /* 291 */
{ 5, 0, printargs, "SYS_292" }, /* 292 */
{ 5, 0, printargs, "SYS_293" }, /* 293 */
{ 5, 0, printargs, "SYS_294" }, /* 294 */
{ 5, 0, printargs, "SYS_295" }, /* 295 */
{ 5, 0, printargs, "SYS_296" }, /* 296 */
{ 5, 0, printargs, "SYS_297" }, /* 297 */
{ 5, 0, printargs, "SYS_298" }, /* 298 */
{ 5, 0, printargs, "SYS_299" }, /* 299 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 300 */
{ 3, 0, printargs, "sethae" }, /* 301 */
{ 5, TF, sys_mount, "mount" }, /* 302 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 303 */
{ 1, 0, sys_swapoff, "swapoff" }, /* 304 */
{ 3, 0, sys_getdents, "getdents" }, /* 305 */
{ 2, 0, sys_create_module, "create_module" }, /* 306 */
{ 4, 0, sys_init_module, "init_module" }, /* 307 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 308 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 309 */
{ 3, 0, sys_syslog, "syslog" }, /* 310 */
{ 3, 0, sys_reboot, "reboot" }, /* 311 */
{ 2, TP, sys_clone, "clone" }, /* 312 */
{ 1, 0, sys_uselib, "uselib" }, /* 313 */
{ 2, 0, sys_mlock, "mlock" }, /* 314 */
{ 2, 0, sys_munlock, "munlock" }, /* 315 */
{ 1, 0, sys_mlockall, "mlockall" }, /* 316 */
{ 1, 0, sys_munlockall, "munlockall" }, /* 317 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 318 */
{ 1, 0, sys_sysctl, "sysctl" }, /* 319 */
{ 0, 0, sys_idle, "idle" }, /* 320 */
{ 1, 0, sys_umount, "umount" }, /* 321 */
{ 1, 0, sys_swapon, "swapon" }, /* 322 */
{ 1, 0, sys_times, "times" }, /* 323 */
{ 1, 0, sys_personality, "personality" }, /* 324 */
{ 1, 0, sys_setfsuid, "setfsuid" }, /* 325 */
{ 1, 0, sys_setfsgid, "setfsgid" }, /* 326 */
{ 2, 0, sys_ustat, "ustat" }, /* 327 */
{ 2, TF, sys_statfs, "statfs" }, /* 328 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 329 */
{ 2, 0, sys_sched_setparam, "sched_setparam"}, /* 330 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 331 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 332 */
{ 2, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 333 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 334 */
{ 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 335 */
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 336 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 337 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 338 */
{ 1, 0, sys_uname, "uname" }, /* 339 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 340 */
{ 5, 0, sys_mremap, "mremap" }, /* 341 */
{ 5, 0, printargs, "SYS_342" }, /* 342 */
{ 5, 0, printargs, "SYS_343" }, /* 343 */
{ 5, 0, printargs, "SYS_344" }, /* 344 */
{ 5, 0, printargs, "SYS_345" }, /* 345 */
{ 5, 0, printargs, "SYS_346" }, /* 346 */
{ 5, 0, printargs, "SYS_347" }, /* 347 */
{ 5, 0, printargs, "SYS_348" }, /* 348 */
{ 5, 0, printargs, "SYS_349" }, /* 349 */

214
linux/dummy.h Normal file
View File

@ -0,0 +1,214 @@
/*
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
/* still unfinished */
#define sys_reboot printargs
#define sys_ioperm printargs
#define sys_syslog printargs
#define sys_iopl printargs
#define sys_vm86old printargs
#define sys_modify_ldt printargs
#define sys_init_module printargs
#define sys_get_kernel_syms printargs
#define sys_quotactl printargs
#define sys_bdflush printargs
#define sys_sysfs printargs
#define sys_afs_syscall printargs
#define sys_fdatasync printargs
#define sys_sysctl printargs
#define sys_mlock printargs
#define sys_munlock printargs
#define sys_mlockall printargs
#define sys_munlockall printargs
#define sys_sched_setparam printargs
#define sys_sched_getparam printargs
#define sys_sched_setscheduler printargs
#define sys_sched_getscheduler printargs
#define sys_sched_yield printargs
#define sys_sched_get_priority_max printargs
#define sys_sched_get_priority_min printargs
#define sys_sched_rr_get_interval printargs
#define sys_mremap printargs
/* like another call */
#define sys_uselib sys_chdir
#define sys_umount sys_chdir
#define sys_swapon sys_chdir
#define sys_swapoff sys_chdir
#define sys_clone sys_fork
#define sys_create_module sys_sethostname
#define sys_delete_module sys_chdir
#define sys_fchdir sys_close
#define sys_setfsuid sys_setuid
#define sys_setfsgid sys_setgid
#define sys_nanosleep sys_adjtime
/* printargs does the right thing */
#define sys_setup printargs
#define sys_getpid printargs
#define sys_getuid printargs
#define sys_pause printargs
#define sys_sync printargs
#define sys_getgid printargs
#define sys_geteuid printargs
#define sys_getegid printargs
#define sys_getppid printargs
#define sys_getpgrp printargs
#define sys_setsid printargs
#define sys_vhangup printargs
#define sys_idle printargs
#define sys_getpgid printargs
/* subcall entry points */
#define sys_socketcall printargs
#define sys_ipc printargs
/* unimplemented */
#define sys_stty printargs
#define sys_gtty printargs
#define sys_ftime printargs
#define sys_prof printargs
#define sys_acct printargs
#define sys_phys printargs
#define sys_lock printargs
#define sys_mpx printargs
#define sys_ulimit printargs
#define sys_profil printargs
#define sys_ustat printargs
#define sys_break printargs
/* deprecated */
#define sys_oldstat printargs
#define sys_oldlstat printargs
#define sys_oldfstat printargs
#define sys_olduname printargs
#define sys_oldolduname printargs
/* no library support */
#ifndef HAVE_SENDMSG
#define sys_sendmsg printargs
#define sys_recvmsg printargs
#endif
#if DONE
#define sys_oldselect printargs
#define sys_msync printargs
#define sys_flock printargs
#define sys_getdents printargs
#define sys_stime printargs
#define sys_time printargs
#define sys_times printargs
#define sys_mount printargs
#define sys_nice printargs
#define sys_mprotect printargs
#define sys_sigprocmask printargs
#define sys_adjtimex printargs
#define sys_sysinfo printargs
#define sys_ipc printargs
#define sys_setdomainname printargs
#define sys_statfs printargs
#define sys_fstatfs printargs
#define sys_ptrace printargs
#define sys_sigreturn printargs
#define sys_fsync printargs
#define sys_alarm printargs
#define sys_socketcall printargs
#define sys_sigsuspend printargs
#define sys_utime printargs
#define sys_brk printargs
#define sys_mmap printargs
#define sys_munmap printargs
#define sys_select printargs
#define sys_setuid printargs
#define sys_setgid printargs
#define sys_setreuid printargs
#define sys_setregid printargs
#define sys_getgroups printargs
#define sys_setgroups printargs
#define sys_setrlimit printargs
#define sys_getrlimit printargs
#define sys_getrusage printargs
#define sys_getpriority printargs
#define sys_setpriority printargs
#define sys_setpgid printargs
#define sys_access printargs
#define sys_sethostname printargs
#define sys_readdir printargs
#define sys_waitpid printargs
#define sys_wait4 printargs
#define sys_execve printargs
#define sys_fork printargs
#define sys_uname printargs
#define sys_pipe printargs
#define sys_siggetmask printargs
#define sys_sigsetmask printargs
#define sys_exit printargs
#define sys_kill printargs
#define sys_signal printargs
#define sys_sigaction printargs
#define sys_sigpending printargs
#define sys_fcntl printargs
#define sys_dup printargs
#define sys_dup2 printargs
#define sys_close printargs
#define sys_ioctl printargs
#define sys_read printargs
#define sys_write printargs
#define sys_open printargs
#define sys_creat printargs
#define sys_link printargs
#define sys_unlink printargs
#define sys_chdir printargs
#define sys_mknod printargs
#define sys_chmod printargs
#define sys_chown printargs
#define sys_lseek printargs
#define sys_rename printargs
#define sys_mkdir printargs
#define sys_rmdir printargs
#define sys_umask printargs
#define sys_chroot printargs
#define sys_gettimeofday printargs
#define sys_settimeofday printargs
#define sys_symlink printargs
#define sys_readlink printargs
#define sys_truncate printargs
#define sys_ftruncate printargs
#define sys_fchmod printargs
#define sys_fchown printargs
#define sys_setitimer printargs
#define sys_getitimer printargs
#define sys_stat printargs
#define sys_lstat printargs
#define sys_fstat printargs
#define sys_personality printargs
#define sys_poll printargs
#endif

516
linux/errnoent.h Normal file
View File

@ -0,0 +1,516 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EAGAIN", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"EDEADLK", /* 35 */
"ENAMETOOLONG", /* 36 */
"ENOLCK", /* 37 */
"ENOSYS", /* 38 */
"ENOTEMPTY", /* 39 */
"ELOOP", /* 40 */
"ERRNO_41", /* 41 */
"ENOMSG", /* 42 */
"EIDRM", /* 43 */
"ECHRNG", /* 44 */
"EL2NSYNC", /* 45 */
"EL3HLT", /* 46 */
"EL3RST", /* 47 */
"ELNRNG", /* 48 */
"EUNATCH", /* 49 */
"ENOCSI", /* 50 */
"EL2HLT", /* 51 */
"EBADE", /* 52 */
"EBADR", /* 53 */
"EXFULL", /* 54 */
"ENOANO", /* 55 */
"EBADRQC", /* 56 */
"EBADSLT", /* 57 */
"EDEADLOCK", /* 58 */
"EBFONT", /* 59 */
"ENOSTR", /* 60 */
"ENODATA", /* 61 */
"ETIME", /* 62 */
"ENOSR", /* 63 */
"ENONET", /* 64 */
"ENOPKG", /* 65 */
"EREMOTE", /* 66 */
"ENOLINK", /* 67 */
"EADV", /* 68 */
"ESRMNT", /* 69 */
"ECOMM", /* 70 */
"EPROTO", /* 71 */
"EMULTIHOP", /* 72 */
"EDOTDOT", /* 73 */
"EBADMSG", /* 74 */
"EOVERFLOW", /* 75 */
"ENOTUNIQ", /* 76 */
"EBADFD", /* 77 */
"EREMCHG", /* 78 */
"ELIBACC", /* 79 */
"ELIBBAD", /* 80 */
"ELIBSCN", /* 81 */
"ELIBMAX", /* 82 */
"ELIBEXEC", /* 83 */
"EILSEQ", /* 84 */
"ERESTART", /* 85 */
"ESTRPIPE", /* 86 */
"EUSERS", /* 87 */
"ENOTSOCK", /* 88 */
"EDESTADDRREQ", /* 89 */
"EMSGSIZE", /* 90 */
"EPROTOTYPE", /* 91 */
"ENOPROTOOPT", /* 92 */
"EPROTONOSUPPORT", /* 93 */
"ESOCKTNOSUPPORT", /* 94 */
"EOPNOTSUPP", /* 95 */
"EPFNOSUPPORT", /* 96 */
"EAFNOSUPPORT", /* 97 */
"EADDRINUSE", /* 98 */
"EADDRNOTAVAIL", /* 99 */
"ENETDOWN", /* 100 */
"ENETUNREACH", /* 101 */
"ENETRESET", /* 102 */
"ECONNABORTED", /* 103 */
"ECONNRESET", /* 104 */
"ENOBUFS", /* 105 */
"EISCONN", /* 106 */
"ENOTCONN", /* 107 */
"ESHUTDOWN", /* 108 */
"ETOOMANYREFS", /* 109 */
"ETIMEDOUT", /* 110 */
"ECONNREFUSED", /* 111 */
"EHOSTDOWN", /* 112 */
"EHOSTUNREACH", /* 113 */
"EALREADY", /* 114 */
"EINPROGRESS", /* 115 */
"ESTALE", /* 116 */
"EUCLEAN", /* 117 */
"ENOTNAM", /* 118 */
"ENAVAIL", /* 119 */
"EISNAM", /* 120 */
"EREMOTEIO", /* 121 */
"EDQUOT", /* 122 */
"ERRNO_123", /* 123 */
"ERRNO_124", /* 124 */
"ERRNO_125", /* 125 */
"ERRNO_126", /* 126 */
"ERRNO_127", /* 127 */
"ERRNO_128", /* 128 */
"ERRNO_129", /* 129 */
"ERRNO_130", /* 130 */
"ERRNO_131", /* 131 */
"ERRNO_132", /* 132 */
"ERRNO_133", /* 133 */
"ERRNO_134", /* 134 */
"ERRNO_135", /* 135 */
"ERRNO_136", /* 136 */
"ERRNO_137", /* 137 */
"ERRNO_138", /* 138 */
"ERRNO_139", /* 139 */
"ERRNO_140", /* 140 */
"ERRNO_141", /* 141 */
"ERRNO_142", /* 142 */
"ERRNO_143", /* 143 */
"ERRNO_144", /* 144 */
"ERRNO_145", /* 145 */
"ERRNO_146", /* 146 */
"ERRNO_147", /* 147 */
"ERRNO_148", /* 148 */
"ERRNO_149", /* 149 */
"ERRNO_150", /* 150 */
"ERRNO_151", /* 151 */
"ERRNO_152", /* 152 */
"ERRNO_153", /* 153 */
"ERRNO_154", /* 154 */
"ERRNO_155", /* 155 */
"ERRNO_156", /* 156 */
"ERRNO_157", /* 157 */
"ERRNO_158", /* 158 */
"ERRNO_159", /* 159 */
"ERRNO_160", /* 160 */
"ERRNO_161", /* 161 */
"ERRNO_162", /* 162 */
"ERRNO_163", /* 163 */
"ERRNO_164", /* 164 */
"ERRNO_165", /* 165 */
"ERRNO_166", /* 166 */
"ERRNO_167", /* 167 */
"ERRNO_168", /* 168 */
"ERRNO_169", /* 169 */
"ERRNO_170", /* 170 */
"ERRNO_171", /* 171 */
"ERRNO_172", /* 172 */
"ERRNO_173", /* 173 */
"ERRNO_174", /* 174 */
"ERRNO_175", /* 175 */
"ERRNO_176", /* 176 */
"ERRNO_177", /* 177 */
"ERRNO_178", /* 178 */
"ERRNO_179", /* 179 */
"ERRNO_180", /* 180 */
"ERRNO_181", /* 181 */
"ERRNO_182", /* 182 */
"ERRNO_183", /* 183 */
"ERRNO_184", /* 184 */
"ERRNO_185", /* 185 */
"ERRNO_186", /* 186 */
"ERRNO_187", /* 187 */
"ERRNO_188", /* 188 */
"ERRNO_189", /* 189 */
"ERRNO_190", /* 190 */
"ERRNO_191", /* 191 */
"ERRNO_192", /* 192 */
"ERRNO_193", /* 193 */
"ERRNO_194", /* 194 */
"ERRNO_195", /* 195 */
"ERRNO_196", /* 196 */
"ERRNO_197", /* 197 */
"ERRNO_198", /* 198 */
"ERRNO_199", /* 199 */
"ERRNO_200", /* 200 */
"ERRNO_201", /* 201 */
"ERRNO_202", /* 202 */
"ERRNO_203", /* 203 */
"ERRNO_204", /* 204 */
"ERRNO_205", /* 205 */
"ERRNO_206", /* 206 */
"ERRNO_207", /* 207 */
"ERRNO_208", /* 208 */
"ERRNO_209", /* 209 */
"ERRNO_210", /* 210 */
"ERRNO_211", /* 211 */
"ERRNO_212", /* 212 */
"ERRNO_213", /* 213 */
"ERRNO_214", /* 214 */
"ERRNO_215", /* 215 */
"ERRNO_216", /* 216 */
"ERRNO_217", /* 217 */
"ERRNO_218", /* 218 */
"ERRNO_219", /* 219 */
"ERRNO_220", /* 220 */
"ERRNO_221", /* 221 */
"ERRNO_222", /* 222 */
"ERRNO_223", /* 223 */
"ERRNO_224", /* 224 */
"ERRNO_225", /* 225 */
"ERRNO_226", /* 226 */
"ERRNO_227", /* 227 */
"ERRNO_228", /* 228 */
"ERRNO_229", /* 229 */
"ERRNO_230", /* 230 */
"ERRNO_231", /* 231 */
"ERRNO_232", /* 232 */
"ERRNO_233", /* 233 */
"ERRNO_234", /* 234 */
"ERRNO_235", /* 235 */
"ERRNO_236", /* 236 */
"ERRNO_237", /* 237 */
"ERRNO_238", /* 238 */
"ERRNO_239", /* 239 */
"ERRNO_240", /* 240 */
"ERRNO_241", /* 241 */
"ERRNO_242", /* 242 */
"ERRNO_243", /* 243 */
"ERRNO_244", /* 244 */
"ERRNO_245", /* 245 */
"ERRNO_246", /* 246 */
"ERRNO_247", /* 247 */
"ERRNO_248", /* 248 */
"ERRNO_249", /* 249 */
"ERRNO_250", /* 250 */
"ERRNO_251", /* 251 */
"ERRNO_252", /* 252 */
"ERRNO_253", /* 253 */
"ERRNO_254", /* 254 */
"ERRNO_255", /* 255 */
"ERRNO_256", /* 256 */
"ERRNO_257", /* 257 */
"ERRNO_258", /* 258 */
"ERRNO_259", /* 259 */
"ERRNO_260", /* 260 */
"ERRNO_261", /* 261 */
"ERRNO_262", /* 262 */
"ERRNO_263", /* 263 */
"ERRNO_264", /* 264 */
"ERRNO_265", /* 265 */
"ERRNO_266", /* 266 */
"ERRNO_267", /* 267 */
"ERRNO_268", /* 268 */
"ERRNO_269", /* 269 */
"ERRNO_270", /* 270 */
"ERRNO_271", /* 271 */
"ERRNO_272", /* 272 */
"ERRNO_273", /* 273 */
"ERRNO_274", /* 274 */
"ERRNO_275", /* 275 */
"ERRNO_276", /* 276 */
"ERRNO_277", /* 277 */
"ERRNO_278", /* 278 */
"ERRNO_279", /* 279 */
"ERRNO_280", /* 280 */
"ERRNO_281", /* 281 */
"ERRNO_282", /* 282 */
"ERRNO_283", /* 283 */
"ERRNO_284", /* 284 */
"ERRNO_285", /* 285 */
"ERRNO_286", /* 286 */
"ERRNO_287", /* 287 */
"ERRNO_288", /* 288 */
"ERRNO_289", /* 289 */
"ERRNO_290", /* 290 */
"ERRNO_291", /* 291 */
"ERRNO_292", /* 292 */
"ERRNO_293", /* 293 */
"ERRNO_294", /* 294 */
"ERRNO_295", /* 295 */
"ERRNO_296", /* 296 */
"ERRNO_297", /* 297 */
"ERRNO_298", /* 298 */
"ERRNO_299", /* 299 */
"ERRNO_300", /* 300 */
"ERRNO_301", /* 301 */
"ERRNO_302", /* 302 */
"ERRNO_303", /* 303 */
"ERRNO_304", /* 304 */
"ERRNO_305", /* 305 */
"ERRNO_306", /* 306 */
"ERRNO_307", /* 307 */
"ERRNO_308", /* 308 */
"ERRNO_309", /* 309 */
"ERRNO_310", /* 310 */
"ERRNO_311", /* 311 */
"ERRNO_312", /* 312 */
"ERRNO_313", /* 313 */
"ERRNO_314", /* 314 */
"ERRNO_315", /* 315 */
"ERRNO_316", /* 316 */
"ERRNO_317", /* 317 */
"ERRNO_318", /* 318 */
"ERRNO_319", /* 319 */
"ERRNO_320", /* 320 */
"ERRNO_321", /* 321 */
"ERRNO_322", /* 322 */
"ERRNO_323", /* 323 */
"ERRNO_324", /* 324 */
"ERRNO_325", /* 325 */
"ERRNO_326", /* 326 */
"ERRNO_327", /* 327 */
"ERRNO_328", /* 328 */
"ERRNO_329", /* 329 */
"ERRNO_330", /* 330 */
"ERRNO_331", /* 331 */
"ERRNO_332", /* 332 */
"ERRNO_333", /* 333 */
"ERRNO_334", /* 334 */
"ERRNO_335", /* 335 */
"ERRNO_336", /* 336 */
"ERRNO_337", /* 337 */
"ERRNO_338", /* 338 */
"ERRNO_339", /* 339 */
"ERRNO_340", /* 340 */
"ERRNO_341", /* 341 */
"ERRNO_342", /* 342 */
"ERRNO_343", /* 343 */
"ERRNO_344", /* 344 */
"ERRNO_345", /* 345 */
"ERRNO_346", /* 346 */
"ERRNO_347", /* 347 */
"ERRNO_348", /* 348 */
"ERRNO_349", /* 349 */
"ERRNO_350", /* 350 */
"ERRNO_351", /* 351 */
"ERRNO_352", /* 352 */
"ERRNO_353", /* 353 */
"ERRNO_354", /* 354 */
"ERRNO_355", /* 355 */
"ERRNO_356", /* 356 */
"ERRNO_357", /* 357 */
"ERRNO_358", /* 358 */
"ERRNO_359", /* 359 */
"ERRNO_360", /* 360 */
"ERRNO_361", /* 361 */
"ERRNO_362", /* 362 */
"ERRNO_363", /* 363 */
"ERRNO_364", /* 364 */
"ERRNO_365", /* 365 */
"ERRNO_366", /* 366 */
"ERRNO_367", /* 367 */
"ERRNO_368", /* 368 */
"ERRNO_369", /* 369 */
"ERRNO_370", /* 370 */
"ERRNO_371", /* 371 */
"ERRNO_372", /* 372 */
"ERRNO_373", /* 373 */
"ERRNO_374", /* 374 */
"ERRNO_375", /* 375 */
"ERRNO_376", /* 376 */
"ERRNO_377", /* 377 */
"ERRNO_378", /* 378 */
"ERRNO_379", /* 379 */
"ERRNO_380", /* 380 */
"ERRNO_381", /* 381 */
"ERRNO_382", /* 382 */
"ERRNO_383", /* 383 */
"ERRNO_384", /* 384 */
"ERRNO_385", /* 385 */
"ERRNO_386", /* 386 */
"ERRNO_387", /* 387 */
"ERRNO_388", /* 388 */
"ERRNO_389", /* 389 */
"ERRNO_390", /* 390 */
"ERRNO_391", /* 391 */
"ERRNO_392", /* 392 */
"ERRNO_393", /* 393 */
"ERRNO_394", /* 394 */
"ERRNO_395", /* 395 */
"ERRNO_396", /* 396 */
"ERRNO_397", /* 397 */
"ERRNO_398", /* 398 */
"ERRNO_399", /* 399 */
"ERRNO_400", /* 400 */
"ERRNO_401", /* 401 */
"ERRNO_402", /* 402 */
"ERRNO_403", /* 403 */
"ERRNO_404", /* 404 */
"ERRNO_405", /* 405 */
"ERRNO_406", /* 406 */
"ERRNO_407", /* 407 */
"ERRNO_408", /* 408 */
"ERRNO_409", /* 409 */
"ERRNO_410", /* 410 */
"ERRNO_411", /* 411 */
"ERRNO_412", /* 412 */
"ERRNO_413", /* 413 */
"ERRNO_414", /* 414 */
"ERRNO_415", /* 415 */
"ERRNO_416", /* 416 */
"ERRNO_417", /* 417 */
"ERRNO_418", /* 418 */
"ERRNO_419", /* 419 */
"ERRNO_420", /* 420 */
"ERRNO_421", /* 421 */
"ERRNO_422", /* 422 */
"ERRNO_423", /* 423 */
"ERRNO_424", /* 424 */
"ERRNO_425", /* 425 */
"ERRNO_426", /* 426 */
"ERRNO_427", /* 427 */
"ERRNO_428", /* 428 */
"ERRNO_429", /* 429 */
"ERRNO_430", /* 430 */
"ERRNO_431", /* 431 */
"ERRNO_432", /* 432 */
"ERRNO_433", /* 433 */
"ERRNO_434", /* 434 */
"ERRNO_435", /* 435 */
"ERRNO_436", /* 436 */
"ERRNO_437", /* 437 */
"ERRNO_438", /* 438 */
"ERRNO_439", /* 439 */
"ERRNO_440", /* 440 */
"ERRNO_441", /* 441 */
"ERRNO_442", /* 442 */
"ERRNO_443", /* 443 */
"ERRNO_444", /* 444 */
"ERRNO_445", /* 445 */
"ERRNO_446", /* 446 */
"ERRNO_447", /* 447 */
"ERRNO_448", /* 448 */
"ERRNO_449", /* 449 */
"ERRNO_450", /* 450 */
"ERRNO_451", /* 451 */
"ERRNO_452", /* 452 */
"ERRNO_453", /* 453 */
"ERRNO_454", /* 454 */
"ERRNO_455", /* 455 */
"ERRNO_456", /* 456 */
"ERRNO_457", /* 457 */
"ERRNO_458", /* 458 */
"ERRNO_459", /* 459 */
"ERRNO_460", /* 460 */
"ERRNO_461", /* 461 */
"ERRNO_462", /* 462 */
"ERRNO_463", /* 463 */
"ERRNO_464", /* 464 */
"ERRNO_465", /* 465 */
"ERRNO_466", /* 466 */
"ERRNO_467", /* 467 */
"ERRNO_468", /* 468 */
"ERRNO_469", /* 469 */
"ERRNO_470", /* 470 */
"ERRNO_471", /* 471 */
"ERRNO_472", /* 472 */
"ERRNO_473", /* 473 */
"ERRNO_474", /* 474 */
"ERRNO_475", /* 475 */
"ERRNO_476", /* 476 */
"ERRNO_477", /* 477 */
"ERRNO_478", /* 478 */
"ERRNO_479", /* 479 */
"ERRNO_480", /* 480 */
"ERRNO_481", /* 481 */
"ERRNO_482", /* 482 */
"ERRNO_483", /* 483 */
"ERRNO_484", /* 484 */
"ERRNO_485", /* 485 */
"ERRNO_486", /* 486 */
"ERRNO_487", /* 487 */
"ERRNO_488", /* 488 */
"ERRNO_489", /* 489 */
"ERRNO_490", /* 490 */
"ERRNO_491", /* 491 */
"ERRNO_492", /* 492 */
"ERRNO_493", /* 493 */
"ERRNO_494", /* 494 */
"ERRNO_495", /* 495 */
"ERRNO_496", /* 496 */
"ERRNO_497", /* 497 */
"ERRNO_498", /* 498 */
"ERRNO_499", /* 499 */
"ERRNO_500", /* 500 */
"ERRNO_501", /* 501 */
"ERRNO_502", /* 502 */
"ERRNO_503", /* 503 */
"ERRNO_504", /* 504 */
"ERRNO_505", /* 505 */
"ERRNO_506", /* 506 */
"ERRNO_507", /* 507 */
"ERRNO_508", /* 508 */
"ERRNO_509", /* 509 */
"ERRNO_510", /* 510 */
"ERRNO_511", /* 511 */
"ERESTARTSYS", /* 512 */
"ERESTARTNOINTR", /* 513 */
"ERESTARTNOHAND", /* 514 */
"ENOIOCTLCMD", /* 515 */

519
linux/ioctlent.h Normal file
View File

@ -0,0 +1,519 @@
{"linux/fs.h", "FIBMAP", 0x1},
{"linux/fs.h", "FIGETBSZ", 0x2},
{"linux/fd.h", "FDCLRPRM", 0x241},
{"linux/fd.h", "FDMSGON", 0x245},
{"linux/fd.h", "FDMSGOFF", 0x246},
{"linux/fd.h", "FDFMTBEG", 0x247},
{"linux/fd.h", "FDFMTEND", 0x249},
{"linux/fd.h", "FDSETEMSGTRESH", 0x24a},
{"linux/fd.h", "FDFLUSH", 0x24b},
{"linux/fd.h", "FDRESET", 0x254},
{"linux/fd.h", "FDWERRORCLR", 0x256},
{"linux/fd.h", "FDRAWCMD", 0x258},
{"linux/fd.h", "FDTWADDLE", 0x259},
{"linux/fd.h", "FDEJECT", 0x25a},
{"linux/ip_fw.h", "IP_FW_TYPE", 0x300},
{"linux/quota.h", "Q_GETQUOTA", 0x300},
{"linux/hdreg.h", "HDIO_GETGEO", 0x301},
{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302},
{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304},
{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x307},
{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308},
{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309},
{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a},
{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b},
{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f},
{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321},
{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322},
{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323},
{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324},
{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325},
{"linux/hdreg.h", "HDIO_SET_DMA", 0x326},
{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_DOS", 0x4d2},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_DOS", 0x4d3},
{"linux/umsdos_fs.h", "UMSDOS_RMDIR_DOS", 0x4d4},
{"linux/umsdos_fs.h", "UMSDOS_STAT_DOS", 0x4d5},
{"linux/umsdos_fs.h", "UMSDOS_CREAT_EMD", 0x4d6},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_EMD", 0x4d7},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_EMD", 0x4d8},
{"linux/umsdos_fs.h", "UMSDOS_GETVERSION", 0x4d9},
{"linux/umsdos_fs.h", "UMSDOS_INIT_EMD", 0x4da},
{"linux/umsdos_fs.h", "UMSDOS_DOS_SETUP", 0x4db},
{"linux/umsdos_fs.h", "UMSDOS_RENAME_DOS", 0x4dc},
{"linux/quota.h", "Q_SYNC", 0x600},
{"linux/lp.h", "LPCHAR", 0x601},
{"linux/lp_m68k.h", "LPCHAR", 0x601},
{"linux/lp.h", "LPTIME", 0x602},
{"linux/lp_m68k.h", "LPTIME", 0x602},
{"linux/lp.h", "LPABORT", 0x604},
{"linux/lp_m68k.h", "LPABORT", 0x604},
{"linux/lp.h", "LPSETIRQ", 0x605},
{"linux/lp_m68k.h", "LPSETIRQ", 0x605},
{"linux/lp.h", "LPGETIRQ", 0x606},
{"linux/lp_m68k.h", "LPGETIRQ", 0x606},
{"linux/lp.h", "LPWAIT", 0x608},
{"linux/lp_m68k.h", "LPWAIT", 0x608},
{"linux/lp.h", "LPCAREFUL", 0x609},
{"linux/lp_m68k.h", "LPCAREFUL", 0x609},
{"linux/lp.h", "LPABORTOPEN", 0x60a},
{"linux/lp_m68k.h", "LPABORTOPEN", 0x60a},
{"linux/lp.h", "LPGETSTATUS", 0x60b},
{"linux/lp_m68k.h", "LPGETSTATUS", 0x60b},
{"linux/lp.h", "LPRESET", 0x60c},
{"linux/lp_m68k.h", "LPRESET", 0x60c},
{"linux/lp.h", "LPGETSTATS", 0x60d},
{"linux/lp.h", "LPGETFLAGS", 0x60e},
{"linux/md.h", "REGISTER_DEV", 0x901},
{"linux/md.h", "START_MD", 0x902},
{"linux/md.h", "STOP_MD", 0x903},
{"linux/md.h", "MD_INVALID", 0x904},
{"linux/md.h", "MD_VALID", 0x905},
{"linux/fs.h", "BLKROSET", 0x125d},
{"linux/fs.h", "BLKROGET", 0x125e},
{"linux/fs.h", "BLKRRPART", 0x125f},
{"linux/fs.h", "BLKGETSIZE", 0x1260},
{"linux/fs.h", "BLKFLSBUF", 0x1261},
{"linux/fs.h", "BLKRASET", 0x1262},
{"linux/fs.h", "BLKRAGET", 0x1263},
{"linux/scc.h", "TIOCSCCCFG", 0x2200},
{"linux/scc.h", "TIOCSCCINI", 0x2201},
{"linux/scc.h", "TIOCCHANINI", 0x2202},
{"linux/scc.h", "TIOCCHANMEM", 0x2210},
{"linux/scc.h", "TIOCGKISS", 0x2282},
{"linux/scc.h", "TIOCSKISS", 0x2283},
{"linux/scc.h", "TIOCSCCSTAT", 0x2284},
{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101},
{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102},
{"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x4300},
{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
{"linux/fb.h", "FBIOGETCMAP", 0x4604},
{"linux/fb.h", "FBIOPUTCMAP", 0x4605},
{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
{"linux/fb.h", "FBIOGET_FCURSORINFO", 0x4607},
{"linux/fb.h", "FBIOGET_VCURSORINFO", 0x4608},
{"linux/fb.h", "FBIOPUT_VCURSORINFO", 0x4609},
{"linux/fb.h", "FBIOGET_CURSORSTATE", 0x460a},
{"linux/fb.h", "FBIOPUT_CURSORSTATE", 0x460b},
{"linux/fb.h", "FBCMD_DRAWLINE", 0x4621},
{"linux/fb.h", "FBCMD_MOVE", 0x4622},
{"linux/isdn.h", "IIOCNETAIF", 0x4901},
{"linux/isdn.h", "IIOCNETDIF", 0x4902},
{"linux/isdn.h", "IIOCNETSCF", 0x4903},
{"linux/isdn.h", "IIOCNETGCF", 0x4904},
{"linux/isdn.h", "IIOCNETANM", 0x4905},
{"linux/isdn.h", "IIOCNETDNM", 0x4906},
{"linux/isdn.h", "IIOCNETGNM", 0x4907},
{"linux/isdn.h", "IIOCGETSET", 0x4908},
{"linux/isdn.h", "IIOCSETSET", 0x4909},
{"linux/isdn.h", "IIOCSETVER", 0x490a},
{"linux/isdn.h", "IIOCNETHUP", 0x490b},
{"linux/isdn.h", "IIOCSETGST", 0x490c},
{"linux/isdn.h", "IIOCSETBRJ", 0x490d},
{"linux/isdn.h", "IIOCSIGPRF", 0x490e},
{"linux/isdn.h", "IIOCGETPRF", 0x490f},
{"linux/isdn.h", "IIOCSETPRF", 0x4910},
{"linux/isdn.h", "IIOCGETMAP", 0x4911},
{"linux/isdn.h", "IIOCSETMAP", 0x4912},
{"linux/isdn.h", "IIOCNETASL", 0x4913},
{"linux/isdn.h", "IIOCNETDIL", 0x4914},
{"linux/isdn.h", "IIOCGETCPS", 0x4915},
{"linux/isdn.h", "IIOCNETALN", 0x4920},
{"linux/isdn.h", "IIOCNETDLN", 0x4921},
{"linux/isdn.h", "IIOCDBGVAR", 0x497f},
{"linux/isdn.h", "IIOCDRVCTL", 0x4980},
{"linux/kd.h", "KIOCSOUND", 0x4b2f},
{"linux/kd.h", "KDMKTONE", 0x4b30},
{"linux/kd.h", "KDGETLED", 0x4b31},
{"linux/kd.h", "KDSETLED", 0x4b32},
{"linux/kd.h", "KDGKBTYPE", 0x4b33},
{"linux/kd.h", "KDADDIO", 0x4b34},
{"linux/kd.h", "KDDELIO", 0x4b35},
{"linux/kd.h", "KDENABIO", 0x4b36},
{"linux/kd.h", "KDDISABIO", 0x4b37},
{"linux/kd.h", "KDSETMODE", 0x4b3a},
{"linux/kd.h", "KDGETMODE", 0x4b3b},
{"linux/kd.h", "KDMAPDISP", 0x4b3c},
{"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
{"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
{"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
{"linux/kd.h", "KDGKBMODE", 0x4b44},
{"linux/kd.h", "KDSKBMODE", 0x4b45},
{"linux/kd.h", "KDGKBENT", 0x4b46},
{"linux/kd.h", "KDSKBENT", 0x4b47},
{"linux/kd.h", "KDGKBSENT", 0x4b48},
{"linux/kd.h", "KDSKBSENT", 0x4b49},
{"linux/kd.h", "KDGKBDIACR", 0x4b4a},
{"linux/kd.h", "KDSKBDIACR", 0x4b4b},
{"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
{"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
{"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
{"linux/kd.h", "GIO_FONT", 0x4b60},
{"linux/kd.h", "PIO_FONT", 0x4b61},
{"linux/kd.h", "KDGKBMETA", 0x4b62},
{"linux/kd.h", "KDSKBMETA", 0x4b63},
{"linux/kd.h", "KDGKBLED", 0x4b64},
{"linux/kd.h", "KDSKBLED", 0x4b65},
{"linux/kd.h", "GIO_UNIMAP", 0x4b66},
{"linux/kd.h", "PIO_UNIMAP", 0x4b67},
{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
{"linux/kd.h", "GIO_FONTX", 0x4b6b},
{"linux/kd.h", "PIO_FONTX", 0x4b6c},
{"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
{"linux/kd.h", "GIO_CMAP", 0x4b70},
{"linux/kd.h", "PIO_CMAP", 0x4b71},
{"linux/loop.h", "LOOP_SET_FD", 0x4c00},
{"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
{"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x5000},
{"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x5001},
{"linux/soundcard.h", "SNDCTL_DSP_POST", 0x5008},
{"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x500e},
{"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x5015},
{"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x5016},
{"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x5100},
{"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x5101},
{"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x5111},
{"linux/random.h", "RNDZAPENTCNT", 0x5204},
{"linux/random.h", "RNDCLEARPOOL", 0x5206},
{"linux/cdrom.h", "CDROMPAUSE", 0x5301},
{"linux/cdrom.h", "CDROMRESUME", 0x5302},
{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
{"linux/cdrom.h", "CDROMSTOP", 0x5307},
{"linux/cdrom.h", "CDROMSTART", 0x5308},
{"linux/cdrom.h", "CDROMEJECT", 0x5309},
{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
{"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
{"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
{"linux/cdrom.h", "CDROM_GET_UPC", 0x5311},
{"linux/cm206.h", "CDROM_GET_UPC", 0x5311},
{"linux/cdrom.h", "CDROMRESET", 0x5312},
{"linux/cm206.h", "CDROMRESET", 0x5312},
{"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
{"linux/cdrom.h", "CDROMREADRAW", 0x5314},
{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
{"linux/cdrom.h", "CDROMSEEK", 0x5316},
{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
{"linux/cdrom.h", "CDROMREADALL", 0x5318},
{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
{"linux/cdrom.h", "CDROMLOADFROMSLOT", 0x531a},
{"linux/ucdrom.h", "CDROM_SET_OPTIONS", 0x5320},
{"linux/ucdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
{"linux/ucdrom.h", "CDROM_SELECT_SPEED", 0x5322},
{"linux/ucdrom.h", "CDROM_SELECT_DISC", 0x5323},
{"linux/ucdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
{"linux/ucdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
{"linux/ucdrom.h", "CDROM_DISC_STATUS", 0x5327},
{"linux/sbpcd.h", "CDROMAUDIOBUFSIZ", 0x5382},
{"asm/ioctls.h", "TCGETS", 0x5401},
{"asm/ioctls.h", "TCSETS", 0x5402},
{"linux/soundcard.h", "SNDCTL_TMR_START", 0x5402},
{"asm/ioctls.h", "TCSETSW", 0x5403},
{"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x5403},
{"asm/ioctls.h", "TCSETSF", 0x5404},
{"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x5404},
{"asm/ioctls.h", "TCGETA", 0x5405},
{"asm/ioctls.h", "TCSETA", 0x5406},
{"asm/ioctls.h", "TCSETAW", 0x5407},
{"asm/ioctls.h", "TCSETAF", 0x5408},
{"asm/ioctls.h", "TCSBRK", 0x5409},
{"asm/ioctls.h", "TCXONC", 0x540a},
{"asm/ioctls.h", "TCFLSH", 0x540b},
{"asm/ioctls.h", "TIOCEXCL", 0x540c},
{"asm/ioctls.h", "TIOCNXCL", 0x540d},
{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm/ioctls.h", "TIOCGPGRP", 0x540f},
{"asm/ioctls.h", "TIOCSPGRP", 0x5410},
{"asm/ioctls.h", "TIOCOUTQ", 0x5411},
{"asm/ioctls.h", "TIOCSTI", 0x5412},
{"asm/ioctls.h", "TIOCGWINSZ", 0x5413},
{"asm/ioctls.h", "TIOCSWINSZ", 0x5414},
{"asm/ioctls.h", "TIOCMGET", 0x5415},
{"asm/ioctls.h", "TIOCMBIS", 0x5416},
{"asm/ioctls.h", "TIOCMBIC", 0x5417},
{"asm/ioctls.h", "TIOCMSET", 0x5418},
{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm/ioctls.h", "FIONREAD", 0x541b},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
{"asm/ioctls.h", "TIOCCONS", 0x541d},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm/ioctls.h", "TIOCPKT", 0x5420},
{"asm/ioctls.h", "FIONBIO", 0x5421},
{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm/ioctls.h", "TIOCSETD", 0x5423},
{"asm/ioctls.h", "TIOCGETD", 0x5424},
{"asm/ioctls.h", "TCSBRKP", 0x5425},
{"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
{"asm/ioctls.h", "FIONCLEX", 0x5450},
{"asm/ioctls.h", "FIOCLEX", 0x5451},
{"asm/ioctls.h", "FIOASYNC", 0x5452},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
{"linux/vt.h", "VT_OPENQRY", 0x5600},
{"linux/vt.h", "VT_GETMODE", 0x5601},
{"linux/vt.h", "VT_SETMODE", 0x5602},
{"linux/vt.h", "VT_GETSTATE", 0x5603},
{"linux/vt.h", "VT_SENDSIG", 0x5604},
{"linux/vt.h", "VT_RELDISP", 0x5605},
{"linux/vt.h", "VT_ACTIVATE", 0x5606},
{"linux/vt.h", "VT_WAITACTIVE", 0x5607},
{"linux/vt.h", "VT_DISALLOCATE", 0x5608},
{"linux/vt.h", "VT_RESIZE", 0x5609},
{"linux/vt.h", "VT_RESIZEX", 0x560a},
{"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
{"linux/comstats.h", "COM_GETPORTSTATS", 0x631e},
{"linux/comstats.h", "COM_CLRPORTSTATS", 0x631f},
{"linux/comstats.h", "COM_GETBRDSTATS", 0x6320},
{"linux/comstats.h", "COM_READPORT", 0x6328},
{"linux/comstats.h", "COM_READBOARD", 0x6329},
{"linux/comstats.h", "COM_READPANEL", 0x632a},
{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03},
{"linux/cdk.h", "STL_BINTR", 0x7314},
{"linux/cdk.h", "STL_BSTART", 0x7315},
{"linux/cdk.h", "STL_BSTOP", 0x7316},
{"linux/cdk.h", "STL_BRESET", 0x7317},
{"linux/cdk.h", "STL_GETPFLAG", 0x7350},
{"linux/cdk.h", "STL_SETPFLAG", 0x7351},
{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x744e},
{"asm/sockios.h", "FIOSETOWN", 0x8901},
{"asm/sockios.h", "SIOCSPGRP", 0x8902},
{"asm/sockios.h", "FIOGETOWN", 0x8903},
{"asm/sockios.h", "SIOCGPGRP", 0x8904},
{"asm/sockios.h", "SIOCATMARK", 0x8905},
{"asm/sockios.h", "SIOCGSTAMP", 0x8906},
{"linux/sockios.h", "SIOCADDRT", 0x890b},
{"linux/sockios.h", "SIOCDELRT", 0x890c},
{"linux/sockios.h", "SIOCGIFNAME", 0x8910},
{"linux/sockios.h", "SIOCSIFLINK", 0x8911},
{"linux/sockios.h", "SIOCGIFCONF", 0x8912},
{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
{"linux/sockios.h", "SIOCGIFADDR", 0x8915},
{"linux/sockios.h", "SIOCSIFADDR", 0x8916},
{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
{"linux/sockios.h", "SIOCGIFMEM", 0x891f},
{"linux/sockios.h", "SIOCSIFMEM", 0x8920},
{"linux/sockios.h", "SIOCGIFMTU", 0x8921},
{"linux/sockios.h", "SIOCSIFMTU", 0x8922},
{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
{"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
{"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
{"linux/sockios.h", "SIOCADDMULTI", 0x8931},
{"linux/sockios.h", "SIOCDELMULTI", 0x8932},
{"linux/sockios.h", "SIOCGIFBR", 0x8940},
{"linux/sockios.h", "SIOCSIFBR", 0x8941},
{"linux/sockios.h", "OLD_SIOCDARP", 0x8950},
{"linux/sockios.h", "OLD_SIOCGARP", 0x8951},
{"linux/sockios.h", "OLD_SIOCSARP", 0x8952},
{"linux/sockios.h", "SIOCDARP", 0x8953},
{"linux/sockios.h", "SIOCGARP", 0x8954},
{"linux/sockios.h", "SIOCSARP", 0x8955},
{"linux/sockios.h", "SIOCDRARP", 0x8960},
{"linux/sockios.h", "SIOCGRARP", 0x8961},
{"linux/sockios.h", "SIOCSRARP", 0x8962},
{"linux/sockios.h", "SIOCGIFMAP", 0x8970},
{"linux/sockios.h", "SIOCSIFMAP", 0x8971},
{"linux/sockios.h", "SIOCADDDLCI", 0x8980},
{"linux/sockios.h", "SIOCDELDLCI", 0x8981},
{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
{"linux/sbpcd.h", "DDIOCSDBG", 0x9000},
{"linux/cyclades.h", "CYGETMON", 0x435901},
{"linux/cyclades.h", "CYGETTHRESH", 0x435902},
{"linux/cyclades.h", "CYSETTHRESH", 0x435903},
{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904},
{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905},
{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906},
{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907},
{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908},
{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909},
{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x40026e02},
{"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x40045010},
{"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x40045106},
{"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x40045108},
{"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x40045109},
{"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x4004510d},
{"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x4004510f},
{"linux/random.h", "RNDADDTOENTCNT", 0x40045201},
{"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x40045407},
{"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x40045408},
{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x40046602},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x40047202},
{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x40047440},
{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x40047451},
{"linux/if_ppp.h", "PPPIOCSMRU", 0x40047452},
{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x40047454},
{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x40047457},
{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x40047459},
{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x40047481},
{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x40047483},
{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x40047484},
{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x40047485},
{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x40047602},
{"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x40085112},
{"linux/random.h", "RNDADDENTROPY", 0x40085203},
{"linux/mtio.h", "MTIOCTOP", 0x40086d01},
{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x4008744b},
{"linux/fd.h", "FDFMTTRK", 0x400c0248},
{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x400c744d},
{"linux/fd.h", "FDSETMAXERRS", 0x4014024c},
{"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x40144304},
{"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x40144305},
{"linux/fd.h", "FDSETPRM", 0x401c0242},
{"linux/fd.h", "FDDEFPRM", 0x401c0243},
{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x4020744f},
{"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x40285107},
{"linux/fd.h", "FDSETDRVPRM", 0x40580290},
{"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x4fa44308},
{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x80027501},
{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x80044d00},
{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x80044d01},
{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x80044d02},
{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x80044d03},
{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x80044d04},
{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x80044d05},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x80044d06},
{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x80044d07},
{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x80044d08},
{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x80044d09},
{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x80044d0a},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x80044d0b},
{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x80044d0c},
{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x80044d0d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x80044d0e},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x80044d0f},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x80044d10},
{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x80044d1c},
{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x80044d1d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x80044d1e},
{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x80044dfb},
{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x80044dfc},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x80044dfd},
{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x80044dfe},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x80044dff},
{"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x80045002},
{"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x80045005},
{"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x80045006},
{"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x80045007},
{"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x8004500b},
{"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x8004500f},
{"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x80045010},
{"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x80045104},
{"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x80045105},
{"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x8004510a},
{"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x8004510b},
{"linux/random.h", "RNDGETENTCNT", 0x80045200},
{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x80046601},
{"linux/mtio.h", "MTIOCPOS", 0x80046d03},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x80047201},
{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x80047441},
{"linux/if_ppp.h", "PPPIOCGMRU", 0x80047453},
{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x80047455},
{"linux/if_ppp.h", "PPPIOCGUNIT", 0x80047456},
{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x80047458},
{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x8004745a},
{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x80047482},
{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x80047601},
{"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x80085013},
{"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x80085014},
{"linux/random.h", "RNDGETPOOL", 0x80085202},
{"linux/if_ppp.h", "PPPIOCGIDLE", 0x8008743f},
{"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x800c5011},
{"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x800c5012},
{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x800c6e01},
{"linux/fd.h", "FDGETDRVTYP", 0x8010020f},
{"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x8010500c},
{"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x8010500d},
{"linux/fd.h", "FDGETMAXERRS", 0x8014020e},
{"linux/fd.h", "FDWERRORGET", 0x80180217},
{"linux/fd.h", "FDGETPRM", 0x801c0204},
{"linux/mtio.h", "MTIOCGET", 0x801c6d02},
{"linux/fd.h", "FDGETFDCSTAT", 0x80200215},
{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x80207450},
{"linux/fd.h", "FDGETDRVSTAT", 0x80340212},
{"linux/fd.h", "FDPOLLDRVSTAT", 0x80340213},
{"linux/fd.h", "FDGETDRVPRM", 0x80580211},
{"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x8fa44309},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff},
{"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0xc0045002},
{"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0xc0045003},
{"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0xc0045004},
{"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0xc0045005},
{"linux/soundcard.h", "SOUND_PCM_WRITE_CHANNELS", 0xc0045006},
{"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0xc0045007},
{"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0xc0045009},
{"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0xc004500a},
{"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0xc0045103},
{"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0xc004510e},
{"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0xc0045401},
{"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0xc0045405},
{"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0xc0045406},
{"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0xc0046d00},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0xc0046d01},
{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c},
{"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0xc0144302},
{"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0xc0144303},
{"linux/soundcard.h", "SNDCTL_COPR_RUN", 0xc0144306},
{"linux/soundcard.h", "SNDCTL_COPR_HALT", 0xc0144307},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0xc0216d02},
{"linux/isdn_ppp.h", "PPPIOCLINKINFO", 0xc0247480},
{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0286e04},
{"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0xc074510c},
{"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0xc08c5102},
{"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0xcfb04301},
{"linux/soundcard.h", "SNDCTL_PMGR_IFACE", 0xcfb85001},
{"linux/soundcard.h", "SNDCTL_PMGR_ACCESS", 0xcfb85110},

98
linux/ioctlent.sh Normal file
View File

@ -0,0 +1,98 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
# All rights reserved.
#
# Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
# 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$
# Files to find.
file_find='asm/*.h linux/*.h scsi/*.h'
# Files to stop.
file_stop='asm/byteorder.h linux/config.h linux/pci.h linux/xd.h'
# Defs to find.
# Work on the kernel source to convert all to df_iowr.
# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h.
df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+'
df_iowr='_IO|_IOR|_IOW|_IOWR'
df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]'
df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h
df_470N='470[0-9]' # linux/fs.h (only in 1.2.13)
df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h
df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13)
df_tail='([() ]|$)'
def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail"
# Defs to stop.
ds_tail='_MAGIC|_PATCH'
ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13)
ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13)
def_stop="$ds_tail|$ds_fdmp|$ds_mtio"
# Validate arg count.
if [ $# -ne 1 ]
then
echo "usage: $0 include-directory" >&2
exit 1
fi
# Grep through the files.
(
# Construct list: find files minus stop files.
cd $1 || exit
file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u`
# Grep matching #define lines.
# Transform to C structure form.
# Filter out stop list.
egrep "$def_find" $file_list |
sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' |
egrep -v "$def_stop"
) > ioctlent.tmp
# Generate the output file.
echo '/* This file is automatically generated by ioctlent.sh */'
echo
echo '#include <sys/types.h>'
echo
echo '/* Needed for <linux/baycom.h> */'
echo '#define BAYCOM_DEBUG'
echo
echo '/* Needed for <linux/cyclades.h> */'
echo '#include <linux/termios.h>'
echo '#include <linux/tqueue.h>'
echo
awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u
echo
echo 'struct ioctlent ioctlent [] ='
echo '{'
cat ioctlent.tmp
echo '};'
# Clean up.
rm -f ioctlent.tmp

57
linux/powerpc/Makefile.in Normal file
View File

@ -0,0 +1,57 @@
#
# $Id$
#
srcdir = @srcdir@
VPATH = $(srcdir)
CC = @CC@
CPP = @CPP@
SHELL = /bin/sh
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = -g
LDFLAGS = -g
WARNFLAGS = @WARNFLAGS@
CPPFLAGS =
INCLUDES = -I. -I.. -I$(srcdir)/.. -I../.. -I$(srcdir)
includedir = @includedir@
all: ioctlent.h errnoent.h signalent.h syscallent.h
ioctlent.raw: ioctlent.sh
$(SHELL) $(srcdir)/ioctlent.sh $(includedir) >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort: ioctlsort.o
$(CC) $(LDFLAGS) ioctlsort.o -o ioctlsort
ioctlsort.o: ../../ioctlsort.c
$(CC) $(WARNFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $(srcdir)/../../ioctlsort.c
ioctlsort.o: ioctlent.raw
errnoent.h: ../../errnoent.sh $(includedir)/asm/errno.h
$(SHELL) $(srcdir)/../../errnoent.sh $(includedir)/asm/errno.h >$@
signalent.h: ../../signalent.sh $(includedir)/asm/signal.h
$(SHELL) $(srcdir)/../../signalent.sh $(includedir)/asm/signal.h >$@
#syscallent.h: ../../syscallent.sh $(includedir)/sys/syscall.h
syscallent.h:
$(SHELL) $(srcdir)/../../syscallent.sh $(includedir)/sys/syscall.h >$@
clean:
rm -f ioctlent.c *.raw *.tmp *.o ioctlsort
distclean: clean
rm -f Makefile
maintainer-clean: distclean
rm -f ioctlent.h errnoent.h signalent.h

516
linux/powerpc/errnoent.h Normal file
View File

@ -0,0 +1,516 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EAGAIN", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"EDEADLK", /* 35 */
"ENAMETOOLONG", /* 36 */
"ENOLCK", /* 37 */
"ENOSYS", /* 38 */
"ENOTEMPTY", /* 39 */
"ELOOP", /* 40 */
"ERRNO_41", /* 41 */
"ENOMSG", /* 42 */
"EIDRM", /* 43 */
"ECHRNG", /* 44 */
"EL2NSYNC", /* 45 */
"EL3HLT", /* 46 */
"EL3RST", /* 47 */
"ELNRNG", /* 48 */
"EUNATCH", /* 49 */
"ENOCSI", /* 50 */
"EL2HLT", /* 51 */
"EBADE", /* 52 */
"EBADR", /* 53 */
"EXFULL", /* 54 */
"ENOANO", /* 55 */
"EBADRQC", /* 56 */
"EBADSLT", /* 57 */
"EDEADLOCK", /* 58 */
"EBFONT", /* 59 */
"ENOSTR", /* 60 */
"ENODATA", /* 61 */
"ETIME", /* 62 */
"ENOSR", /* 63 */
"ENONET", /* 64 */
"ENOPKG", /* 65 */
"EREMOTE", /* 66 */
"ENOLINK", /* 67 */
"EADV", /* 68 */
"ESRMNT", /* 69 */
"ECOMM", /* 70 */
"EPROTO", /* 71 */
"EMULTIHOP", /* 72 */
"EDOTDOT", /* 73 */
"EBADMSG", /* 74 */
"EOVERFLOW", /* 75 */
"ENOTUNIQ", /* 76 */
"EBADFD", /* 77 */
"EREMCHG", /* 78 */
"ELIBACC", /* 79 */
"ELIBBAD", /* 80 */
"ELIBSCN", /* 81 */
"ELIBMAX", /* 82 */
"ELIBEXEC", /* 83 */
"EILSEQ", /* 84 */
"ERESTART", /* 85 */
"ESTRPIPE", /* 86 */
"EUSERS", /* 87 */
"ENOTSOCK", /* 88 */
"EDESTADDRREQ", /* 89 */
"EMSGSIZE", /* 90 */
"EPROTOTYPE", /* 91 */
"ENOPROTOOPT", /* 92 */
"EPROTONOSUPPORT", /* 93 */
"ESOCKTNOSUPPORT", /* 94 */
"EOPNOTSUPP", /* 95 */
"EPFNOSUPPORT", /* 96 */
"EAFNOSUPPORT", /* 97 */
"EADDRINUSE", /* 98 */
"EADDRNOTAVAIL", /* 99 */
"ENETDOWN", /* 100 */
"ENETUNREACH", /* 101 */
"ENETRESET", /* 102 */
"ECONNABORTED", /* 103 */
"ECONNRESET", /* 104 */
"ENOBUFS", /* 105 */
"EISCONN", /* 106 */
"ENOTCONN", /* 107 */
"ESHUTDOWN", /* 108 */
"ETOOMANYREFS", /* 109 */
"ETIMEDOUT", /* 110 */
"ECONNREFUSED", /* 111 */
"EHOSTDOWN", /* 112 */
"EHOSTUNREACH", /* 113 */
"EALREADY", /* 114 */
"EINPROGRESS", /* 115 */
"ESTALE", /* 116 */
"EUCLEAN", /* 117 */
"ENOTNAM", /* 118 */
"ENAVAIL", /* 119 */
"EISNAM", /* 120 */
"EREMOTEIO", /* 121 */
"EDQUOT", /* 122 */
"ENOMEDIUM", /* 123 */
"EMEDIUMTYPE", /* 124 */
"ERRNO_125", /* 125 */
"ERRNO_126", /* 126 */
"ERRNO_127", /* 127 */
"ERRNO_128", /* 128 */
"ERRNO_129", /* 129 */
"ERRNO_130", /* 130 */
"ERRNO_131", /* 131 */
"ERRNO_132", /* 132 */
"ERRNO_133", /* 133 */
"ERRNO_134", /* 134 */
"ERRNO_135", /* 135 */
"ERRNO_136", /* 136 */
"ERRNO_137", /* 137 */
"ERRNO_138", /* 138 */
"ERRNO_139", /* 139 */
"ERRNO_140", /* 140 */
"ERRNO_141", /* 141 */
"ERRNO_142", /* 142 */
"ERRNO_143", /* 143 */
"ERRNO_144", /* 144 */
"ERRNO_145", /* 145 */
"ERRNO_146", /* 146 */
"ERRNO_147", /* 147 */
"ERRNO_148", /* 148 */
"ERRNO_149", /* 149 */
"ERRNO_150", /* 150 */
"ERRNO_151", /* 151 */
"ERRNO_152", /* 152 */
"ERRNO_153", /* 153 */
"ERRNO_154", /* 154 */
"ERRNO_155", /* 155 */
"ERRNO_156", /* 156 */
"ERRNO_157", /* 157 */
"ERRNO_158", /* 158 */
"ERRNO_159", /* 159 */
"ERRNO_160", /* 160 */
"ERRNO_161", /* 161 */
"ERRNO_162", /* 162 */
"ERRNO_163", /* 163 */
"ERRNO_164", /* 164 */
"ERRNO_165", /* 165 */
"ERRNO_166", /* 166 */
"ERRNO_167", /* 167 */
"ERRNO_168", /* 168 */
"ERRNO_169", /* 169 */
"ERRNO_170", /* 170 */
"ERRNO_171", /* 171 */
"ERRNO_172", /* 172 */
"ERRNO_173", /* 173 */
"ERRNO_174", /* 174 */
"ERRNO_175", /* 175 */
"ERRNO_176", /* 176 */
"ERRNO_177", /* 177 */
"ERRNO_178", /* 178 */
"ERRNO_179", /* 179 */
"ERRNO_180", /* 180 */
"ERRNO_181", /* 181 */
"ERRNO_182", /* 182 */
"ERRNO_183", /* 183 */
"ERRNO_184", /* 184 */
"ERRNO_185", /* 185 */
"ERRNO_186", /* 186 */
"ERRNO_187", /* 187 */
"ERRNO_188", /* 188 */
"ERRNO_189", /* 189 */
"ERRNO_190", /* 190 */
"ERRNO_191", /* 191 */
"ERRNO_192", /* 192 */
"ERRNO_193", /* 193 */
"ERRNO_194", /* 194 */
"ERRNO_195", /* 195 */
"ERRNO_196", /* 196 */
"ERRNO_197", /* 197 */
"ERRNO_198", /* 198 */
"ERRNO_199", /* 199 */
"ERRNO_200", /* 200 */
"ERRNO_201", /* 201 */
"ERRNO_202", /* 202 */
"ERRNO_203", /* 203 */
"ERRNO_204", /* 204 */
"ERRNO_205", /* 205 */
"ERRNO_206", /* 206 */
"ERRNO_207", /* 207 */
"ERRNO_208", /* 208 */
"ERRNO_209", /* 209 */
"ERRNO_210", /* 210 */
"ERRNO_211", /* 211 */
"ERRNO_212", /* 212 */
"ERRNO_213", /* 213 */
"ERRNO_214", /* 214 */
"ERRNO_215", /* 215 */
"ERRNO_216", /* 216 */
"ERRNO_217", /* 217 */
"ERRNO_218", /* 218 */
"ERRNO_219", /* 219 */
"ERRNO_220", /* 220 */
"ERRNO_221", /* 221 */
"ERRNO_222", /* 222 */
"ERRNO_223", /* 223 */
"ERRNO_224", /* 224 */
"ERRNO_225", /* 225 */
"ERRNO_226", /* 226 */
"ERRNO_227", /* 227 */
"ERRNO_228", /* 228 */
"ERRNO_229", /* 229 */
"ERRNO_230", /* 230 */
"ERRNO_231", /* 231 */
"ERRNO_232", /* 232 */
"ERRNO_233", /* 233 */
"ERRNO_234", /* 234 */
"ERRNO_235", /* 235 */
"ERRNO_236", /* 236 */
"ERRNO_237", /* 237 */
"ERRNO_238", /* 238 */
"ERRNO_239", /* 239 */
"ERRNO_240", /* 240 */
"ERRNO_241", /* 241 */
"ERRNO_242", /* 242 */
"ERRNO_243", /* 243 */
"ERRNO_244", /* 244 */
"ERRNO_245", /* 245 */
"ERRNO_246", /* 246 */
"ERRNO_247", /* 247 */
"ERRNO_248", /* 248 */
"ERRNO_249", /* 249 */
"ERRNO_250", /* 250 */
"ERRNO_251", /* 251 */
"ERRNO_252", /* 252 */
"ERRNO_253", /* 253 */
"ERRNO_254", /* 254 */
"ERRNO_255", /* 255 */
"ERRNO_256", /* 256 */
"ERRNO_257", /* 257 */
"ERRNO_258", /* 258 */
"ERRNO_259", /* 259 */
"ERRNO_260", /* 260 */
"ERRNO_261", /* 261 */
"ERRNO_262", /* 262 */
"ERRNO_263", /* 263 */
"ERRNO_264", /* 264 */
"ERRNO_265", /* 265 */
"ERRNO_266", /* 266 */
"ERRNO_267", /* 267 */
"ERRNO_268", /* 268 */
"ERRNO_269", /* 269 */
"ERRNO_270", /* 270 */
"ERRNO_271", /* 271 */
"ERRNO_272", /* 272 */
"ERRNO_273", /* 273 */
"ERRNO_274", /* 274 */
"ERRNO_275", /* 275 */
"ERRNO_276", /* 276 */
"ERRNO_277", /* 277 */
"ERRNO_278", /* 278 */
"ERRNO_279", /* 279 */
"ERRNO_280", /* 280 */
"ERRNO_281", /* 281 */
"ERRNO_282", /* 282 */
"ERRNO_283", /* 283 */
"ERRNO_284", /* 284 */
"ERRNO_285", /* 285 */
"ERRNO_286", /* 286 */
"ERRNO_287", /* 287 */
"ERRNO_288", /* 288 */
"ERRNO_289", /* 289 */
"ERRNO_290", /* 290 */
"ERRNO_291", /* 291 */
"ERRNO_292", /* 292 */
"ERRNO_293", /* 293 */
"ERRNO_294", /* 294 */
"ERRNO_295", /* 295 */
"ERRNO_296", /* 296 */
"ERRNO_297", /* 297 */
"ERRNO_298", /* 298 */
"ERRNO_299", /* 299 */
"ERRNO_300", /* 300 */
"ERRNO_301", /* 301 */
"ERRNO_302", /* 302 */
"ERRNO_303", /* 303 */
"ERRNO_304", /* 304 */
"ERRNO_305", /* 305 */
"ERRNO_306", /* 306 */
"ERRNO_307", /* 307 */
"ERRNO_308", /* 308 */
"ERRNO_309", /* 309 */
"ERRNO_310", /* 310 */
"ERRNO_311", /* 311 */
"ERRNO_312", /* 312 */
"ERRNO_313", /* 313 */
"ERRNO_314", /* 314 */
"ERRNO_315", /* 315 */
"ERRNO_316", /* 316 */
"ERRNO_317", /* 317 */
"ERRNO_318", /* 318 */
"ERRNO_319", /* 319 */
"ERRNO_320", /* 320 */
"ERRNO_321", /* 321 */
"ERRNO_322", /* 322 */
"ERRNO_323", /* 323 */
"ERRNO_324", /* 324 */
"ERRNO_325", /* 325 */
"ERRNO_326", /* 326 */
"ERRNO_327", /* 327 */
"ERRNO_328", /* 328 */
"ERRNO_329", /* 329 */
"ERRNO_330", /* 330 */
"ERRNO_331", /* 331 */
"ERRNO_332", /* 332 */
"ERRNO_333", /* 333 */
"ERRNO_334", /* 334 */
"ERRNO_335", /* 335 */
"ERRNO_336", /* 336 */
"ERRNO_337", /* 337 */
"ERRNO_338", /* 338 */
"ERRNO_339", /* 339 */
"ERRNO_340", /* 340 */
"ERRNO_341", /* 341 */
"ERRNO_342", /* 342 */
"ERRNO_343", /* 343 */
"ERRNO_344", /* 344 */
"ERRNO_345", /* 345 */
"ERRNO_346", /* 346 */
"ERRNO_347", /* 347 */
"ERRNO_348", /* 348 */
"ERRNO_349", /* 349 */
"ERRNO_350", /* 350 */
"ERRNO_351", /* 351 */
"ERRNO_352", /* 352 */
"ERRNO_353", /* 353 */
"ERRNO_354", /* 354 */
"ERRNO_355", /* 355 */
"ERRNO_356", /* 356 */
"ERRNO_357", /* 357 */
"ERRNO_358", /* 358 */
"ERRNO_359", /* 359 */
"ERRNO_360", /* 360 */
"ERRNO_361", /* 361 */
"ERRNO_362", /* 362 */
"ERRNO_363", /* 363 */
"ERRNO_364", /* 364 */
"ERRNO_365", /* 365 */
"ERRNO_366", /* 366 */
"ERRNO_367", /* 367 */
"ERRNO_368", /* 368 */
"ERRNO_369", /* 369 */
"ERRNO_370", /* 370 */
"ERRNO_371", /* 371 */
"ERRNO_372", /* 372 */
"ERRNO_373", /* 373 */
"ERRNO_374", /* 374 */
"ERRNO_375", /* 375 */
"ERRNO_376", /* 376 */
"ERRNO_377", /* 377 */
"ERRNO_378", /* 378 */
"ERRNO_379", /* 379 */
"ERRNO_380", /* 380 */
"ERRNO_381", /* 381 */
"ERRNO_382", /* 382 */
"ERRNO_383", /* 383 */
"ERRNO_384", /* 384 */
"ERRNO_385", /* 385 */
"ERRNO_386", /* 386 */
"ERRNO_387", /* 387 */
"ERRNO_388", /* 388 */
"ERRNO_389", /* 389 */
"ERRNO_390", /* 390 */
"ERRNO_391", /* 391 */
"ERRNO_392", /* 392 */
"ERRNO_393", /* 393 */
"ERRNO_394", /* 394 */
"ERRNO_395", /* 395 */
"ERRNO_396", /* 396 */
"ERRNO_397", /* 397 */
"ERRNO_398", /* 398 */
"ERRNO_399", /* 399 */
"ERRNO_400", /* 400 */
"ERRNO_401", /* 401 */
"ERRNO_402", /* 402 */
"ERRNO_403", /* 403 */
"ERRNO_404", /* 404 */
"ERRNO_405", /* 405 */
"ERRNO_406", /* 406 */
"ERRNO_407", /* 407 */
"ERRNO_408", /* 408 */
"ERRNO_409", /* 409 */
"ERRNO_410", /* 410 */
"ERRNO_411", /* 411 */
"ERRNO_412", /* 412 */
"ERRNO_413", /* 413 */
"ERRNO_414", /* 414 */
"ERRNO_415", /* 415 */
"ERRNO_416", /* 416 */
"ERRNO_417", /* 417 */
"ERRNO_418", /* 418 */
"ERRNO_419", /* 419 */
"ERRNO_420", /* 420 */
"ERRNO_421", /* 421 */
"ERRNO_422", /* 422 */
"ERRNO_423", /* 423 */
"ERRNO_424", /* 424 */
"ERRNO_425", /* 425 */
"ERRNO_426", /* 426 */
"ERRNO_427", /* 427 */
"ERRNO_428", /* 428 */
"ERRNO_429", /* 429 */
"ERRNO_430", /* 430 */
"ERRNO_431", /* 431 */
"ERRNO_432", /* 432 */
"ERRNO_433", /* 433 */
"ERRNO_434", /* 434 */
"ERRNO_435", /* 435 */
"ERRNO_436", /* 436 */
"ERRNO_437", /* 437 */
"ERRNO_438", /* 438 */
"ERRNO_439", /* 439 */
"ERRNO_440", /* 440 */
"ERRNO_441", /* 441 */
"ERRNO_442", /* 442 */
"ERRNO_443", /* 443 */
"ERRNO_444", /* 444 */
"ERRNO_445", /* 445 */
"ERRNO_446", /* 446 */
"ERRNO_447", /* 447 */
"ERRNO_448", /* 448 */
"ERRNO_449", /* 449 */
"ERRNO_450", /* 450 */
"ERRNO_451", /* 451 */
"ERRNO_452", /* 452 */
"ERRNO_453", /* 453 */
"ERRNO_454", /* 454 */
"ERRNO_455", /* 455 */
"ERRNO_456", /* 456 */
"ERRNO_457", /* 457 */
"ERRNO_458", /* 458 */
"ERRNO_459", /* 459 */
"ERRNO_460", /* 460 */
"ERRNO_461", /* 461 */
"ERRNO_462", /* 462 */
"ERRNO_463", /* 463 */
"ERRNO_464", /* 464 */
"ERRNO_465", /* 465 */
"ERRNO_466", /* 466 */
"ERRNO_467", /* 467 */
"ERRNO_468", /* 468 */
"ERRNO_469", /* 469 */
"ERRNO_470", /* 470 */
"ERRNO_471", /* 471 */
"ERRNO_472", /* 472 */
"ERRNO_473", /* 473 */
"ERRNO_474", /* 474 */
"ERRNO_475", /* 475 */
"ERRNO_476", /* 476 */
"ERRNO_477", /* 477 */
"ERRNO_478", /* 478 */
"ERRNO_479", /* 479 */
"ERRNO_480", /* 480 */
"ERRNO_481", /* 481 */
"ERRNO_482", /* 482 */
"ERRNO_483", /* 483 */
"ERRNO_484", /* 484 */
"ERRNO_485", /* 485 */
"ERRNO_486", /* 486 */
"ERRNO_487", /* 487 */
"ERRNO_488", /* 488 */
"ERRNO_489", /* 489 */
"ERRNO_490", /* 490 */
"ERRNO_491", /* 491 */
"ERRNO_492", /* 492 */
"ERRNO_493", /* 493 */
"ERRNO_494", /* 494 */
"ERRNO_495", /* 495 */
"ERRNO_496", /* 496 */
"ERRNO_497", /* 497 */
"ERRNO_498", /* 498 */
"ERRNO_499", /* 499 */
"ERRNO_500", /* 500 */
"ERRNO_501", /* 501 */
"ERRNO_502", /* 502 */
"ERRNO_503", /* 503 */
"ERRNO_504", /* 504 */
"ERRNO_505", /* 505 */
"ERRNO_506", /* 506 */
"ERRNO_507", /* 507 */
"ERRNO_508", /* 508 */
"ERRNO_509", /* 509 */
"ERRNO_510", /* 510 */
"ERRNO_511", /* 511 */
"ERESTARTSYS", /* 512 */
"ERESTARTNOINTR", /* 513 */
"ERESTARTNOHAND", /* 514 */
"ENOIOCTLCMD", /* 515 */

668
linux/powerpc/ioctlent.h Normal file
View File

@ -0,0 +1,668 @@
{"linux/in6.h", "IPV6_PRIORITY_RESERVED1", 0x300},
{"linux/quota.h", "Q_GETQUOTA", 0x300},
{"linux/hdreg.h", "HDIO_GETGEO", 0x301},
{"linux/ps2esdi.h", "HDIO_GETGEO", 0x301},
{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302},
{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304},
{"linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0x307},
{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308},
{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309},
{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a},
{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b},
{"linux/hdreg.h", "HDIO_GET_NICE", 0x30c},
{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x30d},
{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f},
{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321},
{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322},
{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323},
{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324},
{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325},
{"linux/hdreg.h", "HDIO_SET_DMA", 0x326},
{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327},
{"linux/hdreg.h", "HDIO_SCAN_HWIF", 0x328},
{"linux/hdreg.h", "HDIO_SET_NICE", 0x329},
{"linux/zorro.h", "ZORRO_MANUF_CARDCO_1", 0x3ec},
{"linux/zorro.h", "ZORRO_MANUF_A_SQUARED", 0x3ed},
{"linux/zorro.h", "ZORRO_MANUF_COMSPEC_COMMUNICATIONS", 0x3ee},
{"linux/zorro.h", "ZORRO_MANUF_ANAKIN_RESEARCH", 0x3f1},
{"linux/zorro.h", "ZORRO_MANUF_MICROBOTICS", 0x3f2},
{"linux/zorro.h", "ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA", 0x3f4},
{"linux/zorro.h", "ZORRO_MANUF_EXPANSION_TECHNOLOGIES", 0x3f6},
{"linux/zorro.h", "ZORRO_MANUF_ASDG", 0x3ff},
{"linux/in6.h", "IPV6_PRIORITY_INTERACTIVE", 0x600},
{"linux/quota.h", "Q_SYNC", 0x600},
{"linux/lp.h", "LPCHAR", 0x601},
{"linux/lp_m68k.h", "LPCHAR", 0x601},
{"linux/lp.h", "LPTIME", 0x602},
{"linux/lp_m68k.h", "LPTIME", 0x602},
{"linux/lp.h", "LPABORT", 0x604},
{"linux/lp_m68k.h", "LPABORT", 0x604},
{"linux/lp.h", "LPSETIRQ", 0x605},
{"linux/lp_m68k.h", "LPSETIRQ", 0x605},
{"linux/lp.h", "LPGETIRQ", 0x606},
{"linux/lp_m68k.h", "LPGETIRQ", 0x606},
{"linux/lp.h", "LPWAIT", 0x608},
{"linux/lp_m68k.h", "LPWAIT", 0x608},
{"linux/lp.h", "LPCAREFUL", 0x609},
{"linux/lp_m68k.h", "LPCAREFUL", 0x609},
{"linux/lp.h", "LPABORTOPEN", 0x60a},
{"linux/lp_m68k.h", "LPABORTOPEN", 0x60a},
{"linux/lp.h", "LPGETSTATUS", 0x60b},
{"linux/lp_m68k.h", "LPGETSTATUS", 0x60b},
{"linux/lp.h", "LPRESET", 0x60c},
{"linux/lp_m68k.h", "LPRESET", 0x60c},
{"linux/lp.h", "LPGETSTATS", 0x60d},
{"linux/lp.h", "LPGETFLAGS", 0x60e},
{"linux/zorro.h", "ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1", 0x6e1},
{"linux/zorro.h", "ZORRO_MANUF_APOLLO_2", 0x2200},
{"scsi/sg.h", "SG_SET_TIMEOUT", 0x2201},
{"scsi/sg.h", "SG_GET_TIMEOUT", 0x2202},
{"linux/zorro.h", "ZORRO_MANUF_APOLLO_3", 0x2222},
{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
{"linux/ps2esdi.h", "CMD_READ", 0x4601},
{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
{"linux/ps2esdi.h", "CMD_WRITE", 0x4602},
{"linux/fb.h", "FBIOGETCMAP", 0x4604},
{"linux/fb.h", "FBIOPUTCMAP", 0x4605},
{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
{"linux/fb.h", "FBIOGET_FCURSORINFO", 0x4607},
{"linux/fb.h", "FBIOGET_VCURSORINFO", 0x4608},
{"linux/fb.h", "FBIOPUT_VCURSORINFO", 0x4609},
{"linux/fb.h", "FBIOGET_CURSORSTATE", 0x460a},
{"linux/fb.h", "FBIOPUT_CURSORSTATE", 0x460b},
{"linux/fb.h", "FBIOGET_CON2FBMAP", 0x460f},
{"linux/fb.h", "FBIOPUT_CON2FBMAP", 0x4610},
{"linux/fb.h", "FBCMD_DRAWLINE", 0x4621},
{"linux/fb.h", "FBCMD_MOVE", 0x4622},
{"linux/kd.h", "KIOCSOUND", 0x4b2f},
{"linux/kd.h", "KDMKTONE", 0x4b30},
{"linux/kd.h", "KDGETLED", 0x4b31},
{"linux/kd.h", "KDSETLED", 0x4b32},
{"linux/kd.h", "KDGKBTYPE", 0x4b33},
{"linux/kd.h", "KDADDIO", 0x4b34},
{"linux/kd.h", "KDDELIO", 0x4b35},
{"linux/kd.h", "KDENABIO", 0x4b36},
{"linux/kd.h", "KDDISABIO", 0x4b37},
{"linux/kd.h", "KDSETMODE", 0x4b3a},
{"linux/kd.h", "KDGETMODE", 0x4b3b},
{"linux/kd.h", "KDMAPDISP", 0x4b3c},
{"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
{"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
{"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
{"linux/kd.h", "KDGKBMODE", 0x4b44},
{"linux/kd.h", "KDSKBMODE", 0x4b45},
{"linux/kd.h", "KDGKBENT", 0x4b46},
{"linux/kd.h", "KDSKBENT", 0x4b47},
{"linux/kd.h", "KDGKBSENT", 0x4b48},
{"linux/kd.h", "KDSKBSENT", 0x4b49},
{"linux/kd.h", "KDGKBDIACR", 0x4b4a},
{"linux/kd.h", "KDSKBDIACR", 0x4b4b},
{"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
{"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
{"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
{"linux/kd.h", "KDGHWCLK", 0x4b50},
{"linux/kd.h", "KDSHWCLK", 0x4b51},
{"linux/kd.h", "KDKBDREP", 0x4b52},
{"linux/kd.h", "GIO_FONT", 0x4b60},
{"linux/kd.h", "PIO_FONT", 0x4b61},
{"linux/kd.h", "KDGKBMETA", 0x4b62},
{"linux/kd.h", "KDSKBMETA", 0x4b63},
{"linux/kd.h", "KDGKBLED", 0x4b64},
{"linux/kd.h", "KDSKBLED", 0x4b65},
{"linux/kd.h", "GIO_UNIMAP", 0x4b66},
{"linux/kd.h", "PIO_UNIMAP", 0x4b67},
{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
{"linux/kd.h", "GIO_FONTX", 0x4b6b},
{"linux/kd.h", "PIO_FONTX", 0x4b6c},
{"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
{"linux/kd.h", "GIO_CMAP", 0x4b70},
{"linux/kd.h", "PIO_CMAP", 0x4b71},
{"linux/kd.h", "KDFONTOP", 0x4b72},
{"linux/loop.h", "LOOP_SET_FD", 0x4c00},
{"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
{"linux/cdrom.h", "CDROMPAUSE", 0x5301},
{"linux/cdrom.h", "CDROMRESUME", 0x5302},
{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
{"linux/cdrom.h", "CDROMSTOP", 0x5307},
{"linux/cdrom.h", "CDROMSTART", 0x5308},
{"linux/cdrom.h", "CDROMEJECT", 0x5309},
{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
{"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
{"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
{"linux/cdrom.h", "CDROM_GET_MCN", 0x5311},
{"linux/cdrom.h", "CDROMRESET", 0x5312},
{"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
{"linux/cdrom.h", "CDROMREADRAW", 0x5314},
{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
{"linux/cdrom.h", "CDROMSEEK", 0x5316},
{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
{"linux/cdrom.h", "CDROMREADALL", 0x5318},
{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
{"linux/cdrom.h", "CDROM_SET_OPTIONS", 0x5320},
{"linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
{"linux/cdrom.h", "CDROM_SELECT_SPEED", 0x5322},
{"linux/cdrom.h", "CDROM_SELECT_DISC", 0x5323},
{"linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
{"linux/cdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
{"linux/cdrom.h", "CDROM_DISC_STATUS", 0x5327},
{"linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0x5328},
{"linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0x5382},
{"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382},
{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_ENABLE", 0x5383},
{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_DISABLE", 0x5384},
{"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0x5385},
{"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0x5386},
{"asm/ioctls.h", "TIOCEXCL", 0x540c},
{"asm/termios.h", "TIOCEXCL", 0x540c},
{"asm/ioctls.h", "TIOCNXCL", 0x540d},
{"asm/termios.h", "TIOCNXCL", 0x540d},
{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm/termios.h", "TIOCSCTTY", 0x540e},
{"asm/ioctls.h", "TIOCSTI", 0x5412},
{"asm/termios.h", "TIOCSTI", 0x5412},
{"asm/ioctls.h", "TIOCMGET", 0x5415},
{"asm/termios.h", "TIOCMGET", 0x5415},
{"asm/ioctls.h", "TIOCMBIS", 0x5416},
{"asm/termios.h", "TIOCMBIS", 0x5416},
{"asm/ioctls.h", "TIOCMBIC", 0x5417},
{"asm/termios.h", "TIOCMBIC", 0x5417},
{"asm/ioctls.h", "TIOCMSET", 0x5418},
{"asm/termios.h", "TIOCMSET", 0x5418},
{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm/termios.h", "TIOCGSOFTCAR", 0x5419},
{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm/termios.h", "TIOCSSOFTCAR", 0x541a},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
{"asm/termios.h", "TIOCLINUX", 0x541c},
{"asm/ioctls.h", "TIOCCONS", 0x541d},
{"asm/termios.h", "TIOCCONS", 0x541d},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/termios.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm/termios.h", "TIOCSSERIAL", 0x541f},
{"asm/ioctls.h", "TIOCPKT", 0x5420},
{"asm/termios.h", "TIOCPKT", 0x5420},
{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm/termios.h", "TIOCNOTTY", 0x5422},
{"asm/ioctls.h", "TIOCSETD", 0x5423},
{"asm/termios.h", "TIOCSETD", 0x5423},
{"asm/ioctls.h", "TIOCGETD", 0x5424},
{"asm/termios.h", "TIOCGETD", 0x5424},
{"asm/ioctls.h", "TCSBRKP", 0x5425},
{"asm/termios.h", "TCSBRKP", 0x5425},
{"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
{"asm/termios.h", "TIOCTTYGSTRUCT", 0x5426},
{"asm/ioctls.h", "TIOCSBRK", 0x5427},
{"asm/ioctls.h", "TIOCCBRK", 0x5428},
{"asm/ioctls.h", "TIOCGSID", 0x5429},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/termios.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/termios.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm/termios.h", "TIOCSERSWILD", 0x5455},
{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm/termios.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm/termios.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm/termios.h", "TIOCSERGSTRUCT", 0x5458},
{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm/termios.h", "TIOCSERGETLSR", 0x5459},
{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm/termios.h", "TIOCSERGETMULTI", 0x545a},
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm/termios.h", "TIOCSERSETMULTI", 0x545b},
{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm/termios.h", "TIOCMIWAIT", 0x545c},
{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm/termios.h", "TIOCGICOUNT", 0x545d},
{"linux/vt.h", "VT_OPENQRY", 0x5600},
{"linux/vt.h", "VT_GETMODE", 0x5601},
{"linux/vt.h", "VT_SETMODE", 0x5602},
{"linux/vt.h", "VT_GETSTATE", 0x5603},
{"linux/vt.h", "VT_SENDSIG", 0x5604},
{"linux/vt.h", "VT_RELDISP", 0x5605},
{"linux/vt.h", "VT_ACTIVATE", 0x5606},
{"linux/vt.h", "VT_WAITACTIVE", 0x5607},
{"linux/vt.h", "VT_DISALLOCATE", 0x5608},
{"linux/vt.h", "VT_RESIZE", 0x5609},
{"linux/vt.h", "VT_RESIZEX", 0x560a},
{"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
{"asm/socket.h", "FIOSETOWN", 0x8901},
{"asm/sockios.h", "FIOSETOWN", 0x8901},
{"asm/socket.h", "SIOCSPGRP", 0x8902},
{"asm/sockios.h", "SIOCSPGRP", 0x8902},
{"asm/socket.h", "FIOGETOWN", 0x8903},
{"asm/sockios.h", "FIOGETOWN", 0x8903},
{"asm/socket.h", "SIOCGPGRP", 0x8904},
{"asm/sockios.h", "SIOCGPGRP", 0x8904},
{"asm/socket.h", "SIOCATMARK", 0x8905},
{"asm/sockios.h", "SIOCATMARK", 0x8905},
{"asm/socket.h", "SIOCGSTAMP", 0x8906},
{"asm/sockios.h", "SIOCGSTAMP", 0x8906},
{"linux/sockios.h", "SIOCADDRT", 0x890b},
{"linux/sockios.h", "SIOCDELRT", 0x890c},
{"linux/sockios.h", "SIOCRTMSG", 0x890d},
{"linux/sockios.h", "SIOCGIFNAME", 0x8910},
{"linux/sockios.h", "SIOCSIFLINK", 0x8911},
{"linux/sockios.h", "SIOCGIFCONF", 0x8912},
{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
{"linux/sockios.h", "SIOCGIFADDR", 0x8915},
{"linux/sockios.h", "SIOCSIFADDR", 0x8916},
{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
{"linux/sockios.h", "SIOCGIFMEM", 0x891f},
{"linux/sockios.h", "SIOCSIFMEM", 0x8920},
{"linux/sockios.h", "SIOCGIFMTU", 0x8921},
{"linux/sockios.h", "SIOCSIFMTU", 0x8922},
{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
{"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
{"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
{"linux/sockios.h", "SIOCADDMULTI", 0x8931},
{"linux/sockios.h", "SIOCDELMULTI", 0x8932},
{"linux/sockios.h", "SIOCGIFINDEX", 0x8933},
{"linux/sockios.h", "SIOCSIFPFLAGS", 0x8934},
{"linux/sockios.h", "SIOCGIFPFLAGS", 0x8935},
{"linux/sockios.h", "SIOCDIFADDR", 0x8936},
{"linux/sockios.h", "SIOCSIFHWBROADCAST", 0x8937},
{"linux/sockios.h", "SIOCGIFCOUNT", 0x8938},
{"linux/sockios.h", "SIOCGIFBR", 0x8940},
{"linux/sockios.h", "SIOCSIFBR", 0x8941},
{"linux/sockios.h", "SIOCGIFTXQLEN", 0x8942},
{"linux/sockios.h", "SIOCSIFTXQLEN", 0x8943},
{"linux/sockios.h", "SIOCDARP", 0x8953},
{"linux/sockios.h", "SIOCGARP", 0x8954},
{"linux/sockios.h", "SIOCSARP", 0x8955},
{"linux/sockios.h", "SIOCDRARP", 0x8960},
{"linux/sockios.h", "SIOCGRARP", 0x8961},
{"linux/sockios.h", "SIOCSRARP", 0x8962},
{"linux/sockios.h", "SIOCGIFMAP", 0x8970},
{"linux/sockios.h", "SIOCSIFMAP", 0x8971},
{"linux/sockios.h", "SIOCADDDLCI", 0x8980},
{"linux/sockios.h", "SIOCDELDLCI", 0x8981},
{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
{"linux/elf.h", "EM_ALPHA", 0x9026},
{"linux/cyclades.h", "CYGETMON", 0x435901},
{"linux/cyclades.h", "CYGETTHRESH", 0x435902},
{"linux/cyclades.h", "CYSETTHRESH", 0x435903},
{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904},
{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905},
{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906},
{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907},
{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908},
{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909},
{"linux/cyclades.h", "CYSETRFLOW", 0x43590a},
{"linux/cyclades.h", "CYGETRFLOW", 0x43590b},
{"linux/cyclades.h", "CYSETRTSDTR_INV", 0x43590c},
{"linux/cyclades.h", "CYGETRTSDTR_INV", 0x43590d},
{"linux/cyclades.h", "CYZPOLLCYCLE", 0x43590e},
{"linux/cyclades.h", "CYGETCD1400VER", 0x43590f},
{"linux/cyclades.h", "CYGETCARDINFO", 0x435910},
{"linux/cyclades.h", "CYSETWAIT", 0x435911},
{"linux/cyclades.h", "CYGETWAIT", 0x435912},
{"linux/fs.h", "FIBMAP", 0x20000001},
{"linux/fs.h", "FIGETBSZ", 0x20000002},
{"linux/fd.h", "FDCLRPRM", 0x20000241},
{"linux/fd.h", "FDMSGON", 0x20000245},
{"linux/fd.h", "FDMSGOFF", 0x20000246},
{"linux/fd.h", "FDFMTBEG", 0x20000247},
{"linux/fd.h", "FDFMTEND", 0x20000249},
{"linux/fd.h", "FDSETEMSGTRESH", 0x2000024a},
{"linux/fd.h", "FDFLUSH", 0x2000024b},
{"linux/fd.h", "FDRESET", 0x20000254},
{"linux/fd.h", "FDWERRORCLR", 0x20000256},
{"linux/fd.h", "FDRAWCMD", 0x20000258},
{"linux/fd.h", "FDTWADDLE", 0x20000259},
{"linux/fd.h", "FDEJECT", 0x2000025a},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_DOS", 0x200004d2},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_DOS", 0x200004d3},
{"linux/umsdos_fs.h", "UMSDOS_RMDIR_DOS", 0x200004d4},
{"linux/umsdos_fs.h", "UMSDOS_STAT_DOS", 0x200004d5},
{"linux/umsdos_fs.h", "UMSDOS_CREAT_EMD", 0x200004d6},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_EMD", 0x200004d7},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_EMD", 0x200004d8},
{"linux/umsdos_fs.h", "UMSDOS_GETVERSION", 0x200004d9},
{"linux/umsdos_fs.h", "UMSDOS_INIT_EMD", 0x200004da},
{"linux/umsdos_fs.h", "UMSDOS_DOS_SETUP", 0x200004db},
{"linux/umsdos_fs.h", "UMSDOS_RENAME_DOS", 0x200004dc},
{"linux/md.h", "REGISTER_DEV", 0x20000901},
{"linux/md.h", "START_MD", 0x20000902},
{"linux/md.h", "STOP_MD", 0x20000903},
{"linux/md.h", "REGISTER_DEV_NEW", 0x20000904},
{"linux/fs.h", "BLKROSET", 0x2000125d},
{"linux/fs.h", "BLKROGET", 0x2000125e},
{"linux/fs.h", "BLKRRPART", 0x2000125f},
{"linux/fs.h", "BLKGETSIZE", 0x20001260},
{"linux/fs.h", "BLKFLSBUF", 0x20001261},
{"linux/fs.h", "BLKRASET", 0x20001262},
{"linux/fs.h", "BLKRAGET", 0x20001263},
{"linux/fs.h", "BLKFRASET", 0x20001264},
{"linux/fs.h", "BLKFRAGET", 0x20001265},
{"linux/fs.h", "BLKSECTSET", 0x20001266},
{"linux/fs.h", "BLKSECTGET", 0x20001267},
{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x20004101},
{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x20004102},
{"asm/pmu.h", "PMU_IOC_SLEEP", 0x20004200},
{"linux/hfmodem.h", "HFMODEM_IOCTL_CLEARRQ", 0x20004803},
{"linux/hfmodem.h", "HFMODEM_IOCTL_SAMPLEFINISHED", 0x20004808},
{"linux/isdn.h", "IIOCNETAIF", 0x20004901},
{"linux/isdn.h", "IIOCNETDIF", 0x20004902},
{"linux/isdn.h", "IIOCNETSCF", 0x20004903},
{"linux/isdn.h", "IIOCNETGCF", 0x20004904},
{"linux/isdn.h", "IIOCNETANM", 0x20004905},
{"linux/isdn.h", "IIOCNETDNM", 0x20004906},
{"linux/isdn.h", "IIOCNETGNM", 0x20004907},
{"linux/isdn.h", "IIOCGETSET", 0x20004908},
{"linux/isdn.h", "IIOCSETSET", 0x20004909},
{"linux/isdn.h", "IIOCSETVER", 0x2000490a},
{"linux/isdn.h", "IIOCNETHUP", 0x2000490b},
{"linux/isdn.h", "IIOCSETGST", 0x2000490c},
{"linux/isdn.h", "IIOCSETBRJ", 0x2000490d},
{"linux/isdn.h", "IIOCSIGPRF", 0x2000490e},
{"linux/isdn.h", "IIOCGETPRF", 0x2000490f},
{"linux/isdn.h", "IIOCSETPRF", 0x20004910},
{"linux/isdn.h", "IIOCGETMAP", 0x20004911},
{"linux/isdn.h", "IIOCSETMAP", 0x20004912},
{"linux/isdn.h", "IIOCNETASL", 0x20004913},
{"linux/isdn.h", "IIOCNETDIL", 0x20004914},
{"linux/isdn.h", "IIOCGETCPS", 0x20004915},
{"linux/isdn.h", "IIOCGETDVR", 0x20004916},
{"linux/isdn.h", "IIOCNETALN", 0x20004920},
{"linux/isdn.h", "IIOCNETDLN", 0x20004921},
{"linux/isdn.h", "IIOCDBGVAR", 0x2000497f},
{"linux/isdn.h", "IIOCDRVCTL", 0x20004980},
{"linux/random.h", "RNDZAPENTCNT", 0x20005204},
{"linux/random.h", "RNDCLEARPOOL", 0x20005206},
{"linux/comstats.h", "COM_GETPORTSTATS", 0x2000631e},
{"linux/comstats.h", "COM_CLRPORTSTATS", 0x2000631f},
{"linux/comstats.h", "COM_GETBRDSTATS", 0x20006320},
{"linux/comstats.h", "COM_READPORT", 0x20006328},
{"linux/comstats.h", "COM_READBOARD", 0x20006329},
{"linux/comstats.h", "COM_READPANEL", 0x2000632a},
{"asm/ioctls.h", "FIOCLEX", 0x20006601},
{"asm/termios.h", "FIOCLEX", 0x20006601},
{"asm/ioctls.h", "FIONCLEX", 0x20006602},
{"asm/termios.h", "FIONCLEX", 0x20006602},
{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x20006e03},
{"linux/mc146818rtc.h", "RTC_AIE_ON", 0x20007001},
{"linux/mc146818rtc.h", "RTC_AIE_OFF", 0x20007002},
{"linux/mc146818rtc.h", "RTC_UIE_ON", 0x20007003},
{"linux/mc146818rtc.h", "RTC_UIE_OFF", 0x20007004},
{"linux/mc146818rtc.h", "RTC_PIE_ON", 0x20007005},
{"linux/mc146818rtc.h", "RTC_PIE_OFF", 0x20007006},
{"linux/nvram.h", "NVRAM_INIT", 0x20007040},
{"linux/nvram.h", "NVRAM_SETCKS", 0x20007041},
{"linux/cdk.h", "STL_BINTR", 0x20007314},
{"linux/cdk.h", "STL_BSTART", 0x20007315},
{"linux/cdk.h", "STL_BSTOP", 0x20007316},
{"linux/cdk.h", "STL_BRESET", 0x20007317},
{"linux/cdk.h", "STL_GETPFLAG", 0x20007350},
{"linux/cdk.h", "STL_SETPFLAG", 0x20007351},
{"asm/ioctls.h", "TCSBRK", 0x2000741d},
{"asm/termios.h", "TCSBRK", 0x2000741d},
{"asm/ioctls.h", "TCXONC", 0x2000741e},
{"asm/termios.h", "TCXONC", 0x2000741e},
{"asm/ioctls.h", "TCFLSH", 0x2000741f},
{"asm/termios.h", "TCFLSH", 0x2000741f},
{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x2000744e},
{"asm/ioctls.h", "TIOCSTART", 0x2000746e},
{"asm/termios.h", "TIOCSTART", 0x2000746e},
{"asm/ioctls.h", "TIOCSTOP", 0x2000746f},
{"asm/termios.h", "TIOCSTOP", 0x2000746f},
{"linux/videodev.h", "VIDIOCSYNC", 0x20007612},
{"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x20009360},
{"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x20009361},
{"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x20009362},
{"linux/nbd.h", "NBD_SET_SOCK", 0x2000ab00},
{"linux/nbd.h", "NBD_SET_BLKSIZE", 0x2000ab01},
{"linux/nbd.h", "NBD_SET_SIZE", 0x2000ab02},
{"linux/nbd.h", "NBD_DO_IT", 0x2000ab03},
{"linux/nbd.h", "NBD_CLEAR_SOCK", 0x2000ab04},
{"linux/nbd.h", "NBD_CLEAR_QUE", 0x2000ab05},
{"linux/nbd.h", "NBD_PRINT_DEBUG", 0x2000ab06},
{"linux/joystick.h", "JSIOCGAXES", 0x40016a11},
{"linux/joystick.h", "JSIOCGBUTTONS", 0x40016a12},
{"linux/capi.h", "CAPI_GET_ERRCODE", 0x40024321},
{"linux/capi.h", "CAPI_INSTALLED", 0x40024322},
{"linux/hfmodem.h", "HFMODEM_IOCTL_GETCURTIME", 0x40044804},
{"linux/hfmodem.h", "HFMODEM_IOCTL_WAITRQ", 0x40044805},
{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x40044d00},
{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x40044d01},
{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x40044d02},
{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x40044d03},
{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x40044d04},
{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x40044d05},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x40044d06},
{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x40044d07},
{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x40044d08},
{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x40044d09},
{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x40044d0a},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x40044d0b},
{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x40044d0c},
{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x40044d0d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x40044d0e},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x40044d0f},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x40044d10},
{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x40044d1f},
{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x40044d1f},
{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x40044d1f},
{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x40044dfb},
{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x40044dfc},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x40044dfd},
{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x40044dfe},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x40044dff},
{"linux/random.h", "RNDGETENTCNT", 0x40045200},
{"asm/ioctls.h", "TIOCGPTN", 0x40045430},
{"linux/watchdog.h", "WDIOC_GETSTATUS", 0x40045701},
{"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x40045702},
{"linux/watchdog.h", "WDIOC_GETTEMP", 0x40045703},
{"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x40045704},
{"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x40045705},
{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x40046601},
{"asm/ioctls.h", "FIONREAD", 0x4004667f},
{"asm/termios.h", "FIONREAD", 0x4004667f},
{"linux/joystick.h", "JSIOCGVERSION", 0x40046a01},
{"linux/mtio.h", "MTIOCPOS", 0x40046d03},
{"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x40046e06},
{"linux/mc146818rtc.h", "RTC_IRQP_READ", 0x4004700b},
{"linux/mc146818rtc.h", "RTC_EPOCH_READ", 0x4004700d},
{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x40047441},
{"linux/if_ppp.h", "PPPIOCGMRU", 0x40047453},
{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x40047455},
{"linux/if_ppp.h", "PPPIOCGUNIT", 0x40047456},
{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x40047458},
{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x4004745a},
{"asm/ioctls.h", "TIOCOUTQ", 0x40047473},
{"asm/termios.h", "TIOCOUTQ", 0x40047473},
{"asm/ioctls.h", "TIOCGPGRP", 0x40047477},
{"asm/termios.h", "TIOCGPGRP", 0x40047477},
{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x40047482},
{"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x40047486},
{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x40047501},
{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x40047601},
{"linux/videodev.h", "VIDIOCGFREQ", 0x4004760e},
{"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x40049363},
{"asm/ioctls.h", "TIOCGETP", 0x40067408},
{"asm/termios.h", "TIOCGETP", 0x40067408},
{"asm/ioctls.h", "TIOCGETC", 0x40067412},
{"asm/termios.h", "TIOCGETC", 0x40067412},
{"asm/ioctls.h", "TIOCGLTC", 0x40067474},
{"asm/termios.h", "TIOCGLTC", 0x40067474},
{"linux/random.h", "RNDGETPOOL", 0x40085202},
{"linux/mtio.h", "MTIOCGETSIZE", 0x40086d09},
{"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x40086e0a},
{"linux/if_ppp.h", "PPPIOCGIDLE", 0x4008743f},
{"asm/ioctls.h", "TIOCGWINSZ", 0x40087468},
{"asm/termios.h", "TIOCGWINSZ", 0x40087468},
{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x400c6e01},
{"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x400c6e08},
{"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x400c6e09},
{"linux/videodev.h", "VIDIOCKEY", 0x400c760d},
{"linux/videodev.h", "VIDIOCGPICT", 0x400e7606},
{"linux/fd.h", "FDGETDRVTYP", 0x4010020f},
{"linux/fd.h", "FDGETMAXERRS", 0x4014020e},
{"linux/mtio.h", "MTIOCVOLINFO", 0x40146d08},
{"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x40146e07},
{"asm/ioctls.h", "TCGETA", 0x40147417},
{"asm/termios.h", "TCGETA", 0x40147417},
{"linux/videodev.h", "VIDIOCGFBUF", 0x4014760b},
{"linux/fd.h", "FDWERRORGET", 0x40180217},
{"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x40186e05},
{"linux/fd.h", "FDGETPRM", 0x401c0204},
{"linux/mtio.h", "MTIOCGET", 0x401c6d02},
{"linux/fd.h", "FDGETFDCSTAT", 0x40200215},
{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x40207450},
{"linux/videodev.h", "VIDIOCGWIN", 0x40207609},
{"linux/mc146818rtc.h", "RTC_ALM_READ", 0x40247008},
{"linux/mc146818rtc.h", "RTC_RD_TIME", 0x40247009},
{"linux/videodev.h", "VIDIOCGAUDIO", 0x40247610},
{"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x40285700},
{"asm/ioctls.h", "TCGETS", 0x402c7413},
{"asm/termios.h", "TCGETS", 0x402c7413},
{"linux/fd.h", "FDGETDRVSTAT", 0x40340212},
{"linux/fd.h", "FDPOLLDRVSTAT", 0x40340213},
{"linux/videodev.h", "VIDIOCGCAP", 0x403c7601},
{"linux/fd.h", "FDGETDRVPRM", 0x40580211},
{"linux/joystick.h", "JSIOCGCORR", 0x40906a22},
{"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x410c9365},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x42187201},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x42187202},
{"linux/random.h", "RNDADDTOENTCNT", 0x80045201},
{"asm/ioctls.h", "TIOCSPTLCK", 0x80045431},
{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x80046602},
{"asm/ioctls.h", "FIOASYNC", 0x8004667d},
{"asm/termios.h", "FIOASYNC", 0x8004667d},
{"asm/ioctls.h", "FIONBIO", 0x8004667e},
{"asm/termios.h", "FIONBIO", 0x8004667e},
{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x80046e02},
{"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x80046e06},
{"linux/mc146818rtc.h", "RTC_IRQP_SET", 0x8004700c},
{"linux/mc146818rtc.h", "RTC_EPOCH_SET", 0x8004700e},
{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x80047440},
{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x80047451},
{"linux/if_ppp.h", "PPPIOCSMRU", 0x80047452},
{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x80047454},
{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x80047457},
{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x80047459},
{"asm/ioctls.h", "TIOCSPGRP", 0x80047476},
{"asm/termios.h", "TIOCSPGRP", 0x80047476},
{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x80047481},
{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x80047483},
{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x80047484},
{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x80047485},
{"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x80047487},
{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x80047602},
{"linux/videodev.h", "VIDIOCSCHAN", 0x80047603},
{"linux/videodev.h", "VIDIOCCAPTURE", 0x80047608},
{"linux/videodev.h", "VIDIOCSFREQ", 0x8004760f},
{"asm/ioctls.h", "TIOCSETP", 0x80067409},
{"asm/termios.h", "TIOCSETP", 0x80067409},
{"asm/ioctls.h", "TIOCSETN", 0x8006740a},
{"asm/termios.h", "TIOCSETN", 0x8006740a},
{"asm/ioctls.h", "TIOCSETC", 0x80067411},
{"asm/termios.h", "TIOCSETC", 0x80067411},
{"asm/ioctls.h", "TIOCSLTC", 0x80067475},
{"asm/termios.h", "TIOCSLTC", 0x80067475},
{"linux/hfmodem.h", "HFMODEM_IOCTL_SAMPLESTART", 0x80084807},
{"linux/random.h", "RNDADDENTROPY", 0x80085203},
{"linux/mtio.h", "MTIOCTOP", 0x80086d01},
{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x8008744b},
{"asm/ioctls.h", "TIOCSWINSZ", 0x80087467},
{"asm/termios.h", "TIOCSWINSZ", 0x80087467},
{"linux/fd.h", "FDFMTTRK", 0x800c0248},
{"linux/capi.h", "CAPI_REGISTER", 0x800c4301},
{"linux/hfmodem.h", "HFMODEM_IOCTL_MIXERPARAMS", 0x800c4806},
{"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x800c6e08},
{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x800c744d},
{"linux/videodev.h", "VIDIOCSPICT", 0x800e7607},
{"linux/videodev.h", "VIDIOCMCAPTURE", 0x80107613},
{"linux/fd.h", "FDSETMAXERRS", 0x8014024c},
{"asm/ioctls.h", "TCSETA", 0x80147418},
{"asm/termios.h", "TCSETA", 0x80147418},
{"asm/ioctls.h", "TCSETAW", 0x80147419},
{"asm/termios.h", "TCSETAW", 0x80147419},
{"asm/ioctls.h", "TCSETAF", 0x8014741c},
{"asm/termios.h", "TCSETAF", 0x8014741c},
{"linux/videodev.h", "VIDIOCSFBUF", 0x8014760c},
{"linux/fd.h", "FDSETPRM", 0x801c0242},
{"linux/fd.h", "FDDEFPRM", 0x801c0243},
{"linux/hfmodem.h", "HFMODEM_IOCTL_FSKTXREQUEST", 0x80204800},
{"linux/hfmodem.h", "HFMODEM_IOCTL_FSKRXREQUEST", 0x80204801},
{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x8020744f},
{"linux/videodev.h", "VIDIOCSWIN", 0x8020760a},
{"linux/mc146818rtc.h", "RTC_ALM_SET", 0x80247007},
{"linux/mc146818rtc.h", "RTC_SET_TIME", 0x8024700a},
{"linux/videodev.h", "VIDIOCSAUDIO", 0x80247611},
{"asm/ioctls.h", "TCSETS", 0x802c7414},
{"asm/termios.h", "TCSETS", 0x802c7414},
{"asm/ioctls.h", "TCSETSW", 0x802c7415},
{"asm/termios.h", "TCSETSW", 0x802c7415},
{"asm/ioctls.h", "TCSETSF", 0x802c7416},
{"asm/termios.h", "TCSETSF", 0x802c7416},
{"linux/smb_fs.h", "SMB_IOC_NEWCONN", 0x802c7502},
{"linux/videodev.h", "VIDIOCSTUNER", 0x80347605},
{"linux/fd.h", "FDSETDRVPRM", 0x80580290},
{"linux/joystick.h", "JSIOCSCORR", 0x80906a21},
{"linux/capi.h", "CAPI_GET_MANUFACTURER", 0xc0044306},
{"linux/capi.h", "CAPI_GET_SERIAL", 0xc0044308},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff},
{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0xc0049364},
{"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0xc0084320},
{"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0xc0086e0a},
{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c},
{"linux/mtio.h", "MTIOCFTFORMAT", 0xc00c6d0a},
{"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0xc00c6e09},
{"linux/capi.h", "CAPI_GET_VERSION", 0xc0104307},
{"linux/mtio.h", "MTIOCRDFTSEG", 0xc0106d06},
{"linux/mtio.h", "MTIOCWRFTSEG", 0xc0106d07},
{"linux/mtio.h", "MTIOCFTCMD", 0xc0206d0b},
{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0286e04},
{"linux/videodev.h", "VIDIOCGCHAN", 0xc0307602},
{"linux/videodev.h", "VIDIOCGTUNER", 0xc0347604},
{"linux/capi.h", "CAPI_GET_PROFILE", 0xc0404309},
{"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0xc0887480},

98
linux/powerpc/ioctlent.sh Normal file
View File

@ -0,0 +1,98 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
# All rights reserved.
#
# Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
# 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$
# Files to find.
file_find='asm/*.h linux/*.h scsi/*.h'
# Files to stop.
file_stop='asm/byteorder.h linux/config.h linux/pci.h linux/xd.h'
# Defs to find.
# Work on the kernel source to convert all to df_iowr.
# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h.
df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+'
df_iowr='_IO|_IOR|_IOW|_IOWR'
df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]'
df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h
df_470N='470[0-9]' # linux/fs.h (only in 1.2.13)
df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h
df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13)
df_tail='([() ]|$)'
def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail"
# Defs to stop.
ds_tail='_MAGIC|_PATCH'
ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13)
ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13)
def_stop="$ds_tail|$ds_fdmp|$ds_mtio"
# Validate arg count.
if [ $# -ne 1 ]
then
echo "usage: $0 include-directory" >&2
exit 1
fi
# Grep through the files.
(
# Construct list: find files minus stop files.
cd $1 || exit
file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u`
# Grep matching #define lines.
# Transform to C structure form.
# Filter out stop list.
egrep "$def_find" $file_list |
sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' |
egrep -v "$def_stop"
) > ioctlent.tmp
# Generate the output file.
echo '/* This file is automatically generated by ioctlent.sh */'
echo
echo '#include <sys/types.h>'
echo
echo '/* Needed for <linux/baycom.h> */'
echo '#define BAYCOM_DEBUG'
echo
echo '/* Needed for <linux/cyclades.h> */'
echo '#include <linux/termios.h>'
echo '#include <linux/tqueue.h>'
echo
awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u
echo
echo 'struct ioctlent ioctlent [] ='
echo '{'
cat ioctlent.tmp
echo '};'
# Clean up.
rm -f ioctlent.tmp

32
linux/powerpc/signalent.h Normal file
View File

@ -0,0 +1,32 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGBUS", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGUSR1", /* 10 */
"SIGSEGV", /* 11 */
"SIGUSR2", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGSTKFLT", /* 16 */
"SIGCHLD", /* 17 */
"SIGCONT", /* 18 */
"SIGSTOP", /* 19 */
"SIGTSTP", /* 20 */
"SIGTTIN", /* 21 */
"SIGTTOU", /* 22 */
"SIGURG", /* 23 */
"SIGXCPU", /* 24 */
"SIGXFSZ", /* 25 */
"SIGVTALRM", /* 26 */
"SIGPROF", /* 27 */
"SIGWINCH", /* 28 */
"SIGIO", /* 29 */
"SIGPWR", /* 30 */
"SIGUNUSED", /* 31 */

338
linux/powerpc/syscallent.h Normal file
View File

@ -0,0 +1,338 @@
/*
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
{ 5, 0, printargs, "SYS_0" }, /* 0 */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TF, sys_read, "read" }, /* 3 */
{ 3, TF, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 3, TP, printargs, "waitpid" }, /* 7 */
{ 2, TF, printargs, "creat" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 3, TF|TP, sys_execve, "execve" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, 0, sys_time, "time" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, printargs, "lchown" }, /* 16 */
{ 5, 0, printargs, "break" }, /* 17 */
{ 2, TF, sys_stat, "oldstat" }, /* 18 */
{ 3, TF, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 5, TF, sys_mount, "mount" }, /* 21 */
{ 1, 0, sys_umount, "umount" }, /* 22 */
{ 1, 0, sys_setuid, "setuid" }, /* 23 */
{ 0, 0, sys_getuid, "getuid" }, /* 24 */
{ 1, 0, sys_stime, "stime" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 5, 0, printargs, "alarm" }, /* 27 */
{ 2, 0, sys_fstat, "oldfstat" }, /* 28 */
{ 0, 0, printargs, "pause" }, /* 29 */
{ 2, 0, sys_utimes, "utime" }, /* 30 */
{ 5, 0, printargs, "stty" }, /* 31 */
{ 5, 0, printargs, "gtty" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
{ 5, 0, printargs, "nice" }, /* 34 */
{ 5, 0, printargs, "ftime" }, /* 35 */
{ 0, 0, sys_sync, "sync" }, /* 36 */
{ 2, TS, sys_kill, "kill" }, /* 37 */
{ 2, TF, sys_rename, "rename" }, /* 38 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 39 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 40 */
{ 1, 0, sys_dup, "dup" }, /* 41 */
{ 1, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 5, 0, printargs, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, 0, printargs, "getgid" }, /* 47 */
{ 5, 0, printargs, "signal" }, /* 48 */
{ 0, 0, printargs, "geteuid" }, /* 49 */
{ 0, 0, printargs, "getegid" }, /* 50 */
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 2, 0, printargs, "umount2" }, /* 52 */
{ 5, 0, printargs, "lock" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 55 */
{ 5, 0, printargs, "mpx" }, /* 56 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 57 */
{ 2, 0, printargs, "ulimit" }, /* 58 */
{ 1, 0, printargs, "oldolduname" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_ustat, "ustat" }, /* 62 */
{ 2, 0, sys_dup2, "dup2" }, /* 63 */
{ 0, 0, printargs, "getppid" }, /* 64 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 5, 0, printargs, "sgetmask" }, /* 68 */
{ 5, 0, printargs, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 73 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 74 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 77 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 80 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 81 */
{ 5, 0, sys_select, "select" }, /* 82 */
{ 2, TF, sys_symlink, "symlink" }, /* 83 */
{ 2, TF, sys_lstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, 0, sys_uselib, "uselib" }, /* 86 */
{ 1, 0, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 1, 0, printargs, "readdir" }, /* 89 */
{ 1, 0, sys_mmap, "mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 94 */
{ 3, 0, sys_fchown, "fchown" }, /* 95 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 96 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 97 */
{ 5, 0, printargs, "profil" }, /* 98 */
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
{ 5, 0, printargs, "ioperm" }, /* 101 */
{ 5, 0, printargs, "socketcall" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
{ 2, TF, sys_stat, "stat" }, /* 106 */
{ 2, TF, sys_lstat, "lstat" }, /* 107 */
{ 2, 0, sys_fstat, "fstat" }, /* 108 */
{ 1, 0, printargs, "olduname" }, /* 109 */
{ 5, 0, printargs, "iopl" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
{ 0, 0, sys_idle, "idle" }, /* 112 */
{ 5, 0, printargs, "vm86" }, /* 113 */
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, 0, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 5, 0, printargs, "ipc" }, /* 117 */
{ 1, 0, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 2, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 5, 0, printargs, "modify_ldt" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 4, 0, sys_init_module, "init_module" }, /* 128 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 5, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, 0, sys_setfsuid, "setfsuid" }, /* 138 */
{ 1, 0, sys_setfsgid, "setfsgid" }, /* 139 */
{ 5, TF, printargs, "_llseek" }, /* 140 */
{ 3, 0, sys_getdents, "getdents" }, /* 141 */
{ 5, 0, printargs, "_newselect" }, /* 142 */
{ 2, 0, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, 0, sys_readv, "readv" }, /* 145 */
{ 3, 0, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 5, 0, printargs, "fdatasync" }, /* 148 */
{ 5, 0, printargs, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 1, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 1, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, 0, sys_sched_setparam, "sched_setparam" }, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 156 */
{ 2, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */
{ 5, 0, printargs, "SYS_189" }, /* 159 */
{ 5, 0, printargs, "SYS_189" }, /* 160 */
{ 5, 0, printargs, "SYS_189" }, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, printargs, "mremap" }, /* 163 */
{ 3, 0, printargs, "setresuid" }, /* 164 */
{ 3, 0, printargs, "getresuid" }, /* 165 */
{ 5, 0, sys_query_module, "query_module" }, /* 166 */
{ 5, 0, printargs, "poll" }, /* 167 */
{ 5, 0, printargs, "nfsservctl" }, /* 168 */
{ 3, 0, printargs, "setresgid" }, /* 169 */
{ 3, 0, printargs, "getresgid" }, /* 170 */
{ 5, 0, printargs, "prctl" }, /* 171 */
{ 1, 0, printargs, "rt_sigreturn" }, /* 172 */
{ 4, 0, printargs, "rt_sigaction" }, /* 173 */
{ 4, 0, printargs, "rt_sigprocmask" }, /* 174 */
{ 2, 0, printargs, "rt_sigpending" }, /* 175 */
{ 4, 0, printargs, "rt_sigtimedwait" }, /* 176 */
{ 3, 0, printargs, "rt_sigqueueinfo" }, /* 177 */
{ 2, 0, printargs, "rt_sigsuspend" }, /* 178 */
{ 5, 0, printargs, "pread" }, /* 179 */
{ 5, 0, printargs, "pwrite" }, /* 180 */
{ 3, TF, sys_chown, "chown" }, /* 181 */
{ 5, 0, printargs, "getcwd" }, /* 182 */
{ 2, 0, sys_capget, "capget" }, /* 183 */
{ 2, 0, sys_capset, "capset" }, /* 184 */
{ 3, 0, printargs, "sigaltstack" }, /* 185 */
{ 5, 0, printargs, "sendfile" }, /* 186 */
{ 5, 0, printargs, "streams1" }, /* 187 */
{ 5, 0, printargs, "streams2" }, /* 188 */
{ 5, 0, printargs, "SYS_189" }, /* 189 */
{ 5, 0, printargs, "SYS_190" }, /* 190 */
{ 5, 0, printargs, "SYS_191" }, /* 191 */
{ 5, 0, printargs, "SYS_192" }, /* 192 */
{ 5, 0, printargs, "SYS_193" }, /* 193 */
{ 5, 0, printargs, "SYS_194" }, /* 194 */
{ 5, 0, printargs, "SYS_195" }, /* 195 */
{ 5, 0, printargs, "SYS_196" }, /* 196 */
{ 5, 0, printargs, "SYS_197" }, /* 197 */
{ 5, 0, printargs, "SYS_198" }, /* 198 */
{ 5, 0, printargs, "SYS_199" }, /* 199 */
{ 5, 0, printargs, "SYS_200" }, /* 200 */
{ 5, 0, printargs, "SYS_201" }, /* 201 */
{ 5, 0, printargs, "SYS_202" }, /* 202 */
{ 5, 0, printargs, "SYS_203" }, /* 203 */
{ 5, 0, printargs, "SYS_204" }, /* 204 */
{ 5, 0, printargs, "SYS_205" }, /* 205 */
{ 5, 0, printargs, "SYS_206" }, /* 206 */
{ 5, 0, printargs, "SYS_207" }, /* 207 */
{ 5, 0, printargs, "SYS_208" }, /* 208 */
{ 5, 0, printargs, "SYS_209" }, /* 209 */
{ 5, 0, printargs, "SYS_210" }, /* 210 */
{ 5, 0, printargs, "SYS_211" }, /* 211 */
{ 5, 0, printargs, "SYS_212" }, /* 212 */
{ 5, 0, printargs, "SYS_213" }, /* 213 */
{ 5, 0, printargs, "SYS_214" }, /* 214 */
{ 5, 0, printargs, "SYS_215" }, /* 215 */
{ 5, 0, printargs, "SYS_216" }, /* 216 */
{ 5, 0, printargs, "SYS_217" }, /* 217 */
{ 5, 0, printargs, "SYS_218" }, /* 218 */
{ 5, 0, printargs, "SYS_219" }, /* 219 */
{ 5, 0, printargs, "SYS_220" }, /* 220 */
{ 5, 0, printargs, "SYS_221" }, /* 221 */
{ 5, 0, printargs, "SYS_222" }, /* 222 */
{ 5, 0, printargs, "SYS_223" }, /* 223 */
{ 5, 0, printargs, "SYS_224" }, /* 224 */
{ 5, 0, printargs, "SYS_225" }, /* 225 */
{ 5, 0, printargs, "SYS_226" }, /* 226 */
{ 5, 0, printargs, "SYS_227" }, /* 227 */
{ 5, 0, printargs, "SYS_228" }, /* 228 */
{ 5, 0, printargs, "SYS_229" }, /* 229 */
{ 5, 0, printargs, "SYS_230" }, /* 230 */
{ 5, 0, printargs, "SYS_231" }, /* 231 */
{ 5, 0, printargs, "SYS_232" }, /* 232 */
{ 5, 0, printargs, "SYS_233" }, /* 233 */
{ 5, 0, printargs, "SYS_234" }, /* 234 */
{ 5, 0, printargs, "SYS_235" }, /* 235 */
{ 5, 0, printargs, "SYS_236" }, /* 236 */
{ 5, 0, printargs, "SYS_237" }, /* 237 */
{ 5, 0, printargs, "SYS_238" }, /* 238 */
{ 5, 0, printargs, "SYS_239" }, /* 239 */
{ 5, 0, printargs, "SYS_240" }, /* 240 */
{ 5, 0, printargs, "SYS_241" }, /* 241 */
{ 5, 0, printargs, "SYS_242" }, /* 242 */
{ 5, 0, printargs, "SYS_243" }, /* 243 */
{ 5, 0, printargs, "SYS_244" }, /* 244 */
{ 5, 0, printargs, "SYS_245" }, /* 245 */
{ 5, 0, printargs, "SYS_246" }, /* 246 */
{ 5, 0, printargs, "SYS_247" }, /* 247 */
{ 5, 0, printargs, "SYS_248" }, /* 248 */
{ 5, 0, printargs, "SYS_249" }, /* 249 */
{ 5, 0, printargs, "SYS_250" }, /* 250 */
{ 5, 0, printargs, "SYS_251" }, /* 251 */
{ 5, 0, printargs, "SYS_252" }, /* 252 */
{ 5, 0, printargs, "SYS_253" }, /* 253 */
{ 5, 0, printargs, "SYS_254" }, /* 254 */
{ 5, 0, printargs, "SYS_255" }, /* 255 */
{ 8, 0, printargs, "socket_subcall"}, /* 256 */
{ 3, TN, sys_socket, "socket" }, /* 257 */
{ 3, TN, sys_bind, "bind" }, /* 258 */
{ 3, TN, sys_connect, "connect" }, /* 259 */
{ 2, TN, sys_listen, "listen" }, /* 260 */
{ 3, TN, sys_accept, "accept" }, /* 261 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 262 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 263 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 264 */
{ 4, TN, sys_send, "send" }, /* 265 */
{ 4, TN, sys_recv, "recv" }, /* 266 */
{ 6, TN, sys_sendto, "sendto" }, /* 267 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 268 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 269 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 270 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 271 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 272 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 273 */
{ 5, 0, printargs, "SYS_274" }, /* 274 */
{ 5, 0, printargs, "SYS_275" }, /* 275 */
{ 4, 0, printargs, "ipc_subcall" }, /* 276 */
{ 4, TI, printargs, "semop" }, /* 277 */
{ 4, TI, sys_semget, "semget" }, /* 278 */
{ 4, TI, sys_semctl, "semctl" }, /* 279 */
{ 4, 0, printargs, "ipc_subcall" }, /* 280 */
{ 4, 0, printargs, "ipc_subcall" }, /* 281 */
{ 4, 0, printargs, "ipc_subcall" }, /* 282 */
{ 4, 0, printargs, "ipc_subcall" }, /* 283 */
{ 4, 0, printargs, "ipc_subcall" }, /* 284 */
{ 4, 0, printargs, "ipc_subcall" }, /* 285 */
{ 4, 0, printargs, "ipc_subcall" }, /* 286 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 287 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 288 */
{ 4, TI, sys_msgget, "msgget" }, /* 289 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 290 */
{ 4, 0, printargs, "ipc_subcall" }, /* 291 */
{ 4, 0, printargs, "ipc_subcall" }, /* 292 */
{ 4, 0, printargs, "ipc_subcall" }, /* 293 */
{ 4, 0, printargs, "ipc_subcall" }, /* 294 */
{ 4, 0, printargs, "ipc_subcall" }, /* 295 */
{ 4, 0, printargs, "ipc_subcall" }, /* 296 */
{ 4, TI, sys_shmat, "shmat" }, /* 297 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 298 */
{ 4, TI, sys_shmget, "shmget" }, /* 299 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 300 */
{ 5, 0, printargs, "SYS_301" }, /* 301 */
{ 5, 0, printargs, "SYS_302" }, /* 302 */
{ 5, 0, printargs, "SYS_303" }, /* 303 */
{ 5, 0, printargs, "SYS_304" }, /* 304 */
{ 5, 0, printargs, "SYS_305" }, /* 305 */

View File

@ -0,0 +1,73 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
# 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$
cat $* |
sed -n 's/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p' |
sort +1n |
awk '
BEGIN {
tabs = "\t\t\t\t\t\t\t\t"
call = -1;
}
{
while (++call < $2) {
f = "printargs"
n = "SYS_" call
s = "\t{ -1,\t0,\t"
s = s f ","
s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
s = s "\"" n "\""
s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
s = s "}, /* " call " */"
print s
}
f = "sys_" $1
n = $1
s = "\t{ -1,\t0,\t"
s = s f ","
s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
s = s "\"" n "\""
s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
s = s "}, /* " call " */"
print s
}
END {
limit = call + 100
while (++call < limit) {
f = "printargs"
n = "SYS_" call
s = "\t{ -1,\t0,\t"
s = s f ","
s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
s = s "\"" n "\""
s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
s = s "}, /* " call " */"
print s
}
}
'

32
linux/signalent.h Normal file
View File

@ -0,0 +1,32 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGBUS", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGUSR1", /* 10 */
"SIGSEGV", /* 11 */
"SIGUSR2", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGSTKFLT", /* 16 */
"SIGCHLD", /* 17 */
"SIGCONT", /* 18 */
"SIGSTOP", /* 19 */
"SIGTSTP", /* 20 */
"SIGTTIN", /* 21 */
"SIGTTOU", /* 22 */
"SIGURG", /* 23 */
"SIGXCPU", /* 24 */
"SIGXFSZ", /* 25 */
"SIGVTALRM", /* 26 */
"SIGPROF", /* 27 */
"SIGWINCH", /* 28 */
"SIGIO", /* 29 */
"SIGPWR", /* 30 */
"SIGUNUSED", /* 31 */

57
linux/sparc/Makefile.in Normal file
View File

@ -0,0 +1,57 @@
#
# $Id$
#
srcdir = @srcdir@
VPATH = $(srcdir)
CC = @CC@
CPP = @CPP@
SHELL = /bin/sh
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = -g
LDFLAGS = -g
WARNFLAGS = @WARNFLAGS@
CPPFLAGS =
INCLUDES = -I. -I.. -I$(srcdir)/.. -I../.. -I$(srcdir)
includedir = @includedir@
all: ioctlent.h errnoent.h signalent.h syscallent.h
ioctlent.raw: ioctlent.sh
$(SHELL) $(srcdir)/ioctlent.sh $(includedir) >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort: ioctlsort.o
$(CC) $(LDFLAGS) ioctlsort.o -o ioctlsort
ioctlsort.o: ../../ioctlsort.c
$(CC) $(WARNFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $(srcdir)/../../ioctlsort.c
ioctlsort.o: ioctlent.raw
errnoent.h: ../../errnoent.sh $(includedir)/asm/errno.h
$(SHELL) $(srcdir)/../../errnoent.sh $(includedir)/asm/errno.h >$@
signalent.h: ../../signalent.sh $(includedir)/asm/signal.h
$(SHELL) $(srcdir)/../../signalent.sh $(includedir)/asm/signal.h >$@
#syscallent.h: ../../syscallent.sh $(includedir)/sys/syscall.h
syscallent.h:
$(SHELL) $(srcdir)/../../syscallent.sh $(includedir)/sys/syscall.h >$@
clean:
rm -f ioctlent.c *.raw *.tmp *.o ioctlsort
distclean: clean
rm -f Makefile
maintainer-clean: distclean
rm -f ioctlent.h errnoent.h signalent.h

282
linux/sparc/dummy2.h Normal file
View File

@ -0,0 +1,282 @@
/*
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
/* still unfinished */
#define solaris_sysmp printargs
#define solaris_sginap printargs
#define solaris_sgikopt printargs
#define solaris_sysmips printargs
#define solaris_sigreturn printargs
#define solaris_recvmsg printargs
#define solaris_sendmsg printargs
#define solaris_nfssvc printargs
#define solaris_getfh printargs
#define solaris_async_daemon printargs
#define solaris_exportfs printargs
#define solaris_BSD_getime printargs
#define solaris_sproc printargs
#define solaris_procblk printargs
#define solaris_sprocsp printargs
#define solaris_msync printargs
#define solaris_madvise printargs
#define solaris_pagelock printargs
#define solaris_quotactl printargs
#define solaris_cacheflush printargs
#define solaris_cachectl printargs
#define solaris_nuname printargs
#define solaris_sigpoll printargs
#define solaris_swapctl printargs
#define solaris_sigstack printargs
#define solaris_sigsendset printargs
#define solaris_priocntl printargs
#define solaris_ksigqueue printargs
#define solaris_lwp_sema_wait printargs
#define solaris_memcntl printargs
#define solaris_syscall printargs
#define solaris_clocal printargs
#define solaris_syssun printargs
#define solaris_sysi86 printargs
#define solaris_sysmachine printargs
#define solaris_plock printargs
#define solaris_pathconf printargs
#define solaris_sigtimedwait printargs
#define solaris_ulimit printargs
#define solaris_ptrace printargs
#define solaris_stty printargs
#define solaris_lwp_info printargs
#define solaris_priocntlsys printargs
#define solaris_hrtsys printargs
#define solaris_xenix printargs
#define solaris_statfs printargs
#define solaris_fstatfs printargs
#define solaris_statvfs printargs
#define solaris_fstatvfs printargs
#define solaris_fork1 printargs
#define solaris_sigsendsys printargs
#define solaris_gtty printargs
#define solaris_vtrace printargs
#define solaris_fpathconf printargs
#define solaris_evsys printargs
#define solaris_acct printargs
#define solaris_exec printargs
#define solaris_lwp_sema_post printargs
#define solaris_nfssys printargs
#define solaris_sigaltstack printargs
#define solaris_uadmin printargs
#define solaris_umount printargs
#define solaris_modctl printargs
#define solaris_acancel printargs
#define solaris_async printargs
#define solaris_evtrapret printargs
#define solaris_lwp_create printargs
#define solaris_lwp_exit printargs
#define solaris_lwp_suspend printargs
#define solaris_lwp_continue printargs
#define solaris_lwp_kill printargs
#define solaris_lwp_self printargs
#define solaris_lwp_setprivate printargs
#define solaris_lwp_getprivate printargs
#define solaris_lwp_wait printargs
#define solaris_lwp_mutex_unlock printargs
#define solaris_lwp_mutex_lock printargs
#define solaris_lwp_cond_wait printargs
#define solaris_lwp_cond_signal printargs
#define solaris_lwp_cond_broadcast printargs
#define solaris_llseek printargs
#define solaris_inst_sync printargs
#define solaris_auditsys printargs
#define solaris_processor_bind printargs
#define solaris_processor_info printargs
#define solaris_p_online printargs
#define solaris_sigqueue printargs
#define solaris_clock_gettime printargs
#define solaris_clock_settime printargs
#define solaris_clock_getres printargs
#define solaris_nanosleep printargs
#define solaris_timer_create printargs
#define solaris_timer_delete printargs
#define solaris_timer_settime printargs
#define solaris_timer_gettime printargs
#define solaris_timer_getoverrun printargs
#define solaris_signal printargs
#define solaris_sigset printargs
#define solaris_sighold printargs
#define solaris_sigrelse printargs
#define solaris_sigignore printargs
#define solaris_sigpause printargs
#define solaris_msgctl printargs
#define solaris_msgget printargs
#define solaris_msgrcv printargs
#define solaris_msgsnd printargs
#define solaris_shmat printargs
#define solaris_shmctl printargs
#define solaris_shmdt printargs
#define solaris_shmget printargs
#define solaris_semctl printargs
#define solaris_semget printargs
#define solaris_semop printargs
#define solaris_olduname printargs
#define solaris_ustat printargs
#define solaris_fusers printargs
#define solaris_sysfs1 printargs
#define solaris_sysfs2 printargs
#define solaris_sysfs3 printargs
/* like another call */
#define solaris_lchown solaris_chown
#define solaris_setuid solaris_close
#define solaris_seteuid solaris_close
#define solaris_setgid solaris_close
#define solaris_setegid solaris_close
#define solaris_vhangup solaris_close
#define solaris_fdsync solaris_close
#define solaris_sigfillset solaris_sigpending
#define solaris_vfork solaris_fork
#define solaris_ksigaction solaris_sigaction
#define solaris_BSDgetpgrp solaris_getpgrp
#define solaris_BSDsetpgrp solaris_setpgrp
#define solaris_waitsys solaris_waitid
/* printargs does the right thing */
#define solaris_sync printargs
#define solaris_profil printargs
#define solaris_yield printargs
#define solaris_pause printargs
#define solaris_sethostid printargs
/* subfunction entry points */
#define solaris_pgrpsys printargs
#define solaris_sigcall printargs
#define solaris_msgsys printargs
#define solaris_shmsys printargs
#define solaris_semsys printargs
#define solaris_utssys printargs
#define solaris_sysfs printargs
#define solaris_spcall printargs
#define solaris_context printargs
/* same as linux */
#define solaris_exit sys_exit
#define solaris_fork sys_fork
#define solaris_read sys_read
#define solaris_write sys_write
#define solaris_close sys_close
#define solaris_creat sys_creat
#define solaris_link sys_link
#define solaris_unlink sys_unlink
#define solaris_chdir sys_chdir
#define solaris_time sys_time
#define solaris_chmod sys_chmod
#define solaris_lseek sys_lseek
#define solaris_stime sys_stime
#define solaris_alarm sys_alarm
#define solaris_utime sys_utime
#define solaris_access sys_access
#define solaris_nice sys_nice
#define solaris_dup sys_dup
#define solaris_pipe sys_pipe
#define solaris_times sys_times
#define solaris_execve sys_execve
#define solaris_umask sys_umask
#define solaris_chroot sys_chroot
#define solaris_rmdir sys_rmdir
#define solaris_mkdir sys_mkdir
#define solaris_getdents sys_getdents
#define solaris_poll sys_poll
#define solaris_symlink sys_symlink
#define solaris_readlink sys_readlink
#define solaris_setgroups sys_setgroups
#define solaris_getgroups sys_getgroups
#define solaris_fchmod sys_fchmod
#define solaris_fchown sys_fchown
#define solaris_mprotect sys_mprotect
#define solaris_munmap sys_munmap
#define solaris_readv sys_readv
#define solaris_writev sys_writev
#define solaris_chown sys_chown
#define solaris_rename sys_rename
#define solaris_gettimeofday sys_gettimeofday
#define solaris_getitimer sys_getitimer
#define solaris_setitimer sys_setitimer
#define solaris_brk sys_brk
#define solaris_mmap sys_mmap
#define solaris_getsid sys_getsid
#define solaris_setsid sys_setsid
#define solaris_getpgid sys_getpgid
#define solaris_setpgid sys_setpgid
#define solaris_getpgrp sys_getpgrp
/* These are handled according to current_personality */
#define solaris_xstat sys_xstat
#define solaris_fxstat sys_fxstat
#define solaris_lxstat sys_lxstat
#define solaris_xmknod sys_xmknod
#define solaris_stat sys_stat
#define solaris_fstat sys_fstat
#define solaris_lstat sys_lstat
#define solaris_pread sys_pread
#define solaris_pwrite sys_pwrite
#define solaris_ioctl sys_ioctl
#define solaris_mknod sys_mknod
/* To be done */
#define solaris_mount printargs
#define solaris_sysinfo printargs
#define solaris_sysconfig printargs
#define solaris_getpmsg printargs
#define solaris_putpmsg printargs
#define solaris_wait printargs
#define solaris_waitid printargs
#define solaris_sigsuspend printargs
#define solaris_setpgrp printargs
#define solaris_getcontext printargs
#define solaris_setcontext printargs
#define solaris_getpid printargs
#define solaris_getuid printargs
#define solaris_kill printargs
#define solaris_getgid printargs
#define solaris_fcntl printargs
#define solaris_getmsg printargs
#define solaris_putmsg printargs
#define solaris_sigprocmask printargs
#define solaris_sigaction printargs
#define solaris_sigpending printargs
#define solaris_mincore printargs
#define solaris_fchdir printargs
#define solaris_setrlimit printargs
#define solaris_getrlimit printargs
#define solaris_uname printargs
#define solaris_adjtime printargs
#define solaris_fchroot printargs
#define solaris_utimes printargs
#if DONE
#define solaris_open printargs
#endif

125
linux/sparc/errnoent.h Normal file
View File

@ -0,0 +1,125 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EAGAIN", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"EWOULDBLOCK", /* 35 */
"EINPROGRESS", /* 36 */
"EALREADY", /* 37 */
"ENOTSOCK", /* 38 */
"EDESTADDRREQ", /* 39 */
"EMSGSIZE", /* 40 */
"EPROTOTYPE", /* 41 */
"ENOPROTOOPT", /* 42 */
"EPROTONOSUPPORT", /* 43 */
"ESOCKTNOSUPPORT", /* 44 */
"EOPNOTSUPP", /* 45 */
"EPFNOSUPPORT", /* 46 */
"EAFNOSUPPORT", /* 47 */
"EADDRINUSE", /* 48 */
"EADDRNOTAVAIL", /* 49 */
"ENETDOWN", /* 50 */
"ENETUNREACH", /* 51 */
"ENETRESET", /* 52 */
"ECONNABORTED", /* 53 */
"ECONNRESET", /* 54 */
"ENOBUFS", /* 55 */
"EISCONN", /* 56 */
"ENOTCONN", /* 57 */
"ESHUTDOWN", /* 58 */
"ETOOMANYREFS", /* 59 */
"ETIMEDOUT", /* 60 */
"ECONNREFUSED", /* 61 */
"ELOOP", /* 62 */
"ENAMETOOLONG", /* 63 */
"EHOSTDOWN", /* 64 */
"EHOSTUNREACH", /* 65 */
"ENOTEMPTY", /* 66 */
"EPROCLIM", /* 67 */
"EUSERS", /* 68 */
"EDQUOT", /* 69 */
"ESTALE", /* 70 */
"EREMOTE", /* 71 */
"ENOSTR", /* 72 */
"ETIME", /* 73 */
"ENOSR", /* 74 */
"ENOMSG", /* 75 */
"EBADMSG", /* 76 */
"EIDRM", /* 77 */
"EDEADLK", /* 78 */
"ENOLCK", /* 79 */
"ENONET", /* 80 */
"ERREMOTE", /* 81 */
"ENOLINK", /* 82 */
"EADV", /* 83 */
"ESRMNT", /* 84 */
"ECOMM", /* 85 */
"EPROTO", /* 86 */
"EMULTIHOP", /* 87 */
"EDOTDOT", /* 88 */
"EREMCHG", /* 89 */
"ENOSYS", /* 90 */
"ESTRPIPE", /* 91 */
"EOVERFLOW", /* 92 */
"EBADFD", /* 93 */
"ECHRNG", /* 94 */
"EL2NSYNC", /* 95 */
"EL3HLT", /* 96 */
"EL3RST", /* 97 */
"ELNRNG", /* 98 */
"EUNATCH", /* 99 */
"ENOCSI", /* 100 */
"EL2HLT", /* 101 */
"EBADE", /* 102 */
"EBADR", /* 103 */
"EXFULL", /* 104 */
"ENOANO", /* 105 */
"EBADRQC", /* 106 */
"EBADSLT", /* 107 */
"EDEADLOCK", /* 108 */
"EBFONT", /* 109 */
"ELIBEXEC", /* 110 */
"ENODATA", /* 111 */
"ELIBBAD", /* 112 */
"ENOPKG", /* 113 */
"ELIBACC", /* 114 */
"ENOTUNIQ", /* 115 */
"ERESTART", /* 116 */
"EUCLEAN", /* 117 */
"ENOTNAM", /* 118 */
"ENAVAIL", /* 119 */
"EISNAM", /* 120 */
"EREMOTEIO", /* 121 */
"EILSEQ", /* 122 */
"ELIBMAX", /* 123 */
"ELIBSCN", /* 124 */

1
linux/sparc/errnoent1.h Normal file
View File

@ -0,0 +1 @@
#include "../svr4/errnoent.h"

38
linux/sparc/gen.pl Normal file
View File

@ -0,0 +1,38 @@
open SPARC, "syscallent.h" || die "no puedo abrir el de la sparc";
open ALPHA, "../alpha/syscallent.h" || die "no puedo abrir el de la alpha";
open PC, "../syscallent.h" || die "no puedo abrir PC\n";
while (<SPARC>) {
chop;
($i1, $i2, $i3, $syscall, $syscall_name) = split;
$strn[$index] = $syscall_name;
$name[$index++] = $syscall;
}
while (<ALPHA>){
if (/\{/) {
($i1, $n, $pr, $syscall) = split;
$par{$syscall} = $n;
$prr{$syscall} = $pr;
}
}
while (<PC>){
if (/\{/) {
($i1, $n, $pr, $syscall) = split;
$par{$syscall} = $n;
$prr{$syscall} = $pr;
}
}
print "missing \n";
for ($i = 0; $i < $index; $i++){
$x = $name[$i];
$y = $strn[$i];
$n = $par{$x};
$p = $prr{$x};
$j++;
print "\t{ $n\t$p\t$x\t$y },\t /* $j */\n";
}

600
linux/sparc/ioctlent.h Normal file
View File

@ -0,0 +1,600 @@
{"asm/contregs.h", "AC_M_SFSR", 0x300},
{"linux/ip_fw.h", "IP_FW_TYPE", 0x300},
{"linux/quota.h", "Q_GETQUOTA", 0x300},
{"linux/hdreg.h", "HDIO_GETGEO", 0x301},
{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302},
{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304},
{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x307},
{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308},
{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309},
{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a},
{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b},
{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f},
{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321},
{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322},
{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323},
{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324},
{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325},
{"linux/hdreg.h", "HDIO_SET_DMA", 0x326},
{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327},
{"asm/contregs.h", "AC_M_AFAR", 0x600},
{"linux/quota.h", "Q_SYNC", 0x600},
{"linux/lp.h", "LPCHAR", 0x601},
{"linux/lp_m68k.h", "LPCHAR", 0x601},
{"linux/lp.h", "LPTIME", 0x602},
{"linux/lp_m68k.h", "LPTIME", 0x602},
{"linux/lp.h", "LPABORT", 0x604},
{"linux/lp_m68k.h", "LPABORT", 0x604},
{"linux/lp.h", "LPSETIRQ", 0x605},
{"linux/lp_m68k.h", "LPSETIRQ", 0x605},
{"linux/lp.h", "LPGETIRQ", 0x606},
{"linux/lp_m68k.h", "LPGETIRQ", 0x606},
{"linux/lp.h", "LPWAIT", 0x608},
{"linux/lp_m68k.h", "LPWAIT", 0x608},
{"linux/lp.h", "LPCAREFUL", 0x609},
{"linux/lp_m68k.h", "LPCAREFUL", 0x609},
{"linux/lp.h", "LPABORTOPEN", 0x60a},
{"linux/lp_m68k.h", "LPABORTOPEN", 0x60a},
{"linux/lp.h", "LPGETSTATUS", 0x60b},
{"linux/lp_m68k.h", "LPGETSTATUS", 0x60b},
{"linux/lp.h", "LPRESET", 0x60c},
{"linux/lp_m68k.h", "LPRESET", 0x60c},
{"linux/lp.h", "LPGETSTATS", 0x60d},
{"linux/lp.h", "LPGETFLAGS", 0x60e},
{"linux/scc.h", "TIOCSCCCFG", 0x2200},
{"linux/scc.h", "TIOCSCCINI", 0x2201},
{"linux/scc.h", "TIOCCHANINI", 0x2202},
{"linux/scc.h", "TIOCCHANMEM", 0x2210},
{"linux/scc.h", "TIOCGKISS", 0x2282},
{"linux/scc.h", "TIOCSKISS", 0x2283},
{"linux/scc.h", "TIOCSCCSTAT", 0x2284},
{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
{"asm/fbio.h", "FBIOGETCMAP", 0x4604},
{"linux/fb.h", "FBIOGETCMAP", 0x4604},
{"asm/fbio.h", "FBIOPUTCMAP", 0x4605},
{"linux/fb.h", "FBIOPUTCMAP", 0x4605},
{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
{"linux/fb.h", "FBIOGET_FCURSORINFO", 0x4607},
{"linux/fb.h", "FBIOGET_VCURSORINFO", 0x4608},
{"linux/fb.h", "FBIOPUT_VCURSORINFO", 0x4609},
{"linux/fb.h", "FBIOGET_CURSORSTATE", 0x460a},
{"linux/fb.h", "FBIOPUT_CURSORSTATE", 0x460b},
{"linux/fb.h", "FBCMD_DRAWLINE", 0x4621},
{"linux/fb.h", "FBCMD_MOVE", 0x4622},
{"linux/kd.h", "KIOCSOUND", 0x4b2f},
{"linux/kd.h", "KDMKTONE", 0x4b30},
{"linux/kd.h", "KDGETLED", 0x4b31},
{"linux/kd.h", "KDSETLED", 0x4b32},
{"linux/kd.h", "KDGKBTYPE", 0x4b33},
{"linux/kd.h", "KDADDIO", 0x4b34},
{"linux/kd.h", "KDDELIO", 0x4b35},
{"linux/kd.h", "KDENABIO", 0x4b36},
{"linux/kd.h", "KDDISABIO", 0x4b37},
{"linux/kd.h", "KDSETMODE", 0x4b3a},
{"linux/kd.h", "KDGETMODE", 0x4b3b},
{"linux/kd.h", "KDMAPDISP", 0x4b3c},
{"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
{"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
{"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
{"linux/kd.h", "KDGKBMODE", 0x4b44},
{"linux/kd.h", "KDSKBMODE", 0x4b45},
{"linux/kd.h", "KDGKBENT", 0x4b46},
{"linux/kd.h", "KDSKBENT", 0x4b47},
{"linux/kd.h", "KDGKBSENT", 0x4b48},
{"linux/kd.h", "KDSKBSENT", 0x4b49},
{"linux/kd.h", "KDGKBDIACR", 0x4b4a},
{"linux/kd.h", "KDSKBDIACR", 0x4b4b},
{"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
{"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
{"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
{"linux/kd.h", "GIO_FONT", 0x4b60},
{"linux/kd.h", "PIO_FONT", 0x4b61},
{"linux/kd.h", "KDGKBMETA", 0x4b62},
{"linux/kd.h", "KDSKBMETA", 0x4b63},
{"linux/kd.h", "KDGKBLED", 0x4b64},
{"linux/kd.h", "KDSKBLED", 0x4b65},
{"linux/kd.h", "GIO_UNIMAP", 0x4b66},
{"linux/kd.h", "PIO_UNIMAP", 0x4b67},
{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
{"linux/kd.h", "GIO_FONTX", 0x4b6b},
{"linux/kd.h", "PIO_FONTX", 0x4b6c},
{"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
{"linux/kd.h", "GIO_CMAP", 0x4b70},
{"linux/kd.h", "PIO_CMAP", 0x4b71},
{"linux/loop.h", "LOOP_SET_FD", 0x4c00},
{"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
{"linux/cdrom.h", "CDROMPAUSE", 0x5301},
{"linux/cdrom.h", "CDROMRESUME", 0x5302},
{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
{"linux/cdrom.h", "CDROMSTOP", 0x5307},
{"linux/cdrom.h", "CDROMSTART", 0x5308},
{"linux/cdrom.h", "CDROMEJECT", 0x5309},
{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
{"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
{"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
{"linux/cdrom.h", "CDROM_GET_UPC", 0x5311},
{"linux/cm206.h", "CDROM_GET_UPC", 0x5311},
{"linux/cdrom.h", "CDROMRESET", 0x5312},
{"linux/cm206.h", "CDROMRESET", 0x5312},
{"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
{"linux/cdrom.h", "CDROMREADRAW", 0x5314},
{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
{"linux/cdrom.h", "CDROMSEEK", 0x5316},
{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
{"linux/cdrom.h", "CDROMREADALL", 0x5318},
{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
{"linux/cdrom.h", "CDROMLOADFROMSLOT", 0x531a},
{"linux/ucdrom.h", "CDROM_SET_OPTIONS", 0x5320},
{"linux/ucdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
{"linux/ucdrom.h", "CDROM_SELECT_SPEED", 0x5322},
{"linux/ucdrom.h", "CDROM_SELECT_DISC", 0x5323},
{"linux/ucdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
{"linux/ucdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
{"linux/ucdrom.h", "CDROM_DISC_STATUS", 0x5327},
{"linux/sbpcd.h", "CDROMAUDIOBUFSIZ", 0x5382},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm/ioctls.h", "TCSBRKP", 0x5425},
{"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"linux/vt.h", "VT_OPENQRY", 0x5600},
{"linux/vt.h", "VT_GETMODE", 0x5601},
{"linux/vt.h", "VT_SETMODE", 0x5602},
{"linux/vt.h", "VT_GETSTATE", 0x5603},
{"linux/vt.h", "VT_SENDSIG", 0x5604},
{"linux/vt.h", "VT_RELDISP", 0x5605},
{"linux/vt.h", "VT_ACTIVATE", 0x5606},
{"linux/vt.h", "VT_WAITACTIVE", 0x5607},
{"linux/vt.h", "VT_DISALLOCATE", 0x5608},
{"linux/vt.h", "VT_RESIZE", 0x5609},
{"linux/vt.h", "VT_RESIZEX", 0x560a},
{"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
{"asm/sockios.h", "FIOSETOWN", 0x8901},
{"asm/sockios.h", "SIOCSPGRP", 0x8902},
{"asm/sockios.h", "FIOGETOWN", 0x8903},
{"asm/sockios.h", "SIOCGPGRP", 0x8904},
{"asm/sockios.h", "SIOCATMARK", 0x8905},
{"asm/sockios.h", "SIOCGSTAMP", 0x8906},
{"linux/sockios.h", "SIOCADDRT", 0x890b},
{"linux/sockios.h", "SIOCDELRT", 0x890c},
{"linux/sockios.h", "SIOCGIFNAME", 0x8910},
{"linux/sockios.h", "SIOCSIFLINK", 0x8911},
{"linux/sockios.h", "SIOCGIFCONF", 0x8912},
{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
{"linux/sockios.h", "SIOCGIFADDR", 0x8915},
{"linux/sockios.h", "SIOCSIFADDR", 0x8916},
{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
{"linux/sockios.h", "SIOCGIFMEM", 0x891f},
{"linux/sockios.h", "SIOCSIFMEM", 0x8920},
{"linux/sockios.h", "SIOCGIFMTU", 0x8921},
{"linux/sockios.h", "SIOCSIFMTU", 0x8922},
{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
{"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
{"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
{"linux/sockios.h", "SIOCADDMULTI", 0x8931},
{"linux/sockios.h", "SIOCDELMULTI", 0x8932},
{"linux/sockios.h", "SIOCGIFBR", 0x8940},
{"linux/sockios.h", "SIOCSIFBR", 0x8941},
{"linux/sockios.h", "OLD_SIOCDARP", 0x8950},
{"linux/sockios.h", "OLD_SIOCGARP", 0x8951},
{"linux/sockios.h", "OLD_SIOCSARP", 0x8952},
{"linux/sockios.h", "SIOCDARP", 0x8953},
{"linux/sockios.h", "SIOCGARP", 0x8954},
{"linux/sockios.h", "SIOCSARP", 0x8955},
{"linux/sockios.h", "SIOCDRARP", 0x8960},
{"linux/sockios.h", "SIOCGRARP", 0x8961},
{"linux/sockios.h", "SIOCSRARP", 0x8962},
{"linux/sockios.h", "SIOCGIFMAP", 0x8970},
{"linux/sockios.h", "SIOCSIFMAP", 0x8971},
{"linux/sockios.h", "SIOCADDDLCI", 0x8980},
{"linux/sockios.h", "SIOCDELDLCI", 0x8981},
{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
{"linux/sbpcd.h", "DDIOCSDBG", 0x9000},
{"linux/cyclades.h", "CYGETMON", 0x435901},
{"linux/cyclades.h", "CYGETTHRESH", 0x435902},
{"linux/cyclades.h", "CYSETTHRESH", 0x435903},
{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904},
{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905},
{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906},
{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907},
{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908},
{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909},
{"linux/fs.h", "FIBMAP", 0x20000001},
{"linux/fs.h", "FIGETBSZ", 0x20000002},
{"linux/fd.h", "FDCLRPRM", 0x20000241},
{"linux/fd.h", "FDMSGON", 0x20000245},
{"linux/fd.h", "FDMSGOFF", 0x20000246},
{"linux/fd.h", "FDFMTBEG", 0x20000247},
{"linux/fd.h", "FDFMTEND", 0x20000249},
{"linux/fd.h", "FDSETEMSGTRESH", 0x2000024a},
{"linux/fd.h", "FDFLUSH", 0x2000024b},
{"linux/fd.h", "FDRESET", 0x20000254},
{"linux/fd.h", "FDWERRORCLR", 0x20000256},
{"linux/fd.h", "FDRAWCMD", 0x20000258},
{"linux/fd.h", "FDTWADDLE", 0x20000259},
{"linux/fd.h", "FDEJECT", 0x2000025a},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_DOS", 0x200004d2},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_DOS", 0x200004d3},
{"linux/umsdos_fs.h", "UMSDOS_RMDIR_DOS", 0x200004d4},
{"linux/umsdos_fs.h", "UMSDOS_STAT_DOS", 0x200004d5},
{"linux/umsdos_fs.h", "UMSDOS_CREAT_EMD", 0x200004d6},
{"linux/umsdos_fs.h", "UMSDOS_UNLINK_EMD", 0x200004d7},
{"linux/umsdos_fs.h", "UMSDOS_READDIR_EMD", 0x200004d8},
{"linux/umsdos_fs.h", "UMSDOS_GETVERSION", 0x200004d9},
{"linux/umsdos_fs.h", "UMSDOS_INIT_EMD", 0x200004da},
{"linux/umsdos_fs.h", "UMSDOS_DOS_SETUP", 0x200004db},
{"linux/umsdos_fs.h", "UMSDOS_RENAME_DOS", 0x200004dc},
{"linux/md.h", "REGISTER_DEV", 0x20000901},
{"linux/md.h", "START_MD", 0x20000902},
{"linux/md.h", "STOP_MD", 0x20000903},
{"linux/fs.h", "BLKROSET", 0x2000125d},
{"linux/fs.h", "BLKROGET", 0x2000125e},
{"linux/fs.h", "BLKRRPART", 0x2000125f},
{"linux/fs.h", "BLKGETSIZE", 0x20001260},
{"linux/fs.h", "BLKFLSBUF", 0x20001261},
{"linux/fs.h", "BLKRASET", 0x20001262},
{"linux/fs.h", "BLKRAGET", 0x20001263},
{"linux/cm206.h", "CM206CTL_GET_STAT", 0x20002000},
{"linux/cm206.h", "CM206CTL_GET_LAST_STAT", 0x20002001},
{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x20004101},
{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x20004102},
{"linux/baycom.h", "BAYCOMCTL_PARAM_TXDELAY", 0x20004202},
{"linux/baycom.h", "BAYCOMCTL_PARAM_PPERSIST", 0x20004203},
{"linux/baycom.h", "BAYCOMCTL_PARAM_SLOTTIME", 0x20004204},
{"linux/baycom.h", "BAYCOMCTL_PARAM_TXTAIL", 0x20004205},
{"linux/baycom.h", "BAYCOMCTL_PARAM_FULLDUP", 0x20004206},
{"linux/baycom.h", "BAYCOMCTL_CALIBRATE", 0x2000420a},
{"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x20004300},
{"linux/isdn.h", "IIOCNETAIF", 0x20004901},
{"linux/isdn.h", "IIOCNETDIF", 0x20004902},
{"linux/isdn.h", "IIOCNETSCF", 0x20004903},
{"linux/isdn.h", "IIOCNETGCF", 0x20004904},
{"linux/isdn.h", "IIOCNETANM", 0x20004905},
{"linux/isdn.h", "IIOCNETDNM", 0x20004906},
{"linux/isdn.h", "IIOCNETGNM", 0x20004907},
{"linux/isdn.h", "IIOCGETSET", 0x20004908},
{"linux/isdn.h", "IIOCSETSET", 0x20004909},
{"linux/isdn.h", "IIOCSETVER", 0x2000490a},
{"linux/isdn.h", "IIOCNETHUP", 0x2000490b},
{"linux/isdn.h", "IIOCSETGST", 0x2000490c},
{"linux/isdn.h", "IIOCSETBRJ", 0x2000490d},
{"linux/isdn.h", "IIOCSIGPRF", 0x2000490e},
{"linux/isdn.h", "IIOCGETPRF", 0x2000490f},
{"linux/isdn.h", "IIOCSETPRF", 0x20004910},
{"linux/isdn.h", "IIOCGETMAP", 0x20004911},
{"linux/isdn.h", "IIOCSETMAP", 0x20004912},
{"linux/isdn.h", "IIOCNETASL", 0x20004913},
{"linux/isdn.h", "IIOCNETDIL", 0x20004914},
{"linux/isdn.h", "IIOCGETCPS", 0x20004915},
{"linux/isdn.h", "IIOCNETALN", 0x20004920},
{"linux/isdn.h", "IIOCNETDLN", 0x20004921},
{"linux/isdn.h", "IIOCDBGVAR", 0x2000497f},
{"linux/isdn.h", "IIOCDRVCTL", 0x20004980},
{"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x20005000},
{"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x20005001},
{"linux/soundcard.h", "SNDCTL_DSP_POST", 0x20005008},
{"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x2000500e},
{"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x20005015},
{"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x20005016},
{"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x20005100},
{"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x20005101},
{"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x20005111},
{"linux/random.h", "RNDZAPENTCNT", 0x20005204},
{"linux/random.h", "RNDCLEARPOOL", 0x20005206},
{"linux/soundcard.h", "SNDCTL_TMR_START", 0x20005402},
{"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x20005403},
{"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x20005404},
{"asm/ioctls.h", "TCSBRK", 0x20005405},
{"asm/ioctls.h", "TCXONC", 0x20005406},
{"asm/ioctls.h", "TCFLSH", 0x20005407},
{"asm/ioctls.h", "__TCGETSTAT", 0x200054c8},
{"asm/ioctls.h", "__TCSETSTAT", 0x200054c9},
{"linux/comstats.h", "COM_GETPORTSTATS", 0x2000631e},
{"linux/comstats.h", "COM_CLRPORTSTATS", 0x2000631f},
{"linux/comstats.h", "COM_GETBRDSTATS", 0x20006320},
{"linux/comstats.h", "COM_READPORT", 0x20006328},
{"linux/comstats.h", "COM_READBOARD", 0x20006329},
{"linux/comstats.h", "COM_READPANEL", 0x2000632a},
{"asm/ioctls.h", "FIOCLEX", 0x20006601},
{"asm/ioctls.h", "FIONCLEX", 0x20006602},
{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x20006e03},
{"linux/mc146818rtc.h", "RTC_AIE_ON", 0x20007001},
{"linux/mc146818rtc.h", "RTC_AIE_OFF", 0x20007002},
{"linux/mc146818rtc.h", "RTC_UIE_ON", 0x20007003},
{"linux/mc146818rtc.h", "RTC_UIE_OFF", 0x20007004},
{"linux/mc146818rtc.h", "RTC_PIE_ON", 0x20007005},
{"linux/mc146818rtc.h", "RTC_PIE_OFF", 0x20007006},
{"linux/cdk.h", "STL_BINTR", 0x20007314},
{"linux/cdk.h", "STL_BSTART", 0x20007315},
{"linux/cdk.h", "STL_BSTOP", 0x20007316},
{"linux/cdk.h", "STL_BRESET", 0x20007317},
{"linux/cdk.h", "STL_GETPFLAG", 0x20007350},
{"linux/cdk.h", "STL_SETPFLAG", 0x20007351},
{"asm/ioctls.h", "__TIOCHPCL", 0x20007402},
{"asm/ioctls.h", "TIOCEXCL", 0x2000740d},
{"asm/ioctls.h", "TIOCNXCL", 0x2000740e},
{"asm/ioctls.h", "TIOCCONS", 0x20007424},
{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x2000744e},
{"asm/ioctls.h", "__TIOCSTART", 0x2000746e},
{"asm/ioctls.h", "__TIOCSTOP", 0x2000746f},
{"asm/ioctls.h", "TIOCNOTTY", 0x20007471},
{"asm/ioctls.h", "__TIOCCDTR", 0x20007478},
{"asm/ioctls.h", "__TIOCSDTR", 0x20007479},
{"asm/ioctls.h", "__TIOCCBRK", 0x2000747a},
{"asm/ioctls.h", "__TIOCSBRK", 0x2000747b},
{"asm/ioctls.h", "TIOCSCTTY", 0x20007484},
{"linux/baycom.h", "BAYCOMCTL_GETDCD", 0x40014200},
{"linux/baycom.h", "BAYCOMCTL_GETPTT", 0x40014201},
{"linux/baycom.h", "BAYCOMCTL_GETSAMPLES", 0x40014210},
{"linux/baycom.h", "BAYCOMCTL_GETBITS", 0x40014211},
{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x40027501},
{"linux/baycom.h", "BAYCOMCTL_DEBUG1", 0x40044212},
{"linux/baycom.h", "BAYCOMCTL_DEBUG2", 0x40044213},
{"linux/baycom.h", "BAYCOMCTL_DEBUG3", 0x40044214},
{"asm/fbio.h", "FBIOGVIDEO", 0x40044608},
{"asm/fbio.h", "FBIOGCURMAX", 0x4004461c},
{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x40044d00},
{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x40044d01},
{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x40044d02},
{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x40044d03},
{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x40044d04},
{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x40044d05},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x40044d06},
{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x40044d07},
{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x40044d08},
{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x40044d09},
{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x40044d0a},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x40044d0b},
{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x40044d0c},
{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x40044d0d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x40044d0e},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x40044d0f},
{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x40044d10},
{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x40044d1c},
{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x40044d1d},
{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x40044d1e},
{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x40044dfb},
{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x40044dfc},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x40044dfd},
{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x40044dfe},
{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x40044dff},
{"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x40045002},
{"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x40045005},
{"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x40045006},
{"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x40045007},
{"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x4004500b},
{"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x4004500f},
{"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x40045010},
{"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x40045104},
{"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x40045105},
{"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x4004510a},
{"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x4004510b},
{"linux/random.h", "RNDGETENTCNT", 0x40045200},
{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x40046601},
{"asm/ioctls.h", "FIONREAD", 0x4004667f},
{"asm/kbio.h", "KIOCGTRANS", 0x40046b05},
{"asm/kbio.h", "KIOCTYPE", 0x40046b09},
{"asm/kbio.h", "KIOCLAYOUT", 0x40046b14},
{"linux/mtio.h", "MTIOCPOS", 0x40046d03},
{"linux/mc146818rtc.h", "RTC_IRQP_READ", 0x4004700b},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x40047201},
{"asm/ioctls.h", "TIOCGETD", 0x40047400},
{"asm/ioctls.h", "__TIOCMODG", 0x40047403},
{"asm/ioctls.h", "__TIOCGETX", 0x40047423},
{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x40047441},
{"linux/if_ppp.h", "PPPIOCGMRU", 0x40047453},
{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x40047455},
{"linux/if_ppp.h", "PPPIOCGUNIT", 0x40047456},
{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x40047458},
{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x4004745a},
{"asm/ioctls.h", "TIOCGSOFTCAR", 0x40047464},
{"asm/ioctls.h", "TIOCMGET", 0x4004746a},
{"asm/ioctls.h", "TIOCOUTQ", 0x40047473},
{"asm/ioctls.h", "__TIOCISPACE", 0x40047480},
{"asm/ioctls.h", "__TIOCISIZE", 0x40047481},
{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x40047482},
{"asm/ioctls.h", "TIOCGPGRP", 0x40047483},
{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x40047601},
{"asm/vuid_event.h", "VUIDGFORMAT", 0x40047602},
{"asm/ioctls.h", "__TIOCGETP", 0x40067408},
{"asm/ioctls.h", "__TIOCGETC", 0x40067412},
{"asm/ioctls.h", "__TIOCGLTC", 0x40067474},
{"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x40085013},
{"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x40085014},
{"linux/random.h", "RNDGETPOOL", 0x40085202},
{"asm/ioctls.h", "__TIOCGSIZE", 0x40087426},
{"linux/if_ppp.h", "PPPIOCGIDLE", 0x4008743f},
{"asm/ioctls.h", "TIOCGWINSZ", 0x40087468},
{"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x400c5011},
{"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x400c5012},
{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x400c6e01},
{"linux/fd.h", "FDGETDRVTYP", 0x4010020f},
{"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x4010500c},
{"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x4010500d},
{"asm/ioctls.h", "TCGETA", 0x40125401},
{"linux/fd.h", "FDGETMAXERRS", 0x4014020e},
{"linux/baycom.h", "BAYCOMCTL_GETSTAT", 0x40144207},
{"linux/fd.h", "FDWERRORGET", 0x40180217},
{"asm/fbio.h", "FBIOGTYPE", 0x40184600},
{"linux/fd.h", "FDGETPRM", 0x401c0204},
{"linux/mtio.h", "MTIOCGET", 0x401c6d02},
{"linux/fd.h", "FDGETFDCSTAT", 0x40200215},
{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x40207450},
{"linux/baycom.h", "BAYCOMCTL_GETPARAMS", 0x40244208},
{"linux/baycom.h", "BAYCOMCTL_SETPARAMS", 0x40244209},
{"asm/ioctls.h", "TCGETS", 0x40245408},
{"linux/mc146818rtc.h", "RTC_ALM_READ", 0x40247008},
{"linux/mc146818rtc.h", "RTC_RD_TIME", 0x40247009},
{"linux/fd.h", "FDGETDRVSTAT", 0x40340212},
{"linux/fd.h", "FDPOLLDRVSTAT", 0x40340213},
{"linux/fd.h", "FDGETDRVPRM", 0x40580211},
{"asm/fbio.h", "FBIOGATTR", 0x40584606},
{"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x4fa44309},
{"asm/ioctls.h", "TIOCSTI", 0x80017472},
{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x80026e02},
{"asm/fbio.h", "FBIOSVIDEO", 0x80044607},
{"asm/fbio.h", "FBIOSCURPOS", 0x8004461a},
{"asm/fbio.h", "FBIOGCURPOS", 0x8004461b},
{"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x80045010},
{"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x80045106},
{"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x80045108},
{"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x80045109},
{"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x8004510d},
{"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x8004510f},
{"linux/random.h", "RNDADDTOENTCNT", 0x80045201},
{"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x80045407},
{"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x80045408},
{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x80046602},
{"asm/ioctls.h", "FIOASYNC", 0x8004667d},
{"asm/ioctls.h", "FIONBIO", 0x8004667e},
{"asm/kbio.h", "KIOCTRANS", 0x80046b00},
{"asm/kbio.h", "KIOCCMD", 0x80046b08},
{"asm/kbio.h", "KIOCSDIRECT", 0x80046b0a},
{"linux/mc146818rtc.h", "RTC_IRQP_SET", 0x8004700c},
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x80047202},
{"asm/ioctls.h", "TIOCSETD", 0x80047401},
{"asm/ioctls.h", "__TIOCMODS", 0x80047404},
{"asm/ioctls.h", "__TIOCFLUSH", 0x80047410},
{"asm/ioctls.h", "__TIOCTCNTL", 0x80047420},
{"asm/ioctls.h", "__TIOCSIGNAL", 0x80047421},
{"asm/ioctls.h", "__TIOCSETX", 0x80047422},
{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x80047440},
{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x80047451},
{"linux/if_ppp.h", "PPPIOCSMRU", 0x80047452},
{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x80047454},
{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x80047457},
{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x80047459},
{"asm/ioctls.h", "TIOCSSOFTCAR", 0x80047465},
{"asm/ioctls.h", "__TIOCUCNTL", 0x80047466},
{"asm/ioctls.h", "__TIOCREMOTE", 0x80047469},
{"asm/ioctls.h", "TIOCMBIC", 0x8004746b},
{"asm/ioctls.h", "TIOCMBIS", 0x8004746c},
{"asm/ioctls.h", "TIOCMSET", 0x8004746d},
{"asm/ioctls.h", "TIOCPKT", 0x80047470},
{"asm/ioctls.h", "__TIOCLGET", 0x8004747c},
{"asm/ioctls.h", "__TIOCLSET", 0x8004747d},
{"asm/ioctls.h", "__TIOCLBIC", 0x8004747e},
{"asm/ioctls.h", "__TIOCLBIS", 0x8004747f},
{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x80047481},
{"asm/ioctls.h", "TIOCSPGRP", 0x80047482},
{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x80047483},
{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x80047484},
{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x80047485},
{"asm/vuid_event.h", "VUIDSFORMAT", 0x80047601},
{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x80047602},
{"asm/ioctls.h", "__TIOCSETP", 0x80067409},
{"asm/ioctls.h", "__TIOCSETN", 0x8006740a},
{"asm/ioctls.h", "__TIOCSETC", 0x80067411},
{"asm/ioctls.h", "__TIOCSLTC", 0x80067475},
{"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x80085112},
{"linux/random.h", "RNDADDENTROPY", 0x80085203},
{"linux/mtio.h", "MTIOCTOP", 0x80086d01},
{"asm/ioctls.h", "__TIOCSSIZE", 0x80087425},
{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x8008744b},
{"asm/ioctls.h", "TIOCSWINSZ", 0x80087467},
{"linux/fd.h", "FDFMTTRK", 0x800c0248},
{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x800c744d},
{"asm/ioctls.h", "TCSETA", 0x80125402},
{"asm/ioctls.h", "TCSETAW", 0x80125403},
{"asm/ioctls.h", "TCSETAF", 0x80125404},
{"linux/fd.h", "FDSETMAXERRS", 0x8014024c},
{"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x80144304},
{"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x80144305},
{"linux/fd.h", "FDSETPRM", 0x801c0242},
{"linux/fd.h", "FDDEFPRM", 0x801c0243},
{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x8020744f},
{"asm/ioctls.h", "TCSETS", 0x80245409},
{"asm/ioctls.h", "TCSETSW", 0x8024540a},
{"asm/ioctls.h", "TCSETSF", 0x8024540b},
{"linux/mc146818rtc.h", "RTC_ALM_SET", 0x80247007},
{"linux/mc146818rtc.h", "RTC_SET_TIME", 0x8024700a},
{"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x80285107},
{"asm/fbio.h", "FBIOSCURSOR", 0x802c4618},
{"linux/fd.h", "FDSETDRVPRM", 0x80580290},
{"asm/fbio.h", "FBIOSATTR", 0x80584605},
{"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x8fa44308},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1c},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1d},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1e},
{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff},
{"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0xc0045002},
{"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0xc0045003},
{"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0xc0045004},
{"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0xc0045005},
{"linux/soundcard.h", "SOUND_PCM_WRITE_CHANNELS", 0xc0045006},
{"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0xc0045007},
{"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0xc0045009},
{"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0xc004500a},
{"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0xc0045103},
{"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0xc004510e},
{"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0xc0045401},
{"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0xc0045405},
{"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0xc0045406},
{"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0xc0046d00},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0xc0046d01},
{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c},
{"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0xc0144302},
{"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0xc0144303},
{"linux/soundcard.h", "SNDCTL_COPR_RUN", 0xc0144306},
{"linux/soundcard.h", "SNDCTL_COPR_HALT", 0xc0144307},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0xc0216d02},
{"linux/isdn_ppp.h", "PPPIOCLINKINFO", 0xc0247480},
{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0286e04},
{"asm/fbio.h", "FBIOGCURSOR", 0xc02c4619},
{"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0xc074510c},
{"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0xc08c5102},
{"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0xcfb04301},
{"linux/soundcard.h", "SNDCTL_PMGR_IFACE", 0xcfb85001},
{"linux/soundcard.h", "SNDCTL_PMGR_ACCESS", 0xcfb85110},

1
linux/sparc/ioctlent1.h Normal file
View File

@ -0,0 +1 @@
#include "../svr4/ioctlent.h"

32
linux/sparc/signalent.h Normal file
View File

@ -0,0 +1,32 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGEMT", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGBUS", /* 10 */
"SIGSEGV", /* 11 */
"SIGSYS", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGURG", /* 16 */
"SIGSTOP", /* 17 */
"SIGTSTP", /* 18 */
"SIGCONT", /* 19 */
"SIGCHLD", /* 20 */
"SIGTTIN", /* 21 */
"SIGTTOU", /* 22 */
"SIGIO", /* 23 */
"SIGXCPU", /* 24 */
"SIGXFSZ", /* 25 */
"SIGVTALRM", /* 26 */
"SIGPROF", /* 27 */
"SIGWINCH", /* 28 */
"SIGLOST", /* 29 */
"SIGUSR1", /* 30 */
"SIGUSR2", /* 31 */

1
linux/sparc/signalent1.h Normal file
View File

@ -0,0 +1 @@
#include "../svr4/signalent.h"

176
linux/sparc/syscall.h Normal file
View File

@ -0,0 +1,176 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "dummy.h"
int sys_nosys();
int sys_nullsys();
int sys_errsys();
/* 1.1 processes and protection */
int sys_gethostid(),sys_sethostname(),sys_gethostname(),sys_getpid();
int sys_setdomainname(),sys_getdomainname();
int sys_fork(),sys_exit(),sys_execv(),sys_execve(),sys_wait4(),sys_waitpid();
int sys_setuid(),sys_setgid(),sys_getuid(),sys_setreuid(),sys_getgid(),sys_getgroups(),sys_setregid(),sys_setgroups();
int sys_getpgrp(),sys_setpgrp();
int sys_setsid(), sys_setpgid();
int sys_uname(), sys_sysinfo();
/* 1.2 memory management */
int sys_brk(),sys_sbrk(),sys_sstk();
int sys_getpagesize(),sys_mmap(),sys_mctl(),sys_munmap(),sys_mprotect(),sys_mincore();
int sys_omsync(),sys_omadvise();
/* 1.3 signals */
int sys_sigvec(),sys_sigblock(),sys_sigsetmask(),sys_sigpause(),sys_sigstack(),sys_sigcleanup(), sys_sigreturn();
int sys_kill(), sys_killpg(), sys_sigpending(), sys_signal(), sys_sigaction(), sys_sigsuspend(), sys_sigprocmask();
/* 1.4 timing and statistics */
int sys_gettimeofday(),sys_settimeofday();
int sys_adjtime(), sys_adjtimex();
int sys_getitimer(),sys_setitimer();
/* 1.5 descriptors */
int sys_getdtablesize(),sys_dup(),sys_dup2(),sys_close();
int sys_select(),sys_getdopt(),sys_setdopt(),sys_fcntl(),sys_flock();
/* 1.6 resource controls */
int sys_getpriority(),sys_setpriority(),sys_getrusage(),sys_getrlimit(),sys_setrlimit();
int sys_oldquota(), sys_quotactl();
int sys_rtschedule(), sys_personality();
/* 1.7 system operation support */
int sys_mount(),sys_unmount(),sys_swapon();
int sys_sync(),sys_reboot();
int sys_sysacct();
int sys_auditsys();
/* 2.1 generic operations */
int sys_read(),sys_write(),sys_readv(),sys_writev(),sys_ioctl();
/* 2.1.1 asynch operations */
int sys_aioread(), sys_aiowrite(), sys_aiowait(), sys_aiocancel();
/* 2.2 file system */
int sys_chdir(),sys_chroot();
int sys_fchdir(),sys_fchroot();
int sys_mkdir(),sys_rmdir(),sys_getdirentries(), sys_getdents(),sys_readdir();
int sys_creat(),sys_open(),sys_mknod(),sys_unlink(),sys_stat(),sys_fstat(),sys_lstat();
int sys_chown(),sys_fchown(),sys_chmod(),sys_fchmod(),sys_utimes();
int sys_link(),sys_symlink(),sys_readlink(),sys_rename();
int sys_lseek(),sys_truncate(),sys_ftruncate(),sys_access(),sys_fsync();
int sys_statfs(),sys_fstatfs(),sys_msync();
/* 2.3 communications */
int sys_socket(),sys_bind(),sys_listen(),sys_accept(),sys_connect();
int sys_socketpair(),sys_sendto(),sys_send(),sys_recvfrom(),sys_recv();
int sys_sendmsg(),sys_recvmsg(),sys_shutdown(),sys_setsockopt(),sys_getsockopt();
int sys_getsockname(),sys_getpeername(),sys_pipe();
int sys_umask(); /* XXX */
/* 2.3.1 SystemV-compatible IPC */
int sys_semsys(), sys_semctl(), sys_semget();
#define SYS_semsys_subcall 200
#define SYS_semsys_nsubcalls 3
#define SYS_semctl (SYS_semsys_subcall + 0)
#define SYS_semget (SYS_semsys_subcall + 1)
#define SYS_semop (SYS_semsys_subcall + 2)
int sys_msgsys(), sys_msgget(), sys_msgctl(), sys_msgrcv(), sys_msgsnd();
#define SYS_msgsys_subcall 203
#define SYS_msgsys_nsubcalls 4
#define SYS_msgget (SYS_msgsys_subcall + 0)
#define SYS_msgctl (SYS_msgsys_subcall + 1)
#define SYS_msgrcv (SYS_msgsys_subcall + 2)
#define SYS_msgsnd (SYS_msgsys_subcall + 3)
int sys_shmsys(), sys_shmat(), sys_shmctl(), sys_shmdt(), sys_shmget();
#define SYS_shmsys_subcall 207
#define SYS_shmsys_nsubcalls 4
#define SYS_shmat (SYS_shmsys_subcall + 0)
#define SYS_shmctl (SYS_shmsys_subcall + 1)
#define SYS_shmdt (SYS_shmsys_subcall + 2)
#define SYS_shmget (SYS_shmsys_subcall + 3)
/* 2.4 processes */
int sys_ptrace();
/* 2.5 terminals */
/* emulations for backwards compatibility */
int sys_otime(); /* now use gettimeofday */
int sys_ostime(); /* now use settimeofday */
int sys_oalarm(); /* now use setitimer */
int sys_outime(); /* now use utimes */
int sys_opause(); /* now use sigpause */
int sys_onice(); /* now use setpriority,getpriority */
int sys_oftime(); /* now use gettimeofday */
int sys_osetpgrp(); /* ??? */
int sys_otimes(); /* now use getrusage */
int sys_ossig(); /* now use sigvec, etc */
int sys_ovlimit(); /* now use setrlimit,getrlimit */
int sys_ovtimes(); /* now use getrusage */
int sys_osetuid(); /* now use setreuid */
int sys_osetgid(); /* now use setregid */
int sys_ostat(); /* now use stat */
int sys_ofstat(); /* now use fstat */
/* BEGIN JUNK */
int sys_profil(); /* 'cuz sys calls are interruptible */
int sys_vhangup(); /* should just do in sys_exit() */
int sys_vfork(); /* XXX - was awaiting fork w/ copy on write */
int sys_ovadvise(); /* awaiting new madvise */
int sys_indir(); /* indirect system call */
int sys_ustat(); /* System V compatibility */
int sys_owait(); /* should use wait4 interface */
int sys_owait3(); /* should use wait4 interface */
int sys_umount(); /* still more Sys V (and 4.2?) compatibility */
int sys_pathconf(); /* posix */
int sys_fpathconf(); /* posix */
int sys_sysconf(); /* posix */
int sys_delete_module();
int sys_debug();
/* END JUNK */
int sys_vtrace(); /* kernel event tracing */
/* nfs */
int sys_async_daemon(); /* client async daemon */
int sys_nfs_svc(); /* run nfs server */
int sys_nfs_getfh(); /* get file handle */
int sys_exportfs(); /* export file systems */
int sys_rfssys(); /* RFS-related calls */
int sys_getmsg();
int sys_putmsg();
int sys_poll();
int sys_vpixsys(); /* VP/ix system calls */
#include "syscall1.h"

142
linux/sparc/syscall.h.2 Normal file
View File

@ -0,0 +1,142 @@
/*
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "dummy.h"
/* primary syscalls */
int sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write();
int sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link();
int sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod();
int sys_chmod(), sys_chown(), sys_break(), sys_oldstat();
int sys_lseek(), sys_getpid(), sys_mount(), sys_umount();
int sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace();
int sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime();
int sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime();
int sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir();
int sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk();
int sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid();
int sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl();
int sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit();
int sys_olduname(), sys_umask(), sys_chroot(), sys_ustat();
int sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid();
int sys_sigaction(), sys_siggetmask(), sys_sigsetmask();
int sys_setreuid(), sys_setregid(), sys_sigsuspend();
int sys_sigpending(), sys_sethostname(), sys_setrlimit();
int sys_getrlimit(), sys_getrusage(), sys_gettimeofday();
int sys_settimeofday(), sys_getgroups(), sys_setgroups();
int sys_oldselect(), sys_symlink(), sys_oldlstat(), sys_readlink();
int sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir();
int sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate();
int sys_fchmod(), sys_fchown(), sys_getpriority();
int sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs();
int sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer();
int sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat();
int sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86();
int sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn();
int sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo();
int sys_modify_ldt(), sys_adjtimex(), sys_mprotect();
int sys_sigprocmask(), sys_create_module(), sys_init_module();
int sys_delete_module(), sys_get_kernel_syms(), sys_quotactl();
int sys_getpgid(), sys_fchdir(), sys_bdflush();
int sys_sysfs(), sys_personality(), sys_afs_syscall();
int sys_setfsuid(), sys_setfsgid(), sys_llseek();
int sys_getdents(), sys_flock(), sys_msync();
int sys_readv(), sys_writev(), sys_select();
int sys_getsid(), sys_fdatasync(), sys_sysctl();
int sys_mlock(), sys_munlock(), sys_mlockall(), sys_munlockall();
int sys_sched_setparam(), sys_sched_getparam();
int sys_sched_setscheduler(), sys_sched_getscheduler(), sys_sched_yield();
int sys_sched_get_priority_max(), sys_sched_get_priority_min();
int sys_sched_rr_get_interval(), sys_nanosleep(), sys_mremap();
int sys_sendmsg(), sys_recvmsg();
/* sys_socketcall subcalls */
int sys_socket(), sys_bind(), sys_connect(), sys_listen();
int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
#ifndef ALPHA
#define SYS_socket_subcall 180
#define SYS_socket (SYS_socket_subcall + 1)
#define SYS_bind (SYS_socket_subcall + 2)
#define SYS_connect (SYS_socket_subcall + 3)
#define SYS_listen (SYS_socket_subcall + 4)
#define SYS_accept (SYS_socket_subcall + 5)
#define SYS_getsockname (SYS_socket_subcall + 6)
#define SYS_getpeername (SYS_socket_subcall + 7)
#define SYS_socketpair (SYS_socket_subcall + 8)
#define SYS_send (SYS_socket_subcall + 9)
#define SYS_recv (SYS_socket_subcall + 10)
#define SYS_sendto (SYS_socket_subcall + 11)
#define SYS_recvfrom (SYS_socket_subcall + 12)
#define SYS_shutdown (SYS_socket_subcall + 13)
#define SYS_setsockopt (SYS_socket_subcall + 14)
#define SYS_getsockopt (SYS_socket_subcall + 15)
#define SYS_socket_nsubcalls 16
#endif /* !ALPHA */
/* sys_ipc subcalls */
int sys_semget(), sys_semctl();
int sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl();
int sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl();
#ifndef ALPHA
#define SYS_ipc_subcall 200
#define SYS_semop (SYS_ipc_subcall + 1)
#define SYS_semget (SYS_ipc_subcall + 2)
#define SYS_semctl (SYS_ipc_subcall + 3)
#define SYS_msgsnd (SYS_ipc_subcall + 11)
#define SYS_msgrcv (SYS_ipc_subcall + 12)
#define SYS_msgget (SYS_ipc_subcall + 13)
#define SYS_msgctl (SYS_ipc_subcall + 14)
#define SYS_shmat (SYS_ipc_subcall + 21)
#define SYS_shmdt (SYS_ipc_subcall + 22)
#define SYS_shmget (SYS_ipc_subcall + 23)
#define SYS_shmctl (SYS_ipc_subcall + 24)
#define SYS_ipc_nsubcalls 25
#endif /* ALPHA */
#ifdef ALPHA
int osf_statfs(), osf_fstatfs(), sys_getpagesize(), sys_madvise();
int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes();
#endif
int sys__llseek(), sys__newselect(), sys__sysctl(), sys_klog();
int sys_prev_fstat(), sys_prev_lstat(), sys_prev_mknod(), sys_prev_stat();
int sys_prev_ustat(), sys_syscall_flock(), sys_syscall_readv();
int sys_syscall_writev();
#include "syscall1.h"

501
linux/sparc/syscall1.h Normal file
View File

@ -0,0 +1,501 @@
/*
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#define SOLARIS_syscall 0
#define SOLARIS_exit 1
#define SOLARIS_fork 2
#define SOLARIS_read 3
#define SOLARIS_write 4
#define SOLARIS_open 5
#define SOLARIS_close 6
#define SOLARIS_wait 7
#define SOLARIS_creat 8
#define SOLARIS_link 9
#define SOLARIS_unlink 10
#define SOLARIS_exec 11
#define SOLARIS_chdir 12
#define SOLARIS_time 13
#define SOLARIS_mknod 14
#define SOLARIS_chmod 15
#define SOLARIS_chown 16
#define SOLARIS_brk 17
#define SOLARIS_stat 18
#define SOLARIS_lseek 19
#define SOLARIS_getpid 20
#define SOLARIS_mount 21
#define SOLARIS_umount 22
#define SOLARIS_setuid 23
#define SOLARIS_getuid 24
#define SOLARIS_stime 25
#define SOLARIS_ptrace 26
#define SOLARIS_alarm 27
#define SOLARIS_fstat 28
#define SOLARIS_pause 29
#define SOLARIS_utime 30
#define SOLARIS_stty 31
#define SOLARIS_gtty 32
#define SOLARIS_access 33
#define SOLARIS_nice 34
#define SOLARIS_statfs 35
#define SOLARIS_sync 36
#define SOLARIS_kill 37
#define SOLARIS_fstatfs 38
#define SOLARIS_pgrpsys 39
#define SOLARIS_xenix 40
#define SOLARIS_dup 41
#define SOLARIS_pipe 42
#define SOLARIS_times 43
#define SOLARIS_profil 44
#define SOLARIS_plock 45
#define SOLARIS_setgid 46
#define SOLARIS_getgid 47
#define SOLARIS_signal 48
#define SOLARIS_msgsys 49
#define SOLARIS_syssun 50
#define SOLARIS_acct 51
#define SOLARIS_shmsys 52
#define SOLARIS_semsys 53
#define SOLARIS_ioctl 54
#define SOLARIS_uadmin 55
#define SOLARIS_utssys 57
#define SOLARIS_fdsync 58
#define SOLARIS_execve 59
#define SOLARIS_umask 60
#define SOLARIS_chroot 61
#define SOLARIS_fcntl 62
#define SOLARIS_ulimit 63
#define SOLARIS_rmdir 79
#define SOLARIS_mkdir 80
#define SOLARIS_getdents 81
#define SOLARIS_sysfs 84
#define SOLARIS_getmsg 85
#define SOLARIS_putmsg 86
#define SOLARIS_poll 87
#define SOLARIS_lstat 88
#define SOLARIS_symlink 89
#define SOLARIS_readlink 90
#define SOLARIS_setgroups 91
#define SOLARIS_getgroups 92
#define SOLARIS_fchmod 93
#define SOLARIS_fchown 94
#define SOLARIS_sigprocmask 95
#define SOLARIS_sigsuspend 96
#define SOLARIS_sigaltstack 97
#define SOLARIS_sigaction 98
#define SOLARIS_sigpending 99
#define SOLARIS_context 100
#define SOLARIS_evsys 101
#define SOLARIS_evtrapret 102
#define SOLARIS_statvfs 103
#define SOLARIS_fstatvfs 104
#define SOLARIS_nfssys 106
#define SOLARIS_waitsys 107
#define SOLARIS_sigsendsys 108
#define SOLARIS_hrtsys 109
#define SOLARIS_acancel 110
#define SOLARIS_async 111
#define SOLARIS_priocntlsys 112
#define SOLARIS_pathconf 113
#define SOLARIS_mincore 114
#define SOLARIS_mmap 115
#define SOLARIS_mprotect 116
#define SOLARIS_munmap 117
#define SOLARIS_fpathconf 118
#define SOLARIS_vfork 119
#define SOLARIS_fchdir 120
#define SOLARIS_readv 121
#define SOLARIS_writev 122
#define SOLARIS_xstat 123
#define SOLARIS_lxstat 124
#define SOLARIS_fxstat 125
#define SOLARIS_xmknod 126
#define SOLARIS_clocal 127
#define SOLARIS_setrlimit 128
#define SOLARIS_getrlimit 129
#define SOLARIS_lchown 130
#define SOLARIS_memcntl 131
#define SOLARIS_getpmsg 132
#define SOLARIS_putpmsg 133
#define SOLARIS_rename 134
#define SOLARIS_uname 135
#define SOLARIS_setegid 136
#define SOLARIS_sysconfig 137
#define SOLARIS_adjtime 138
#define SOLARIS_systeminfo 139
#define SOLARIS_seteuid 141
#define SOLARIS_vtrace 142
#define SOLARIS_fork1 143
#define SOLARIS_sigtimedwait 144
#define SOLARIS_lwp_info 145
#define SOLARIS_yield 146
#define SOLARIS_lwp_sema_wait 147
#define SOLARIS_lwp_sema_post 148
#define SOLARIS_modctl 152
#define SOLARIS_fchroot 153
#define SOLARIS_utimes 154
#define SOLARIS_vhangup 155
#define SOLARIS_gettimeofday 156
#define SOLARIS_getitimer 157
#define SOLARIS_setitimer 158
#define SOLARIS_lwp_create 159
#define SOLARIS_lwp_exit 160
#define SOLARIS_lwp_suspend 161
#define SOLARIS_lwp_continue 162
#define SOLARIS_lwp_kill 163
#define SOLARIS_lwp_self 164
#define SOLARIS_lwp_setprivate 165
#define SOLARIS_lwp_getprivate 166
#define SOLARIS_lwp_wait 167
#define SOLARIS_lwp_mutex_unlock 168
#define SOLARIS_lwp_mutex_lock 169
#define SOLARIS_lwp_cond_wait 170
#define SOLARIS_lwp_cond_signal 171
#define SOLARIS_lwp_cond_broadcast 172
#define SOLARIS_pread 173
#define SOLARIS_pwrite 174
#define SOLARIS_llseek 175
#define SOLARIS_inst_sync 176
#define SOLARIS_kaio 178
#define SOLARIS_tsolsys 184
#define SOLARIS_acl 185
#define SOLARIS_auditsys 186
#define SOLARIS_processor_bind 187
#define SOLARIS_processor_info 188
#define SOLARIS_p_online 189
#define SOLARIS_sigqueue 190
#define SOLARIS_clock_gettime 191
#define SOLARIS_clock_settime 192
#define SOLARIS_clock_getres 193
#define SOLARIS_timer_create 194
#define SOLARIS_timer_delete 195
#define SOLARIS_timer_settime 196
#define SOLARIS_timer_gettime 197
#define SOLARIS_timer_getoverrun 198
#define SOLARIS_nanosleep 199
#define SOLARIS_facl 200
#define SOLARIS_door 201
#define SOLARIS_setreuid 202
#define SOLARIS_setregid 203
#define SOLARIS_signotifywait 210
#define SOLARIS_lwp_sigredirect 211
#define SOLARIS_lwp_alarm 212
#include "dummy2.h"
extern int solaris_syscall();
extern int solaris_exit();
extern int solaris_fork();
extern int solaris_read();
extern int solaris_write();
extern int solaris_open();
extern int solaris_close();
extern int solaris_wait();
extern int solaris_creat();
extern int solaris_link();
extern int solaris_unlink();
extern int solaris_exec();
extern int solaris_chdir();
extern int solaris_time();
extern int solaris_mknod();
extern int solaris_chmod();
extern int solaris_chown();
extern int solaris_brk();
extern int solaris_stat();
extern int solaris_lseek();
extern int solaris_getpid();
extern int solaris_mount();
extern int solaris_umount();
extern int solaris_setuid();
extern int solaris_getuid();
extern int solaris_stime();
extern int solaris_ptrace();
extern int solaris_alarm();
extern int solaris_fstat();
extern int solaris_pause();
extern int solaris_utime();
extern int solaris_stty();
extern int solaris_gtty();
extern int solaris_access();
extern int solaris_nice();
extern int solaris_statfs();
extern int solaris_sync();
extern int solaris_kill();
extern int solaris_fstatfs();
extern int solaris_pgrpsys();
extern int solaris_setpgrp();
extern int solaris_xenix();
extern int solaris_syssgi();
extern int solaris_dup();
extern int solaris_pipe();
extern int solaris_times();
extern int solaris_profil();
extern int solaris_plock();
extern int solaris_setgid();
extern int solaris_getgid();
extern int solaris_sigcall();
extern int solaris_msgsys();
extern int solaris_syssun();
extern int solaris_sysi86();
extern int solaris_sysmips();
extern int solaris_sysmachine();
extern int solaris_acct();
extern int solaris_shmsys();
extern int solaris_semsys();
extern int solaris_ioctl();
extern int solaris_uadmin();
extern int solaris_utssys();
extern int solaris_fdsync();
extern int solaris_execve();
extern int solaris_umask();
extern int solaris_chroot();
extern int solaris_fcntl();
extern int solaris_ulimit();
extern int solaris_rmdir();
extern int solaris_mkdir();
extern int solaris_getdents();
extern int solaris_sysfs();
extern int solaris_getmsg();
extern int solaris_putmsg();
extern int solaris_poll();
extern int solaris_lstat();
extern int solaris_symlink();
extern int solaris_readlink();
extern int solaris_setgroups();
extern int solaris_getgroups();
extern int solaris_fchmod();
extern int solaris_fchown();
extern int solaris_sigprocmask();
extern int solaris_sigsuspend();
extern int solaris_sigaltstack();
extern int solaris_sigaction();
extern int solaris_spcall();
extern int solaris_context();
extern int solaris_evsys();
extern int solaris_evtrapret();
extern int solaris_statvfs();
extern int solaris_fstatvfs();
extern int solaris_nfssys();
extern int solaris_waitid();
extern int solaris_sigsendsys();
extern int solaris_hrtsys();
extern int solaris_acancel();
extern int solaris_async();
extern int solaris_priocntlsys();
extern int solaris_pathconf();
extern int solaris_mincore();
extern int solaris_mmap();
extern int solaris_mprotect();
extern int solaris_munmap();
extern int solaris_fpathconf();
extern int solaris_vfork();
extern int solaris_fchdir();
extern int solaris_readv();
extern int solaris_writev();
extern int solaris_xstat();
extern int solaris_lxstat();
extern int solaris_fxstat();
extern int solaris_xmknod();
extern int solaris_clocal();
extern int solaris_setrlimit();
extern int solaris_getrlimit();
extern int solaris_lchown();
extern int solaris_memcntl();
extern int solaris_getpmsg();
extern int solaris_putpmsg();
extern int solaris_rename();
extern int solaris_uname();
extern int solaris_setegid();
extern int solaris_sysconfig();
extern int solaris_adjtime();
extern int solaris_sysinfo();
extern int solaris_seteuid();
extern int solaris_vtrace();
extern int solaris_fork1();
extern int solaris_sigtimedwait();
extern int solaris_lwp_info();
extern int solaris_yield();
extern int solaris_lwp_sema_wait();
extern int solaris_lwp_sema_post();
extern int solaris_modctl();
extern int solaris_fchroot();
extern int solaris_utimes();
extern int solaris_vhangup();
extern int solaris_gettimeofday();
extern int solaris_getitimer();
extern int solaris_setitimer();
extern int solaris_lwp_create();
extern int solaris_lwp_exit();
extern int solaris_lwp_suspend();
extern int solaris_lwp_continue();
extern int solaris_lwp_kill();
extern int solaris_lwp_self();
extern int solaris_lwp_setprivate();
extern int solaris_lwp_getprivate();
extern int solaris_lwp_wait();
extern int solaris_lwp_mutex_unlock();
extern int solaris_lwp_mutex_lock();
extern int solaris_lwp_cond_wait();
extern int solaris_lwp_cond_signal();
extern int solaris_lwp_cond_broadcast();
extern int solaris_pread();
extern int solaris_pwrite();
extern int solaris_llseek();
extern int solaris_inst_sync();
extern int solaris_auditsys();
extern int solaris_processor_bind();
extern int solaris_processor_info();
extern int solaris_p_online();
extern int solaris_sigqueue();
extern int solaris_clock_gettime();
extern int solaris_clock_settime();
extern int solaris_clock_getres();
extern int solaris_timer_create();
extern int solaris_timer_delete();
extern int solaris_timer_settime();
extern int solaris_timer_gettime();
extern int solaris_timer_getoverrun();
extern int solaris_nanosleep();
/* solaris_pgrpsys subcalls */
extern int solaris_getpgrp(), solaris_setpgrp(), solaris_getsid();
extern int solaris_setsid(), solaris_getpgid(), solaris_setpgid();
#define SOLARIS_pgrpsys_subcall 300
#define SOLARIS_getpgrp (SOLARIS_pgrpsys_subcall + 0)
#define SOLARIS_setpgrp (SOLARIS_pgrpsys_subcall + 1)
#define SOLARIS_getsid (SOLARIS_pgrpsys_subcall + 2)
#define SOLARIS_setsid (SOLARIS_pgrpsys_subcall + 3)
#define SOLARIS_getpgid (SOLARIS_pgrpsys_subcall + 4)
#define SOLARIS_setpgid (SOLARIS_pgrpsys_subcall + 5)
#define SOLARIS_pgrpsys_nsubcalls 6
/* solaris_sigcall subcalls */
#undef SOLARIS_signal
#define SOLARIS_sigcall 48
extern int solaris_signal(), solaris_sigset(), solaris_sighold();
extern int solaris_sigrelse(), solaris_sigignore(), solaris_sigpause();
#define SOLARIS_sigcall_subcall 310
#define SOLARIS_signal (SOLARIS_sigcall_subcall + 0)
#define SOLARIS_sigset (SOLARIS_sigcall_subcall + 1)
#define SOLARIS_sighold (SOLARIS_sigcall_subcall + 2)
#define SOLARIS_sigrelse (SOLARIS_sigcall_subcall + 3)
#define SOLARIS_sigignore (SOLARIS_sigcall_subcall + 4)
#define SOLARIS_sigpause (SOLARIS_sigcall_subcall + 5)
#define SOLARIS_sigcall_nsubcalls 6
/* msgsys subcalls */
extern int solaris_msgget(), solaris_msgctl(), solaris_msgrcv(), solaris_msgsnd();
#define SOLARIS_msgsys_subcall 320
#define SOLARIS_msgget (SOLARIS_msgsys_subcall + 0)
#define SOLARIS_msgctl (SOLARIS_msgsys_subcall + 1)
#define SOLARIS_msgrcv (SOLARIS_msgsys_subcall + 2)
#define SOLARIS_msgsnd (SOLARIS_msgsys_subcall + 3)
#define SOLARIS_msgsys_nsubcalls 4
/* shmsys subcalls */
extern int solaris_shmat(), solaris_shmctl(), solaris_shmdt(), solaris_shmget();
#define SOLARIS_shmsys_subcall 330
#define SOLARIS_shmat (SOLARIS_shmsys_subcall + 0)
#define SOLARIS_shmctl (SOLARIS_shmsys_subcall + 1)
#define SOLARIS_shmdt (SOLARIS_shmsys_subcall + 2)
#define SOLARIS_shmget (SOLARIS_shmsys_subcall + 3)
#define SOLARIS_shmsys_nsubcalls 4
/* semsys subcalls */
extern int solaris_semctl(), solaris_semget(), solaris_semop();
#define SOLARIS_semsys_subcall 340
#define SOLARIS_semctl (SOLARIS_semsys_subcall + 0)
#define SOLARIS_semget (SOLARIS_semsys_subcall + 1)
#define SOLARIS_semop (SOLARIS_semsys_subcall + 2)
#define SOLARIS_semsys_nsubcalls 3
/* utssys subcalls */
extern int solaris_olduname(), solaris_ustat(), solaris_fusers();
#define SOLARIS_utssys_subcall 350
#define SOLARIS_olduname (SOLARIS_utssys_subcall + 0)
/* 1 is unused */
#define SOLARIS_ustat (SOLARIS_utssys_subcall + 2)
#define SOLARIS_fusers (SOLARIS_utssys_subcall + 3)
#define SOLARIS_utssys_nsubcalls 4
/* sysfs subcalls */
extern int solaris_sysfs1(), solaris_sysfs2(), solaris_sysfs3();
#define SOLARIS_sysfs_subcall 360
/* 0 is unused */
#define SOLARIS_sysfs1 (SOLARIS_sysfs_subcall + 1)
#define SOLARIS_sysfs2 (SOLARIS_sysfs_subcall + 2)
#define SOLARIS_sysfs3 (SOLARIS_sysfs_subcall + 3)
#define SOLARIS_sysfs_nsubcalls 4
/* solaris_spcall subcalls */
#undef SOLARIS_sigpending
#define SOLARIS_spcall 99
extern int solaris_sigpending(), solaris_sigfillset();
#define SOLARIS_spcall_subcall 370
/* 0 is unused */
#define SOLARIS_sigpending (SOLARIS_spcall_subcall + 1)
#define SOLARIS_sigfillset (SOLARIS_spcall_subcall + 2)
#define SOLARIS_spcall_nsubcalls 3
/* solaris_context subcalls */
extern int solaris_getcontext(), solaris_setcontext();
#define SOLARIS_context_subcall 380
#define SOLARIS_getcontext (SOLARIS_context_subcall + 0)
#define SOLARIS_setcontext (SOLARIS_context_subcall + 1)
#define SOLARIS_context_nsubcalls 2

357
linux/sparc/syscallent.h Normal file
View File

@ -0,0 +1,357 @@
{ 1, 0, sys_setup, "setup" }, /* 0 */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, 0, sys_read, "read" }, /* 3 */
{ 3, 0, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 4, TP, sys_wait4, "wait4" }, /* 7 */
{ 2, TF, sys_creat, "creat" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 2, TF|TP, sys_execv, "execv" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 0, 0, printargs, "sunos-time!"}, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "chown" }, /* 16 */
{ 1, 0, sys_brk, "brk" }, /* 17 */
{ 2, 0, printargs, "SYS_18" }, /* 18 */
{ 3, 0, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 0, 0, printargs, "SYS_21" }, /* 21 */
{ 1, TF, printargs, "SYS_22" }, /* 22 */
{ 1, 0, sys_setuid, "setuid" }, /* 23 */
{ 0, 0, sys_getuid, "getuid" }, /* 24 */
{ 1, 0, printargs, "SYS_25" }, /* 25 */
{ 5, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_alarm, "alarm" }, /* 27 */
{ 2, 0, printargs, "SYS_28" }, /* 28 */
{ 0, TS, sys_pause, "pause" }, /* 29 */
{ 2, TF, sys_utime, "utime" }, /* 30 */
{ 2, 0, sys_stty, "stty" }, /* 31 */
{ 2, 0, sys_gtty, "gtty" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
{ 1, 0, sys_nice, "nice" }, /* 34 */
{ 1, 0, sys_ftime, "ftime" }, /* 35 */
{ 0, 0, sys_sync, "sync" }, /* 36 */
{ 2, TS, sys_kill, "kill" }, /* 37 */
{ 2, TF, sys_stat, "stat" }, /* 38 */
{ 2, 0, printargs, "SYS_39" }, /* 39 */
{ 2, TF, sys_lstat, "lstat" }, /* 40 */
{ 2, 0, sys_dup, "dup" }, /* 41 */
{ 0, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 4, 0, sys_profil, "profil" }, /* 44 */
{ 0, 0, printargs, "SYS_45" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, 0, sys_getgid, "getgid" }, /* 47 */
{ 2, 0, sys_signal, "signal" }, /* 48 */
{ 0, 0, sys_geteuid, "geteuid" }, /* 49 */
{ 0, 0, sys_getegid, "getegid" }, /* 50 */
{ 1, 0, sys_acct, "acct" }, /* 51 */
{ 0, 0, printargs, "SYS_52" }, /* 52 */
{ 4, 0, sys_mctl, "mctl" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 2, 0, sys_reboot, "reboot" }, /* 55 */
{ 3, 0, printargs, "SYS_56" }, /* 56 */
{ 2, TF, sys_symlink, "symlink" }, /* 57 */
{ 3, TF, sys_readlink, "readlink" }, /* 58 */
{ 3, TF|TP, sys_execve, "execve" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_fstat, "fstat" }, /* 62 */
{ 0, 0, printargs, "SYS_63" }, /* 63 */
{ 1, 0, sys_getpagesize,"getpagesize" }, /* 64 */
{ 3, 0, sys_msync, "msync" }, /* 65 */
{ 0, TP, printargs, "SYS_66" }, /* 66 */
{ 0, 0, printargs, "SYS_67" }, /* 67 */
{ 0, 0, printargs, "SYS_68" }, /* 68 */
{ 1, 0, sys_sbrk, "sbrk" }, /* 69 */
{ 1, 0, printargs, "sstk" }, /* 70 */
{ 6, 0, sys_mmap, "mmap" }, /* 71 */
{ 1, 0, printargs, "vadvise" }, /* 72 */
{ 2, 0, sys_munmap, "munmap" }, /* 73 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 74 */
{ 3, 0, printargs, "madvise" }, /* 75 */
{ 1, 0, sys_vhangup, "vhangup" }, /* 76 */
{ 2, 0, printargs, "SYS_77" }, /* 77 */
{ 3, 0, sys_mincore, "mincore" }, /* 78 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 79 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 80 */
{ 1, 0, sys_getpgrp, "getpgrp" }, /* 81 */
{ 2, 0, sys_setpgrp, "setpgrp" }, /* 82 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 83 */
{ 0, 0, printargs, "SYS_84" }, /* 84 */
{ 1, TF, sys_swapon, "swapon" }, /* 85 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 86 */
{ 2, 0, sys_gethostname,"gethostname" }, /* 87 */
{ 2, 0, sys_sethostname,"sethostname" }, /* 88 */
{ 0, 0, sys_getdtablesize,"getdtablesize" }, /* 89 */
{ 2, 0, sys_dup2, "dup2" }, /* 90 */
{ 2, 0, printargs, "getdopt" }, /* 91 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 92 */
{ 5, 0, sys_select, "select" }, /* 93 */
{ 2, 0, printargs, "setdopt" }, /* 94 */
{ 1, 0, sys_fsync, "fsync" }, /* 95 */
{ 3, 0, sys_setpriority,"setpriority" }, /* 96 */
{ 3, TN, sys_socket, "socket" }, /* 97 */
{ 3, TN, sys_connect, "connect" }, /* 98 */
{ 3, TN, sys_accept, "accept" }, /* 99 */
{ 2, 0, sys_getpriority,"getpriority" }, /* 100 */
{ 4, TN, sys_send, "send" }, /* 101 */
{ 4, TN, sys_recv, "recv" }, /* 102 */
{ 0, 0, printargs, "SYS_103" }, /* 103 */
{ 3, TN, sys_bind, "bind" }, /* 104 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */
{ 2, TN, sys_listen, "listen" }, /* 106 */
{ 2, 0, printargs, "SYS_107" }, /* 107 */
{ 3, TS, printargs, "sigvec" }, /* 108 */
{ 1, TS, sys_sigblock, "sigblock" }, /* 109 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 110 */
{ 1, TS, printargs, "sigpause" }, /* 111 */
{ 2, TS, printargs, "sigstack" }, /* 112 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */
{ 3, 0, printargs, "vtrace" }, /* 115 */
{ 2, 0, sys_gettimeofday,"gettimeofday" }, /* 116 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 117 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
{ 0, 0, printargs, "SYS_119" }, /* 119 */
{ 3, 0, sys_readv, "readv" }, /* 120 */
{ 3, 0, sys_writev, "writev" }, /* 121 */
{ 2, 0, sys_settimeofday,"settimeofday" }, /* 122 */
{ 3, 0, sys_fchown, "fchown" }, /* 123 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 124 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 125 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 126 */
{ 2, 0, sys_setregid, "setregid" }, /* 127 */
{ 2, TF, sys_rename, "rename" }, /* 128 */
{ 2, TF, sys_truncate, "truncate" }, /* 129 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 130 */
{ 2, 0, sys_flock, "flock" }, /* 131 */
{ 0, 0, printargs, "SYS_132" }, /* 132 */
{ 6, TN, sys_sendto, "sendto" }, /* 133 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 134 */
{ 5, TN, sys_socketpair, "socketpair" }, /* 135 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 136 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 137 */
{ 2, TF, sys_utimes, "utimes" }, /* 138 */
{ 0, TS, printargs, "SYS_139" }, /* 139 */
{ 2, 0, sys_adjtime, "adjtime" }, /* 140 */
{ 3, TN, sys_getpeername,"getpeername" }, /* 141 */
{ 2, 0, sys_gethostid, "gethostid" }, /* 142 */
{ 0, 0, printargs, "SYS_143" }, /* 143 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
{ 2, TS, sys_killpg, "killpg" }, /* 146 */
{ 0, 0, printargs, "SYS_147" }, /* 147 */
{ 0, 0, printargs, "SYS_148" }, /* 148 */
{ 0, 0, printargs, "SYS_149" }, /* 149 */
{ 3, TN, sys_getsockname,"getsockname" }, /* 150 */
{ 4, TN, sys_getmsg, "getmsg" }, /* 151 */
{ 4, TN, sys_putmsg, "putmsg" }, /* 152 */
{ 4, TN, printargs, "poll" }, /* 153 */
{ 0, 0, printargs, "SYS_154" }, /* 154 */
{ 1, 0, printargs, "nfssvc" }, /* 155 */
{ 4, 0, printargs, "getdirentries" }, /* 156 */
{ 2, TF, sys_statfs, "statfs" }, /* 157 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 158 */
{ 1, TF, sys_umount, "umount" }, /* 159 */
{ 0, 0, printargs, "async_daemon" }, /* 160 */
{ 2, 0, printargs, "getfh" }, /* 161 */
{ 2, 0, printargs, "getdomainname" }, /* 162 */
{ 2, 0, sys_setdomainname,"setdomainname" }, /* 163 */
{ 5, 0, printargs, "SYS_164" }, /* 164 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 165 */
{ 2, 0, printargs, "exportfs" }, /* 166 */
{ 4, TF, sys_mount, "mount" }, /* 167 */
{ 2, 0, sys_ustat, "ustat" }, /* 168 */
{ 5, TI, printargs, "semsys" }, /* 169 */
{ 5, TI, printargs, "msgsys" }, /* 170 */
{ 5, TI, printargs, "shmsys" }, /* 171 */
{ 4, 0, printargs, "auditsys" }, /* 172 */
{ 5, 0, printargs, "rfssys" }, /* 173 */
{ 3, 0, sys_getdents, "getdents" }, /* 174 */
{ 1, 0, sys_setsid, "setsid" }, /* 175 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 176 */
{ 1, 0, sys_fchroot, "fchroot" }, /* 177 */
{ 2, 0, printargs, "vpixsys" }, /* 178 */
{ 6, 0, printargs, "aioread" }, /* 179 */
{ 6, 0, printargs, "aiowrite" }, /* 180 */
{ 1, 0, printargs, "aiowait" }, /* 181 */
{ 1, 0, printargs, "aiocancel" }, /* 182 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 183 */
{ 0, 0, printargs, "SYS_184" }, /* 184 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 185 */
{ 2, TF, printargs, "pathconf" }, /* 186 */
{ 2, 0, printargs, "fpathconf" }, /* 187 */
{ 1, 0, printargs, "sysconf" }, /* 188 */
{ 1, 0, sys_uname, "uname" }, /* 189 */
/* Linux only system calls */
{ 4, 0, sys_init_module,"init_module" }, /* 190 */
{ 1, 0, sys_personality,"personality" }, /* 191 */
{ 0, 0, sys_prof, "prof" }, /* 192 */
{ 0, 0, sys_break, "break" }, /* 193 */
{ 0, 0, sys_lock, "lock" }, /* 194 */
{ 0, 0, sys_mpx, "mpx" }, /* 195 */
{ 2, 0, sys_ulimit, "ulimit" }, /* 196 */
{ 0, 0, sys_getppid, "getppid" }, /* 197 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 198 */
{ 5, 0, printargs, "sgetmask" }, /* 199 */
{ 5, 0, printargs, "ssetmask" }, /* 200 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 201 */
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 202 */
{ 1, TF, sys_uselib, "uselib" }, /* 203 */
{ 3, 0, sys_readdir, "readdir" }, /* 204 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 205 */
{ 2, 0, sys_socketcall, "socketcall" }, /* 206 */
{ 3, 0, sys_syslog, "syslog" }, /* 207 */
{ 1, 0, sys_olduname, "olduname" }, /* 208 */
{ 1, 0, sys_iopl, "iopl" }, /* 209 */
{ 0, 0, sys_idle, "idle" }, /* 210 */
{ 1, 0, sys_vm86, "vm86" }, /* 211 */
{ 3, TP, sys_waitpid, "waitpid" }, /* 212 */
{ 1, 0, sys_swapoff, "swapoff" }, /* 213 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 214 */
{ 5, 0, sys_ipc, "ipc" }, /* 215 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 216 */
{ 2, TP, sys_clone, "clone" }, /* 217 */
{ 3, 0, sys_modify_ldt, "modify_ldt" }, /* 218 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 219 */
{ 3, TS, sys_sigprocmask,"sigprocmask" }, /* 220 */
{ 2, 0, sys_create_module,"create_module" }, /* 221 */
{ 1, 0, sys_delete_module,"delete_module" },
{ 1, 0, sys_get_kernel_syms,"get_kernel_syms"}, /* 223 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 224 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 225 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 226 */
{ 5, 0, sys_afs_syscall,"afs_syscall" }, /* 227 */
{ 1, 0, sys_setfsuid, "setfsuid" }, /* 228 */
{ 1, 0, sys_setfsgid, "setfsgid" }, /* 229 */
{ 5, 0, printargs, "_newselect" }, /* 230 */
{ 1, 0, sys_time, "time" }, /* 231 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 232 */
{ 1, 0, sys_stime, "stime" }, /* 233 */
{ 2, 0, sys_oldfstat, "oldfstat" }, /* 234 */
{ 0, 0, sys_phys, "phys" }, /* 235 */
{ 5, 0, printargs, "_llseek" }, /* 236 */
{ 5, 0, sys_mlock, "mlock" }, /* 237 */
{ 5, 0, sys_munlock, "munlock" }, /* 238 */
{ 5, 0, sys_mlockall, "mlockall" }, /* 239 */
{ 5, 0, sys_munlockall, "munlockall" }, /* 240 */
{ 5, 0, sys_sched_setparam,"sched_setparam"}, /* 241 */
{ 5, 0, sys_sched_getparam,"sched_getparam"}, /* 242 */
{ 5, 0, sys_sched_setscheduler,"sched_setscheduler"}, /* 243 */
{ 5, 0, sys_sched_getscheduler,"sched_getscheduler"}, /* 244 */
{ 5, 0, sys_sched_yield,"sched_yield" }, /* 245 */
{ 5, 0,sys_sched_get_priority_max,"sched_get_priority_max"}, /* 246 */
{ 5, 0,sys_sched_get_priority_min,"sched_get_priority_min"}, /* 247 */
{ 5, 0,sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 248 */
{ 5, 0, sys_nanosleep, "nanosleep" }, /* 249 */
{ 5, 0, sys_mremap, "mremap" }, /* 250 */
{ 5, 0, sys_sysctl, "_sysctl" }, /* 251 */
{ 5, 0, sys_getsid, "getsid" }, /* 252 */
{ 5, 0, sys_fdatasync, "fdatasync" }, /* 253 */
{ 5, 0, printargs, "SYS_254" }, /* 254 */
{ 5, 0, printargs, "SYS_255" }, /* 255 */
{ 5, 0, printargs, "SYS_256" }, /* 256 */
{ 5, 0, printargs, "SYS_257" }, /* 257 */
{ 5, 0, printargs, "SYS_258" }, /* 258 */
{ 5, 0, printargs, "SYS_259" }, /* 259 */
{ 5, 0, printargs, "SYS_260" }, /* 260 */
{ 5, 0, printargs, "SYS_261" }, /* 261 */
{ 5, 0, printargs, "SYS_262" }, /* 262 */
{ 5, 0, printargs, "SYS_263" }, /* 263 */
{ 5, 0, printargs, "SYS_264" }, /* 264 */
{ 5, 0, printargs, "SYS_265" }, /* 265 */
{ 5, 0, printargs, "SYS_266" }, /* 266 */
{ 5, 0, printargs, "SYS_267" }, /* 267 */
{ 5, 0, printargs, "SYS_268" }, /* 268 */
{ 5, 0, printargs, "SYS_269" }, /* 269 */
{ 5, 0, printargs, "SYS_270" }, /* 270 */
{ 5, 0, printargs, "SYS_271" }, /* 271 */
{ 5, 0, printargs, "SYS_272" }, /* 272 */
{ 5, 0, printargs, "SYS_273" }, /* 273 */
{ 5, 0, printargs, "SYS_274" }, /* 274 */
{ 5, 0, printargs, "SYS_275" }, /* 275 */
{ 5, 0, printargs, "SYS_276" }, /* 276 */
{ 5, 0, printargs, "SYS_277" }, /* 277 */
{ 5, 0, printargs, "SYS_278" }, /* 278 */
{ 5, 0, printargs, "SYS_279" }, /* 279 */
{ 5, 0, printargs, "SYS_280" }, /* 280 */
{ 5, 0, printargs, "SYS_281" }, /* 281 */
{ 5, 0, printargs, "SYS_282" }, /* 282 */
{ 5, 0, printargs, "SYS_283" }, /* 283 */
{ 5, 0, printargs, "SYS_284" }, /* 284 */
{ 5, 0, printargs, "SYS_285" }, /* 285 */
{ 5, 0, printargs, "SYS_286" }, /* 286 */
{ 5, 0, printargs, "SYS_287" }, /* 287 */
{ 5, 0, printargs, "SYS_288" }, /* 288 */
{ 5, 0, printargs, "SYS_289" }, /* 289 */
{ 5, 0, printargs, "SYS_290" }, /* 290 */
{ 5, 0, printargs, "SYS_291" }, /* 291 */
{ 5, 0, printargs, "SYS_292" }, /* 292 */
{ 5, 0, printargs, "SYS_293" }, /* 293 */
{ 5, 0, printargs, "SYS_294" }, /* 294 */
{ 5, 0, printargs, "SYS_295" }, /* 295 */
{ 5, 0, printargs, "SYS_296" }, /* 296 */
{ 5, 0, printargs, "SYS_297" }, /* 297 */
{ 5, 0, printargs, "SYS_298" }, /* 298 */
{ 5, 0, printargs, "SYS_299" }, /* 299 */
{ 5, 0, printargs, "SYS_300" }, /* 300 */
{ 5, 0, printargs, "SYS_301" }, /* 301 */
{ 5, 0, printargs, "SYS_302" }, /* 302 */
{ 5, 0, printargs, "SYS_303" }, /* 303 */
{ 5, 0, printargs, "SYS_304" }, /* 304 */
{ 5, 0, printargs, "SYS_305" }, /* 305 */
{ 5, 0, printargs, "SYS_306" }, /* 306 */
{ 5, 0, printargs, "SYS_307" }, /* 307 */
{ 5, 0, printargs, "SYS_308" }, /* 308 */
{ 5, 0, printargs, "SYS_309" }, /* 309 */
{ 5, 0, printargs, "SYS_310" }, /* 310 */
{ 5, 0, printargs, "SYS_311" }, /* 311 */
{ 5, 0, printargs, "SYS_312" }, /* 312 */
{ 5, 0, printargs, "SYS_313" }, /* 313 */
{ 5, 0, printargs, "SYS_314" }, /* 314 */
{ 5, 0, printargs, "SYS_315" }, /* 315 */
{ 5, 0, printargs, "SYS_316" }, /* 316 */
{ 5, 0, printargs, "SYS_317" }, /* 317 */
{ 5, 0, printargs, "SYS_318" }, /* 318 */
{ 5, 0, printargs, "SYS_319" }, /* 319 */
{ 5, 0, printargs, "SYS_320" }, /* 320 */
{ 5, 0, printargs, "SYS_321" }, /* 321 */
{ 5, 0, printargs, "SYS_322" }, /* 322 */
{ 5, 0, printargs, "SYS_323" }, /* 323 */
{ 5, 0, printargs, "SYS_324" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
{ 5, 0, printargs, "SYS_326" }, /* 326 */
{ 5, 0, printargs, "SYS_327" }, /* 327 */
{ 5, 0, printargs, "SYS_328" }, /* 328 */
{ 5, 0, printargs, "SYS_329" }, /* 329 */
{ 5, 0, printargs, "SYS_330" }, /* 330 */
{ 5, 0, printargs, "SYS_331" }, /* 331 */
{ 5, 0, printargs, "SYS_332" }, /* 332 */
{ 5, 0, printargs, "SYS_333" }, /* 333 */
{ 5, 0, printargs, "SYS_334" }, /* 334 */
{ 5, 0, printargs, "SYS_335" }, /* 335 */
{ 5, 0, printargs, "SYS_336" }, /* 336 */
{ 5, 0, printargs, "SYS_337" }, /* 337 */
{ 5, 0, printargs, "SYS_338" }, /* 338 */
{ 5, 0, printargs, "SYS_339" }, /* 339 */
{ 5, 0, printargs, "SYS_340" }, /* 340 */
{ 5, 0, printargs, "SYS_341" }, /* 341 */
{ 5, 0, printargs, "SYS_342" }, /* 342 */
{ 5, 0, printargs, "SYS_343" }, /* 343 */
{ 5, 0, printargs, "SYS_344" }, /* 344 */
{ 5, 0, printargs, "SYS_345" }, /* 345 */
{ 5, 0, printargs, "SYS_346" }, /* 346 */
{ 5, 0, printargs, "SYS_347" }, /* 347 */
{ 5, 0, printargs, "SYS_348" }, /* 348 */
{ 5, 0, printargs, "SYS_349" }, /* 349 */
{ 5, 0, printargs, "SYS_350" }, /* 350 */
{ 5, 0, printargs, "SYS_351" }, /* 351 */
{ 5, 0, printargs, "SYS_352" }, /* 352 */

439
linux/sparc/syscallent1.h Normal file
View File

@ -0,0 +1,439 @@
/*
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
{ 6, 0, solaris_syscall, "syscall" }, /* 0 */
{ 6, TP, solaris_exit, "_exit" }, /* 1 */
{ 6, TP, solaris_fork, "fork" }, /* 2 */
{ 6, 0, solaris_read, "read" }, /* 3 */
{ 6, 0, solaris_write, "write" }, /* 4 */
{ 6, TF, solaris_open, "open" }, /* 5 */
{ 6, 0, solaris_close, "close" }, /* 6 */
{ 6, TP, solaris_wait, "wait" }, /* 7 */
{ 6, TF, solaris_creat, "creat" }, /* 8 */
{ 6, TF, solaris_link, "link" }, /* 9 */
{ 6, TF, solaris_unlink, "unlink" }, /* 10 */
{ 6, TF|TP, solaris_exec, "exec" }, /* 11 */
{ 6, TF, solaris_chdir, "chdir" }, /* 12 */
{ 6, 0, solaris_time, "time" }, /* 13 */
{ 6, TF, solaris_mknod, "mknod" }, /* 14 */
{ 6, TF, solaris_chmod, "chmod" }, /* 15 */
{ 6, TF, solaris_chown, "chown" }, /* 16 */
{ 6, 0, solaris_brk, "brk" }, /* 17 */
{ 6, TF, solaris_stat, "stat" }, /* 18 */
{ 6, 0, solaris_lseek, "lseek" }, /* 19 */
{ 6, 0, solaris_getpid, "getpid" }, /* 20 */
{ 6, TF, solaris_mount, "mount" }, /* 21 */
{ 6, TF, solaris_umount, "umount" }, /* 22 */
{ 6, 0, solaris_setuid, "setuid" }, /* 23 */
{ 6, 0, solaris_getuid, "getuid" }, /* 24 */
{ 6, 0, solaris_stime, "stime" }, /* 25 */
{ 6, 0, solaris_ptrace, "ptrace" }, /* 26 */
{ 6, 0, solaris_alarm, "alarm" }, /* 27 */
{ 6, 0, solaris_fstat, "fstat" }, /* 28 */
{ 6, TS, solaris_pause, "pause" }, /* 29 */
{ 6, TF, solaris_utime, "utime" }, /* 30 */
{ 6, 0, solaris_stty, "stty" }, /* 31 */
{ 6, 0, solaris_gtty, "gtty" }, /* 32 */
{ 6, TF, solaris_access, "access" }, /* 33 */
{ 6, 0, solaris_nice, "nice" }, /* 34 */
{ 6, TF, solaris_statfs, "statfs" }, /* 35 */
{ 6, 0, solaris_sync, "sync" }, /* 36 */
{ 6, TS, solaris_kill, "kill" }, /* 37 */
{ 6, 0, solaris_fstatfs, "fstatfs" }, /* 38 */
{ 6, 0, solaris_pgrpsys, "pgrpsys" }, /* 39 */
{ 6, 0, solaris_xenix, "xenix" }, /* 40 */
{ 6, 0, solaris_dup, "dup" }, /* 41 */
{ 6, 0, solaris_pipe, "pipe" }, /* 42 */
{ 6, 0, solaris_times, "times" }, /* 43 */
{ 6, 0, solaris_profil, "profil" }, /* 44 */
{ 6, 0, solaris_plock, "plock" }, /* 45 */
{ 6, 0, solaris_setgid, "setgid" }, /* 46 */
{ 6, 0, solaris_getgid, "getgid" }, /* 47 */
{ 6, 0, solaris_sigcall, "sigcall" }, /* 48 */
{ 6, TI, solaris_msgsys, "msgsys" }, /* 49 */
{ 6, 0, solaris_syssun, "syssun" }, /* 50 */
{ 6, TF, solaris_acct, "acct" }, /* 51 */
{ 6, TI, solaris_shmsys, "shmsys" }, /* 52 */
{ 6, TI, solaris_semsys, "semsys" }, /* 53 */
{ 6, 0, solaris_ioctl, "ioctl" }, /* 54 */
{ 6, 0, solaris_uadmin, "uadmin" }, /* 55 */
{ 6, 0, solaris_sysmp, "sysmp" }, /* 56 */
{ 6, 0, solaris_utssys, "utssys" }, /* 57 */
{ 6, 0, solaris_fdsync, "fdsync" }, /* 58 */
{ 6, TF|TP, solaris_execve, "execve" }, /* 59 */
{ 6, 0, solaris_umask, "umask" }, /* 60 */
{ 6, TF, solaris_chroot, "chroot" }, /* 61 */
{ 6, 0, solaris_fcntl, "fcntl" }, /* 62 */
{ 6, 0, solaris_ulimit, "ulimit" }, /* 63 */
{ 6, 0, printargs, "SYS_64" }, /* 64 */
{ 6, 0, printargs, "SYS_65" }, /* 65 */
{ 6, 0, printargs, "SYS_66" }, /* 66 */
{ 6, 0, printargs, "SYS_67" }, /* 67 */
{ 6, 0, printargs, "SYS_68" }, /* 68 */
{ 6, 0, printargs, "SYS_69" }, /* 69 */
{ 6, 0, printargs, "SYS_70" }, /* 70 */
{ 6, 0, printargs, "SYS_71" }, /* 71 */
{ 6, 0, printargs, "SYS_72" }, /* 72 */
{ 6, 0, printargs, "SYS_73" }, /* 73 */
{ 6, 0, printargs, "SYS_74" }, /* 74 */
{ 6, 0, printargs, "SYS_75" }, /* 75 */
{ 6, 0, printargs, "SYS_76" }, /* 76 */
{ 6, 0, printargs, "SYS_77" }, /* 77 */
{ 6, 0, printargs, "SYS_78" }, /* 78 */
{ 6, TF, solaris_rmdir, "rmdir" }, /* 79 */
{ 6, TF, solaris_mkdir, "mkdir" }, /* 80 */
{ 6, 0, solaris_getdents, "getdents" }, /* 81 */
{ 6, 0, solaris_sginap, "sginap" }, /* 82 */
{ 6, 0, solaris_sgikopt, "sgikopt" }, /* 83 */
{ 6, 0, solaris_sysfs, "sysfs" }, /* 84 */
{ 6, TN, sys_getmsg, "getmsg" }, /* 85 */
{ 6, TN, sys_putmsg, "putmsg" }, /* 86 */
{ 6, TN, solaris_poll, "poll" }, /* 87 */
{ 6, TF, solaris_lstat, "lstat" }, /* 88 */
{ 6, TF, solaris_symlink, "symlink" }, /* 89 */
{ 6, TF, solaris_readlink, "readlink" }, /* 90 */
{ 6, 0, solaris_setgroups, "setgroups" }, /* 91 */
{ 6, 0, solaris_getgroups, "getgroups" }, /* 92 */
{ 6, 0, solaris_fchmod, "fchmod" }, /* 93 */
{ 6, 0, solaris_fchown, "fchown" }, /* 94 */
{ 6, TS, solaris_sigprocmask, "sigprocmask" }, /* 95 */
{ 6, TS, solaris_sigsuspend, "sigsuspend" }, /* 96 */
{ 6, TS, solaris_sigaltstack, "sigaltstack" }, /* 97 */
{ 6, TS, solaris_sigaction, "sigaction" }, /* 98 */
{ 6, 0, solaris_spcall, "spcall" }, /* 99 */
{ 6, 0, solaris_context, "context" }, /* 100 */
{ 6, 0, solaris_evsys, "evsys" }, /* 101 */
{ 6, 0, solaris_evtrapret, "evtrapret" }, /* 102 */
{ 6, TF, solaris_statvfs, "statvfs" }, /* 103 */
{ 6, 0, solaris_fstatvfs, "fstatvfs" }, /* 104 */
{ 6, 0, printargs, "SYS_105" }, /* 105 */
{ 6, 0, solaris_nfssys, "nfssys" }, /* 106 */
{ 6, TP, solaris_waitid, "waitid" }, /* 107 */
{ 6, 0, solaris_sigsendsys, "sigsendsys" }, /* 108 */
{ 6, 0, solaris_hrtsys, "hrtsys" }, /* 109 */
{ 6, 0, solaris_acancel, "acancel" }, /* 110 */
{ 6, 0, solaris_async, "async" }, /* 111 */
{ 6, 0, solaris_priocntlsys, "priocntlsys" }, /* 112 */
{ 6, TF, solaris_pathconf, "pathconf" }, /* 113 */
{ 6, 0, solaris_mincore, "mincore" }, /* 114 */
{ 6, 0, solaris_mmap, "mmap" }, /* 115 */
{ 6, 0, solaris_mprotect, "mprotect" }, /* 116 */
{ 6, 0, solaris_munmap, "munmap" }, /* 117 */
{ 6, 0, solaris_fpathconf, "fpathconf" }, /* 118 */
{ 6, TP, solaris_vfork, "vfork" }, /* 119 */
{ 6, 0, solaris_fchdir, "fchdir" }, /* 120 */
{ 6, 0, solaris_readv, "readv" }, /* 121 */
{ 6, 0, solaris_writev, "writev" }, /* 122 */
{ 6, TF, solaris_xstat, "xstat" }, /* 123 */
{ 6, TF, solaris_lxstat, "lxstat" }, /* 124 */
{ 6, 0, solaris_fxstat, "fxstat" }, /* 125 */
{ 6, TF, solaris_xmknod, "xmknod" }, /* 126 */
{ 6, 0, solaris_clocal, "clocal" }, /* 127 */
{ 6, 0, solaris_setrlimit, "setrlimit" }, /* 128 */
{ 6, 0, solaris_getrlimit, "getrlimit" }, /* 129 */
{ 6, TF, solaris_lchown, "lchown" }, /* 130 */
{ 6, 0, solaris_memcntl, "memcntl" }, /* 131 */
{ 6, TN, solaris_getpmsg, "getpmsg" }, /* 132 */
{ 6, TN, solaris_putpmsg, "putpmsg" }, /* 133 */
{ 6, TF, solaris_rename, "rename" }, /* 134 */
{ 6, 0, solaris_uname, "uname" }, /* 135 */
{ 6, 0, solaris_setegid, "setegid" }, /* 136 */
{ 6, 0, solaris_sysconfig, "sysconfig" }, /* 137 */
{ 6, 0, solaris_adjtime, "adjtime" }, /* 138 */
{ 6, 0, solaris_sysinfo, "sysinfo" }, /* 139 */
{ 6, 0, printargs, "SYS_140" }, /* 140 */
{ 6, 0, solaris_seteuid, "seteuid" }, /* 141 */
{ 6, 0, solaris_vtrace, "vtrace" }, /* 142 */
{ 6, TP, solaris_fork1, "fork1" }, /* 143 */
{ 6, TS, solaris_sigtimedwait, "sigtimedwait" }, /* 144 */
{ 6, 0, solaris_lwp_info, "lwp_info" }, /* 145 */
{ 6, 0, solaris_yield, "yield" }, /* 146 */
{ 6, 0, solaris_lwp_sema_wait, "lwp_sema_wait" }, /* 147 */
{ 6, 0, solaris_lwp_sema_post, "lwp_sema_post" }, /* 148 */
{ 6, 0, printargs, "SYS_149" }, /* 149 */
{ 6, 0, printargs, "SYS_150" }, /* 150 */
{ 6, 0, printargs, "SYS_151" }, /* 151 */
{ 6, 0, solaris_modctl, "modctl" }, /* 152 */
{ 6, 0, solaris_fchroot, "fchroot" }, /* 153 */
{ 6, TF, solaris_utimes, "utimes" }, /* 154 */
{ 6, 0, solaris_vhangup, "vhangup" }, /* 155 */
{ 6, 0, solaris_gettimeofday, "gettimeofday" }, /* 156 */
{ 6, 0, solaris_getitimer, "getitimer" }, /* 157 */
{ 6, 0, solaris_setitimer, "setitimer" }, /* 158 */
{ 6, 0, solaris_lwp_create, "lwp_create" }, /* 159 */
{ 6, 0, solaris_lwp_exit, "lwp_exit" }, /* 160 */
{ 6, 0, solaris_lwp_suspend, "lwp_suspend" }, /* 161 */
{ 6, 0, solaris_lwp_continue, "lwp_continue" }, /* 162 */
{ 6, 0, solaris_lwp_kill, "lwp_kill" }, /* 163 */
{ 6, 0, solaris_lwp_self, "lwp_self" }, /* 164 */
{ 6, 0, solaris_lwp_setprivate, "lwp_setprivate"}, /* 165 */
{ 6, 0, solaris_lwp_getprivate, "lwp_getprivate"}, /* 166 */
{ 6, 0, solaris_lwp_wait, "lwp_wait" }, /* 167 */
{ 6, 0, solaris_lwp_mutex_unlock,"lwp_mutex_unlock"}, /* 168 */
{ 6, 0, solaris_lwp_mutex_lock, "lwp_mutex_lock"}, /* 169 */
{ 6, 0, solaris_lwp_cond_wait, "lwp_cond_wait"}, /* 170 */
{ 6, 0, solaris_lwp_cond_signal,"lwp_cond_signal"}, /* 171 */
{ 6, 0, solaris_lwp_cond_broadcast,"lwp_cond_broadcast"}, /* 172 */
{ 6, 0, solaris_pread, "pread" }, /* 173 */
{ 6, 0, solaris_pwrite, "pwrite" }, /* 174 */
{ 6, 0, solaris_llseek, "llseek" }, /* 175 */
{ 6, 0, solaris_inst_sync, "inst_sync" }, /* 176 */
{ 6, 0, printargs, "SYS_177" }, /* 177 */
{ 6, 0, printargs, "SYS_178" }, /* 178 */
{ 6, 0, printargs, "SYS_179" }, /* 179 */
{ 6, 0, printargs, "SYS_180" }, /* 180 */
{ 6, 0, printargs, "SYS_181" }, /* 181 */
{ 6, 0, printargs, "SYS_182" }, /* 182 */
{ 6, 0, printargs, "SYS_183" }, /* 183 */
{ 6, 0, printargs, "SYS_184" }, /* 184 */
{ 6, 0, printargs, "SYS_185" }, /* 185 */
{ 6, 0, solaris_auditsys, "auditsys" }, /* 186 */
{ 6, 0, solaris_processor_bind, "processor_bind"}, /* 187 */
{ 6, 0, solaris_processor_info, "processor_info"}, /* 188 */
{ 6, 0, solaris_p_online, "p_online" }, /* 189 */
{ 6, 0, solaris_sigqueue, "sigqueue" }, /* 190 */
{ 6, 0, solaris_clock_gettime, "clock_gettime" }, /* 191 */
{ 6, 0, solaris_clock_settime, "clock_settime" }, /* 192 */
{ 6, 0, solaris_clock_getres, "clock_getres" }, /* 193 */
{ 6, 0, solaris_timer_create, "timer_create" }, /* 194 */
{ 6, 0, solaris_timer_delete, "timer_delete" }, /* 195 */
{ 6, 0, solaris_timer_settime, "timer_settime" }, /* 196 */
{ 6, 0, solaris_timer_gettime, "timer_gettime" }, /* 197 */
{ 6, 0, solaris_timer_getoverrun,"timer_getoverrun"}, /* 198 */
{ 6, 0, solaris_nanosleep, "nanosleep" }, /* 199 */
{ 6, 0, printargs, "SYS_200" }, /* 200 */
{ 6, 0, printargs, "SYS_201" }, /* 201 */
{ 6, 0, printargs, "SYS_202" }, /* 202 */
{ 6, 0, printargs, "SYS_203" }, /* 203 */
{ 6, 0, printargs, "SYS_204" }, /* 204 */
{ 6, 0, printargs, "SYS_205" }, /* 205 */
{ 6, 0, printargs, "SYS_206" }, /* 206 */
{ 6, 0, printargs, "SYS_207" }, /* 207 */
{ 6, 0, printargs, "SYS_208" }, /* 208 */
{ 6, 0, printargs, "SYS_209" }, /* 209 */
{ 6, 0, printargs, "SYS_210" }, /* 210 */
{ 6, 0, printargs, "SYS_211" }, /* 211 */
{ 6, 0, printargs, "SYS_212" }, /* 212 */
{ 6, 0, printargs, "SYS_213" }, /* 213 */
{ 6, 0, printargs, "SYS_214" }, /* 214 */
{ 6, 0, printargs, "SYS_215" }, /* 215 */
{ 6, 0, printargs, "SYS_216" }, /* 216 */
{ 6, 0, printargs, "SYS_217" }, /* 217 */
{ 6, 0, printargs, "SYS_218" }, /* 218 */
{ 6, 0, printargs, "SYS_219" }, /* 219 */
{ 6, 0, printargs, "SYS_220" }, /* 220 */
{ 6, 0, printargs, "SYS_221" }, /* 221 */
{ 6, 0, printargs, "SYS_222" }, /* 222 */
{ 6, 0, printargs, "SYS_223" }, /* 223 */
{ 6, 0, printargs, "SYS_224" }, /* 224 */
{ 6, 0, printargs, "SYS_225" }, /* 225 */
{ 6, 0, printargs, "SYS_226" }, /* 226 */
{ 6, 0, printargs, "SYS_227" }, /* 227 */
{ 6, 0, printargs, "SYS_228" }, /* 228 */
{ 6, 0, printargs, "SYS_229" }, /* 229 */
{ 6, 0, printargs, "SYS_230" }, /* 230 */
{ 6, 0, printargs, "SYS_231" }, /* 231 */
{ 6, 0, printargs, "SYS_232" }, /* 232 */
{ 6, 0, printargs, "SYS_233" }, /* 233 */
{ 6, 0, printargs, "SYS_234" }, /* 234 */
{ 6, 0, printargs, "SYS_235" }, /* 235 */
{ 6, 0, printargs, "SYS_236" }, /* 236 */
{ 6, 0, printargs, "SYS_237" }, /* 237 */
{ 6, 0, printargs, "SYS_238" }, /* 238 */
{ 6, 0, printargs, "SYS_239" }, /* 239 */
{ 6, 0, printargs, "SYS_240" }, /* 240 */
{ 6, 0, printargs, "SYS_241" }, /* 241 */
{ 6, 0, printargs, "SYS_242" }, /* 242 */
{ 6, 0, printargs, "SYS_243" }, /* 243 */
{ 6, 0, printargs, "SYS_244" }, /* 244 */
{ 6, 0, printargs, "SYS_245" }, /* 245 */
{ 6, 0, printargs, "SYS_246" }, /* 246 */
{ 6, 0, printargs, "SYS_247" }, /* 247 */
{ 6, 0, printargs, "SYS_248" }, /* 248 */
{ 6, 0, printargs, "SYS_249" }, /* 249 */
{ 6, 0, printargs, "SYS_250" }, /* 250 */
{ 6, 0, printargs, "SYS_251" }, /* 251 */
{ 6, 0, printargs, "SYS_252" }, /* 252 */
{ 6, 0, printargs, "SYS_253" }, /* 253 */
{ 6, 0, printargs, "SYS_254" }, /* 254 */
{ 6, 0, printargs, "SYS_255" }, /* 255 */
{ 6, 0, printargs, "SYS_256" }, /* 256 */
{ 6, 0, printargs, "SYS_257" }, /* 257 */
{ 6, 0, printargs, "SYS_258" }, /* 258 */
{ 6, 0, printargs, "SYS_259" }, /* 259 */
{ 6, 0, printargs, "SYS_260" }, /* 260 */
{ 6, 0, printargs, "SYS_261" }, /* 261 */
{ 6, 0, printargs, "SYS_262" }, /* 262 */
{ 6, 0, printargs, "SYS_263" }, /* 263 */
{ 6, 0, printargs, "SYS_264" }, /* 264 */
{ 6, 0, printargs, "SYS_265" }, /* 265 */
{ 6, 0, printargs, "SYS_266" }, /* 266 */
{ 6, 0, printargs, "SYS_267" }, /* 267 */
{ 6, 0, printargs, "SYS_268" }, /* 268 */
{ 6, 0, printargs, "SYS_269" }, /* 269 */
{ 6, 0, printargs, "SYS_270" }, /* 270 */
{ 6, 0, printargs, "SYS_271" }, /* 271 */
{ 6, 0, printargs, "SYS_272" }, /* 272 */
{ 6, 0, printargs, "SYS_273" }, /* 273 */
{ 6, 0, printargs, "SYS_274" }, /* 274 */
{ 6, 0, printargs, "SYS_275" }, /* 275 */
{ 6, 0, printargs, "SYS_276" }, /* 276 */
{ 6, 0, printargs, "SYS_277" }, /* 277 */
{ 6, 0, printargs, "SYS_278" }, /* 278 */
{ 6, 0, printargs, "SYS_279" }, /* 279 */
{ 6, 0, printargs, "SYS_280" }, /* 280 */
{ 6, 0, printargs, "SYS_281" }, /* 281 */
{ 6, 0, printargs, "SYS_282" }, /* 282 */
{ 6, 0, printargs, "SYS_283" }, /* 283 */
{ 6, 0, printargs, "SYS_284" }, /* 284 */
{ 6, 0, printargs, "SYS_285" }, /* 285 */
{ 6, 0, printargs, "SYS_286" }, /* 286 */
{ 6, 0, printargs, "SYS_287" }, /* 287 */
{ 6, 0, printargs, "SYS_288" }, /* 288 */
{ 6, 0, printargs, "SYS_289" }, /* 289 */
{ 6, 0, printargs, "SYS_290" }, /* 290 */
{ 6, 0, printargs, "SYS_291" }, /* 291 */
{ 6, 0, printargs, "SYS_292" }, /* 292 */
{ 6, 0, printargs, "SYS_293" }, /* 293 */
{ 6, 0, printargs, "SYS_294" }, /* 294 */
{ 6, 0, printargs, "SYS_295" }, /* 295 */
{ 6, 0, printargs, "SYS_296" }, /* 296 */
{ 6, 0, printargs, "SYS_297" }, /* 297 */
{ 6, 0, printargs, "SYS_298" }, /* 298 */
{ 6, 0, printargs, "SYS_299" }, /* 299 */
{ 6, 0, solaris_getpgrp, "getpgrp" }, /* 300 */
{ 6, 0, solaris_setpgrp, "setpgrp" }, /* 301 */
{ 6, 0, solaris_getsid, "getsid" }, /* 302 */
{ 6, 0, solaris_setsid, "setsid" }, /* 303 */
{ 6, 0, solaris_getpgid, "getpgid" }, /* 304 */
{ 6, 0, solaris_setpgid, "setpgid" }, /* 305 */
{ 6, 0, printargs, "SYS_306" }, /* 306 */
{ 6, 0, printargs, "SYS_307" }, /* 307 */
{ 6, 0, printargs, "SYS_308" }, /* 308 */
{ 6, 0, printargs, "SYS_309" }, /* 309 */
{ 6, TS, solaris_signal, "signal" }, /* 310 */
{ 6, TS, solaris_sigset, "sigset" }, /* 311 */
{ 6, TS, solaris_sighold, "sighold" }, /* 312 */
{ 6, TS, solaris_sigrelse, "sigrelse" }, /* 313 */
{ 6, TS, solaris_sigignore, "sigignore" }, /* 314 */
{ 6, TS, solaris_sigpause, "sigpause" }, /* 315 */
{ 6, 0, printargs, "SYS_316" }, /* 316 */
{ 6, 0, printargs, "SYS_317" }, /* 317 */
{ 6, 0, printargs, "SYS_318" }, /* 318 */
{ 6, 0, printargs, "SYS_319" }, /* 319 */
{ 6, TI, solaris_msgget, "msgget" }, /* 320 */
{ 6, TI, solaris_msgctl, "msgctl" }, /* 321 */
{ 6, TI, solaris_msgrcv, "msgrcv" }, /* 322 */
{ 6, TI, solaris_msgsnd, "msgsnd" }, /* 323 */
{ 6, 0, printargs, "SYS_324" }, /* 324 */
{ 6, 0, printargs, "SYS_325" }, /* 325 */
{ 6, 0, printargs, "SYS_326" }, /* 326 */
{ 6, 0, printargs, "SYS_327" }, /* 327 */
{ 6, 0, printargs, "SYS_328" }, /* 328 */
{ 6, 0, printargs, "SYS_329" }, /* 329 */
{ 6, TI, solaris_shmat, "shmat" }, /* 330 */
{ 6, TI, solaris_shmctl, "shmctl" }, /* 331 */
{ 6, TI, solaris_shmdt, "shmdt" }, /* 332 */
{ 6, TI, solaris_shmget, "shmget" }, /* 333 */
{ 6, 0, printargs, "SYS_334" }, /* 334 */
{ 6, 0, printargs, "SYS_335" }, /* 335 */
{ 6, 0, printargs, "SYS_336" }, /* 336 */
{ 6, 0, printargs, "SYS_337" }, /* 337 */
{ 6, 0, printargs, "SYS_338" }, /* 338 */
{ 6, 0, printargs, "SYS_339" }, /* 339 */
{ 6, TI, solaris_semctl, "semctl" }, /* 340 */
{ 6, TI, solaris_semget, "semget" }, /* 341 */
{ 6, TI, solaris_semop, "semop" }, /* 342 */
{ 6, 0, printargs, "SYS_343" }, /* 343 */
{ 6, 0, printargs, "SYS_344" }, /* 344 */
{ 6, 0, printargs, "SYS_345" }, /* 345 */
{ 6, 0, printargs, "SYS_346" }, /* 346 */
{ 6, 0, printargs, "SYS_347" }, /* 347 */
{ 6, 0, printargs, "SYS_348" }, /* 348 */
{ 6, 0, printargs, "SYS_349" }, /* 349 */
{ 6, 0, solaris_olduname, "olduname" }, /* 350 */
{ 6, 0, printargs, "utssys1" }, /* 351 */
{ 6, 0, solaris_ustat, "ustat" }, /* 352 */
{ 6, 0, solaris_fusers, "fusers" }, /* 353 */
{ 6, 0, printargs, "SYS_354" }, /* 354 */
{ 6, 0, printargs, "SYS_355" }, /* 355 */
{ 6, 0, printargs, "SYS_356" }, /* 356 */
{ 6, 0, printargs, "SYS_357" }, /* 357 */
{ 6, 0, printargs, "SYS_358" }, /* 358 */
{ 6, 0, printargs, "SYS_359" }, /* 359 */
{ 6, 0, printargs, "sysfs0" }, /* 360 */
{ 6, 0, solaris_sysfs1, "sysfs1" }, /* 361 */
{ 6, 0, solaris_sysfs2, "sysfs2" }, /* 362 */
{ 6, 0, solaris_sysfs3, "sysfs3" }, /* 363 */
{ 6, 0, printargs, "SYS_364" }, /* 364 */
{ 6, 0, printargs, "SYS_365" }, /* 365 */
{ 6, 0, printargs, "SYS_366" }, /* 366 */
{ 6, 0, printargs, "SYS_367" }, /* 367 */
{ 6, 0, printargs, "SYS_368" }, /* 368 */
{ 6, 0, printargs, "SYS_369" }, /* 369 */
{ 6, 0, printargs, "spcall0" }, /* 370 */
{ 6, TS, solaris_sigpending, "sigpending" }, /* 371 */
{ 6, TS, solaris_sigfillset, "sigfillset" }, /* 372 */
{ 6, 0, printargs, "SYS_373" }, /* 373 */
{ 6, 0, printargs, "SYS_374" }, /* 374 */
{ 6, 0, printargs, "SYS_375" }, /* 375 */
{ 6, 0, printargs, "SYS_376" }, /* 376 */
{ 6, 0, printargs, "SYS_377" }, /* 377 */
{ 6, 0, printargs, "SYS_378" }, /* 378 */
{ 6, 0, printargs, "SYS_379" }, /* 379 */
{ 6, 0, solaris_getcontext, "getcontext" }, /* 380 */
{ 6, 0, solaris_setcontext, "setcontext" }, /* 381 */
{ 6, 0, printargs, "SYS_382" }, /* 382 */
{ 6, 0, printargs, "SYS_383" }, /* 383 */
{ 6, 0, printargs, "SYS_384" }, /* 384 */
{ 6, 0, printargs, "SYS_385" }, /* 385 */
{ 6, 0, printargs, "SYS_386" }, /* 386 */
{ 6, 0, printargs, "SYS_387" }, /* 387 */
{ 6, 0, printargs, "SYS_388" }, /* 388 */
{ 6, 0, printargs, "SYS_389" }, /* 389 */
{ 6, 0, printargs, "SYS_390" }, /* 390 */
{ 6, 0, printargs, "SYS_391" }, /* 391 */
{ 6, 0, printargs, "SYS_392" }, /* 392 */
{ 6, 0, printargs, "SYS_393" }, /* 393 */
{ 6, 0, printargs, "SYS_394" }, /* 394 */
{ 6, 0, printargs, "SYS_395" }, /* 395 */
{ 6, 0, printargs, "SYS_396" }, /* 396 */
{ 6, 0, printargs, "SYS_397" }, /* 397 */
{ 6, 0, printargs, "SYS_398" }, /* 398 */
{ 6, 0, printargs, "SYS_399" }, /* 399 */

155
linux/syscall.h Normal file
View File

@ -0,0 +1,155 @@
/*
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "dummy.h"
/* primary syscalls */
int sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write();
int sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link();
int sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod();
int sys_chmod(), sys_chown(), sys_break(), sys_oldstat();
int sys_lseek(), sys_getpid(), sys_mount(), sys_umount();
int sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace();
int sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime();
int sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime();
int sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir();
int sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk();
int sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid();
int sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl();
int sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit();
int sys_olduname(), sys_umask(), sys_chroot(), sys_ustat();
int sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid();
int sys_sigaction(), sys_siggetmask(), sys_sigsetmask();
int sys_setreuid(), sys_setregid(), sys_sigsuspend();
int sys_sigpending(), sys_sethostname(), sys_setrlimit();
int sys_getrlimit(), sys_getrusage(), sys_gettimeofday();
int sys_settimeofday(), sys_getgroups(), sys_setgroups();
int sys_oldselect(), sys_symlink(), sys_oldlstat(), sys_readlink();
int sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir();
int sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate();
int sys_fchmod(), sys_fchown(), sys_getpriority();
int sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs();
int sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer();
int sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat();
int sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86();
int sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn();
int sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo();
int sys_modify_ldt(), sys_adjtimex(), sys_mprotect();
int sys_sigprocmask(), sys_create_module(), sys_init_module();
int sys_delete_module(), sys_get_kernel_syms(), sys_quotactl();
int sys_getpgid(), sys_fchdir(), sys_bdflush();
int sys_sysfs(), sys_personality(), sys_afs_syscall();
int sys_setfsuid(), sys_setfsgid(), sys_llseek();
int sys_getdents(), sys_flock(), sys_msync();
int sys_readv(), sys_writev(), sys_select();
int sys_getsid(), sys_fdatasync(), sys_sysctl();
int sys_mlock(), sys_munlock(), sys_mlockall(), sys_munlockall();
int sys_sched_setparam(), sys_sched_getparam();
int sys_sched_setscheduler(), sys_sched_getscheduler(), sys_sched_yield();
int sys_sched_get_priority_max(), sys_sched_get_priority_min();
int sys_sched_rr_get_interval(), sys_nanosleep(), sys_mremap();
int sys_sendmsg(), sys_recvmsg(), sys_setresuid(), sys_setresgid();
int sys_getresuid(), sys_getresgid(), sys_pread(), sys_pwrite(), sys_getcwd();
int sys_sigaltstack(), sys_rt_sigprocmask(), sys_rt_sigaction();
int sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo();
int sys_rt_sigtimedwait(), sys_prctl(), sys_poll(), sys_vfork();
/* sys_socketcall subcalls */
int sys_socket(), sys_bind(), sys_connect(), sys_listen();
int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
/* new ones */
int sys_query_module();
int sys_poll();
#ifndef ALPHA
#ifdef POWERPC
# define SYS_socket_subcall 256
#else
# define SYS_socket_subcall 230
#endif
#define SYS_socket (SYS_socket_subcall + 1)
#define SYS_bind (SYS_socket_subcall + 2)
#define SYS_connect (SYS_socket_subcall + 3)
#define SYS_listen (SYS_socket_subcall + 4)
#define SYS_accept (SYS_socket_subcall + 5)
#define SYS_getsockname (SYS_socket_subcall + 6)
#define SYS_getpeername (SYS_socket_subcall + 7)
#define SYS_socketpair (SYS_socket_subcall + 8)
#define SYS_send (SYS_socket_subcall + 9)
#define SYS_recv (SYS_socket_subcall + 10)
#define SYS_sendto (SYS_socket_subcall + 11)
#define SYS_recvfrom (SYS_socket_subcall + 12)
#define SYS_shutdown (SYS_socket_subcall + 13)
#define SYS_setsockopt (SYS_socket_subcall + 14)
#define SYS_getsockopt (SYS_socket_subcall + 15)
#define SYS_socket_nsubcalls 16
#endif /* !ALPHA */
/* sys_ipc subcalls */
int sys_semget(), sys_semctl();
int sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl();
int sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl();
#ifndef ALPHA
#ifdef POWERPC
# define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
#else
# define SYS_ipc_subcall 200
#endif
#define SYS_semop (SYS_ipc_subcall + 1)
#define SYS_semget (SYS_ipc_subcall + 2)
#define SYS_semctl (SYS_ipc_subcall + 3)
#define SYS_msgsnd (SYS_ipc_subcall + 11)
#define SYS_msgrcv (SYS_ipc_subcall + 12)
#define SYS_msgget (SYS_ipc_subcall + 13)
#define SYS_msgctl (SYS_ipc_subcall + 14)
#define SYS_shmat (SYS_ipc_subcall + 21)
#define SYS_shmdt (SYS_ipc_subcall + 22)
#define SYS_shmget (SYS_ipc_subcall + 23)
#define SYS_shmctl (SYS_ipc_subcall + 24)
#define SYS_ipc_nsubcalls 25
#endif /* ALPHA */
#ifdef ALPHA
int osf_statfs(), osf_fstatfs(), sys_getpagesize(), sys_madvise();
#endif
int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes();
int sys_capget(), sys_capset();

284
linux/syscallent.h Normal file
View File

@ -0,0 +1,284 @@
/*
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
{ 0, 0, sys_setup, "setup" }, /* 0 */
{ 1, TP, sys_exit, "_exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, 0, sys_read, "read" }, /* 3 */
{ 3, 0, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 3, TP, sys_waitpid, "waitpid" }, /* 7 */
{ 2, TF, sys_creat, "creat" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 3, TF|TP, sys_execve, "execve" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, 0, sys_time, "time" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "lchown" }, /* 16 */
{ 0, 0, sys_break, "break" }, /* 17 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 18 */
{ 3, 0, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 5, TF, sys_mount, "mount" }, /* 21 */
{ 1, TF, sys_umount, "umount" }, /* 22 */
{ 1, 0, sys_setuid, "setuid" }, /* 23 */
{ 0, 0, sys_getuid, "getuid" }, /* 24 */
{ 1, 0, sys_stime, "stime" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_alarm, "alarm" }, /* 27 */
{ 2, 0, sys_oldfstat, "oldfstat" }, /* 28 */
{ 0, TS, sys_pause, "pause" }, /* 29 */
{ 2, TF, sys_utime, "utime" }, /* 30 */
{ 2, 0, sys_stty, "stty" }, /* 31 */
{ 2, 0, sys_gtty, "gtty" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
{ 1, 0, sys_nice, "nice" }, /* 34 */
{ 0, 0, sys_ftime, "ftime" }, /* 35 */
{ 0, 0, sys_sync, "sync" }, /* 36 */
{ 2, TS, sys_kill, "kill" }, /* 37 */
{ 2, TF, sys_rename, "rename" }, /* 38 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 39 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 40 */
{ 1, 0, sys_dup, "dup" }, /* 41 */
{ 1, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 0, 0, sys_prof, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, 0, sys_getgid, "getgid" }, /* 47 */
{ 3, TS, sys_signal, "signal" }, /* 48 */
{ 0, 0, sys_geteuid, "geteuid" }, /* 49 */
{ 0, 0, sys_getegid, "getegid" }, /* 50 */
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 0, 0, sys_phys, "phys" }, /* 52 */
{ 0, 0, sys_lock, "lock" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 55 */
{ 0, 0, sys_mpx, "mpx" }, /* 56 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 57 */
{ 2, 0, sys_ulimit, "ulimit" }, /* 58 */
{ 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_ustat, "ustat" }, /* 62 */
{ 2, 0, sys_dup2, "dup2" }, /* 63 */
{ 0, 0, sys_getppid, "getppid" }, /* 64 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 73 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 74 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 77 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 80 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 81 */
{ 1, 0, sys_oldselect, "oldselect" }, /* 82 */
{ 2, TF, sys_symlink, "symlink" }, /* 83 */
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 1, TF, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, 0, sys_readdir, "readdir" }, /* 89 */
{ 6, 0, sys_mmap, "mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 94 */
{ 3, 0, sys_fchown, "fchown" }, /* 95 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 96 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 97 */
{ 4, 0, sys_profil, "profil" }, /* 98 */
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 101 */
{ 2, 0, sys_socketcall, "socketcall" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
{ 2, TF, sys_stat, "stat" }, /* 106 */
{ 2, TF, sys_lstat, "lstat" }, /* 107 */
{ 2, 0, sys_fstat, "fstat" }, /* 108 */
{ 1, 0, sys_olduname, "olduname" }, /* 109 */
{ 1, 0, sys_iopl, "iopl" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
{ 0, 0, sys_idle, "idle" }, /* 112 */
{ 1, 0, sys_vm86old, "vm86old" }, /* 113 */
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, 0, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 5, 0, sys_ipc, "ipc" }, /* 117 */
{ 1, 0, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 2, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 4, 0, sys_init_module, "init_module" }, /* 128 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, 0, sys_setfsuid, "setfsuid" }, /* 138 */
{ 1, 0, sys_setfsgid, "setfsgid" }, /* 139 */
{ 5, 0, sys_llseek, "_llseek" }, /* 140 */
{ 3, 0, sys_getdents, "getdents" }, /* 141 */
{ 5, 0, sys_select, "select" }, /* 142 */
{ 2, 0, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 5, 0, sys_readv, "readv" }, /* 145 */
{ 5, 0, sys_writev, "writev" }, /* 146 */
{ 5, 0, sys_getsid, "getsid" }, /* 147 */
{ 5, 0, sys_fdatasync, "fdatasync" }, /* 148 */
{ 5, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 5, 0, sys_mlock, "mlock" }, /* 150 */
{ 5, 0, sys_munlock, "munlock" }, /* 151 */
{ 5, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 5, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 5, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */
{ 5, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */
{ 5, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
{ 5, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
{ 5, 0, sys_sched_yield, "sched_yield"}, /* 158 */
{ 5, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
{ 5, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 5, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 5, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, 0, sys_poll, "poll" }, /* 168 */
{ 5, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, printargs, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
{ 5, TF, sys_pread, "pread" }, /* 180 */
{ 5, TF, sys_pwrite, "pwrite" }, /* 181 */
{ 3, TF, sys_chown, "chown" }, /* 182 */
{ 2, 0, sys_getcwd, "getcwd" }, /* 183 */
{ 5, 0, printargs, "capget" }, /* 184 */
{ 5, 0, printargs, "capset" }, /* 185 */
{ 5, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
{ 5, TF, printargs, "sendfile" }, /* 187 */
{ 5, 0, printargs, "SYS_188" }, /* 188 */
{ 5, 0, printargs, "SYS_189" }, /* 189 */
{ 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 5, 0, printargs, "SYS_191" }, /* 191 */
{ 5, 0, printargs, "SYS_192" }, /* 192 */
{ 5, 0, printargs, "SYS_193" }, /* 193 */
{ 5, 0, printargs, "SYS_194" }, /* 194 */
{ 5, 0, printargs, "SYS_195" }, /* 195 */
{ 5, 0, printargs, "SYS_196" }, /* 196 */
{ 5, 0, printargs, "SYS_197" }, /* 197 */
{ 5, 0, printargs, "SYS_198" }, /* 198 */
{ 5, 0, printargs, "SYS_199" }, /* 199 */
{ 4, 0, printargs, "ipc_subcall" }, /* 200 */
{ 4, TI, printargs, "semop" }, /* 201 */
{ 4, TI, sys_semget, "semget" }, /* 202 */
{ 4, TI, sys_semctl, "semctl" }, /* 203 */
{ 4, 0, printargs, "ipc_subcall" }, /* 204 */
{ 4, 0, printargs, "ipc_subcall" }, /* 205 */
{ 4, 0, printargs, "ipc_subcall" }, /* 206 */
{ 4, 0, printargs, "ipc_subcall" }, /* 207 */
{ 4, 0, printargs, "ipc_subcall" }, /* 208 */
{ 4, 0, printargs, "ipc_subcall" }, /* 209 */
{ 4, 0, printargs, "ipc_subcall" }, /* 210 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 211 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 212 */
{ 4, TI, sys_msgget, "msgget" }, /* 213 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 214 */
{ 4, 0, printargs, "ipc_subcall" }, /* 215 */
{ 4, 0, printargs, "ipc_subcall" }, /* 216 */
{ 4, 0, printargs, "ipc_subcall" }, /* 217 */
{ 4, 0, printargs, "ipc_subcall" }, /* 218 */
{ 4, 0, printargs, "ipc_subcall" }, /* 219 */
{ 4, 0, printargs, "ipc_subcall" }, /* 220 */
{ 4, TI, sys_shmat, "shmat" }, /* 221 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 222 */
{ 4, TI, sys_shmget, "shmget" }, /* 223 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 224 */
{ 5, 0, printargs, "SYS_225" }, /* 225 */
{ 5, 0, printargs, "SYS_226" }, /* 226 */
{ 5, 0, printargs, "SYS_227" }, /* 227 */
{ 5, 0, printargs, "SYS_228" }, /* 228 */
{ 5, 0, printargs, "SYS_229" }, /* 229 */
{ 8, 0, printargs, "socket_subcall"}, /* 230 */
{ 3, TN, sys_socket, "socket" }, /* 231 */
{ 3, TN, sys_bind, "bind" }, /* 232 */
{ 3, TN, sys_connect, "connect" }, /* 233 */
{ 2, TN, sys_listen, "listen" }, /* 234 */
{ 3, TN, sys_accept, "accept" }, /* 235 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 236 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 237 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 238 */
{ 4, TN, sys_send, "send" }, /* 239 */
{ 4, TN, sys_recv, "recv" }, /* 240 */
{ 6, TN, sys_sendto, "sendto" }, /* 241 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 242 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 243 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 244 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 245 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 246 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 247 */
{ 5, 0, printargs, "SYS_248" }, /* 248 */
{ 5, 0, printargs, "SYS_249" }, /* 249 */

338
mem.c Normal file
View File

@ -0,0 +1,338 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#ifdef LINUXSPARC
#include <linux/mman.h>
#else
#include <sys/mman.h>
#endif
#if defined(LINUX) && defined(__i386__)
#include <asm/ldt.h>
#endif
int
sys_brk(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%#lx", tcp->u_arg[0]);
}
#ifdef linux
return RVAL_HEX;
#else
return 0;
#endif
}
int
sys_sbrk(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
}
return RVAL_HEX;
}
static struct xlat mmap_prot[] = {
{ PROT_NONE, "PROT_NONE", },
{ PROT_READ, "PROT_READ" },
{ PROT_WRITE, "PROT_WRITE" },
{ PROT_EXEC, "PROT_EXEC" },
{ 0, NULL },
};
static struct xlat mmap_flags[] = {
{ MAP_SHARED, "MAP_SHARED" },
{ MAP_PRIVATE, "MAP_PRIVATE" },
{ MAP_FIXED, "MAP_FIXED" },
#ifdef MAP_ANONYMOUS
{ MAP_ANONYMOUS,"MAP_ANONYMOUS" },
#endif
#ifdef MAP_RENAME
{ MAP_RENAME, "MAP_RENAME" },
#endif
#ifdef MAP_NORESERVE
{ MAP_NORESERVE,"MAP_NORESERVE" },
#endif
#ifdef _MAP_NEW
{ _MAP_NEW, "_MAP_NEW" },
#endif
#ifdef MAP_GROWSDOWN
{ MAP_GROWSDOWN,"MAP_GROWSDOWN" },
#endif
#ifdef MAP_DENYWRITE
{ MAP_DENYWRITE,"MAP_DENYWRITE" },
#endif
#ifdef MAP_EXECUTABLE
{ MAP_EXECUTABLE,"MAP_EXECUTABLE"},
#endif
#ifdef MAP_FILE
{ MAP_FILE,"MAP_FILE"},
#endif
#ifdef MAP_LOCKED
{ MAP_LOCKED,"MAP_LOCKED"},
#endif
{ 0, NULL },
};
int
sys_mmap(tcp)
struct tcb *tcp;
{
#ifdef LINUX
#if defined(ALPHA) || defined(sparc)
long *u_arg = tcp->u_arg;
#else /* !ALPHA */
long u_arg[6];
#endif /* !ALPHA */
#else /* !LINUX */
long *u_arg = tcp->u_arg;
#endif /* !LINUX */
if (entering(tcp)) {
#ifdef LINUX
#if !defined(ALPHA) && !defined(__sparc__)
if (umoven(tcp, tcp->u_arg[0], sizeof u_arg,
(char *) u_arg) == -1)
return 0;
#endif /* ALPHA/sparc */
#endif /* LINUX */
/* addr */
tprintf("%#lx, ", u_arg[0]);
/* len */
tprintf("%lu, ", u_arg[1]);
/* prot */
printflags(mmap_prot, u_arg[2]);
tprintf(", ");
/* flags */
printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
/* fd */
tprintf(", %ld, ", u_arg[4]);
/* offset */
tprintf("%#lx", u_arg[5]);
}
return RVAL_HEX;
}
int
sys_munmap(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%#lx, %lu",
tcp->u_arg[0], tcp->u_arg[1]);
}
return 0;
}
int
sys_mprotect(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%#lx, %lu, ",
tcp->u_arg[0], tcp->u_arg[1]);
if (!printflags(mmap_prot, tcp->u_arg[2]))
tprintf("PROT_???");
}
return 0;
}
#ifdef MS_ASYNC
static struct xlat mctl_sync[] = {
{ MS_ASYNC, "MS_ASYNC" },
{ MS_INVALIDATE,"MS_INVALIDATE" },
#ifdef MS_SYNC
{ MS_SYNC, "MS_SYNC" },
#endif
{ 0, NULL },
};
int
sys_msync(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
/* addr */
tprintf("%#lx", tcp->u_arg[0]);
/* len */
tprintf(", %lu, ", tcp->u_arg[1]);
/* flags */
if (!printflags(mctl_sync, tcp->u_arg[2]))
tprintf("MS_???");
}
return 0;
}
#endif /* MS_ASYNC */
#ifdef MC_SYNC
static struct xlat mctl_funcs[] = {
{ MC_LOCK, "MC_LOCK" },
{ MC_LOCKAS, "MC_LOCKAS" },
{ MC_SYNC, "MC_SYNC" },
{ MC_UNLOCK, "MC_UNLOCK" },
{ MC_UNLOCKAS, "MC_UNLOCKAS" },
{ 0, NULL },
};
static struct xlat mctl_lockas[] = {
{ MCL_CURRENT, "MCL_CURRENT" },
{ MCL_FUTURE, "MCL_FUTURE" },
{ 0, NULL },
};
int
sys_mctl(tcp)
struct tcb *tcp;
{
int arg, function;
if (entering(tcp)) {
/* addr */
tprintf("%#lx", tcp->u_arg[0]);
/* len */
tprintf(", %lu, ", tcp->u_arg[1]);
/* function */
function = tcp->u_arg[2];
if (!printflags(mctl_funcs, function))
tprintf("MC_???");
/* arg */
arg = tcp->u_arg[3];
tprintf(", ");
switch (function) {
case MC_SYNC:
if (!printflags(mctl_sync, arg))
tprintf("MS_???");
break;
case MC_LOCKAS:
if (!printflags(mctl_lockas, arg))
tprintf("MCL_???");
break;
default:
tprintf("%#x", arg);
break;
}
}
return 0;
}
#endif /* MC_SYNC */
int
sys_mincore(tcp)
struct tcb *tcp;
{
int i, len;
char *vec = NULL;
if (entering(tcp)) {
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
} else {
len = tcp->u_arg[1];
if (syserror(tcp) || tcp->u_arg[2] == 0 ||
(vec = malloc((u_int)len)) == NULL ||
umoven(tcp, tcp->u_arg[2], len, vec) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else {
tprintf("[");
for (i = 0; i < len; i++) {
if (abbrev(tcp) && i >= max_strlen) {
tprintf("...");
break;
}
tprintf((vec[i] & 1) ? "1" : "0");
}
tprintf("]");
}
if (vec)
free(vec);
}
return 0;
}
int
sys_getpagesize(tcp)
struct tcb *tcp;
{
if (exiting(tcp))
return RVAL_HEX;
return 0;
}
#if defined(LINUX) && defined(__i386__)
int
sys_modify_ldt(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
struct modify_ldt_ldt_s copy;
tprintf("%ld", tcp->u_arg[0]);
if (tcp->u_arg[1] == 0
|| tcp->u_arg[2] != sizeof (struct modify_ldt_ldt_s)
|| umove(tcp, tcp->u_arg[1], &copy) == -1)
tprintf(", %lx", tcp->u_arg[1]);
else {
tprintf(", {entry_number:%d, ", copy.entry_number);
if (!verbose(tcp))
tprintf("...}");
else {
tprintf("base_addr:%#08lx, "
"limit:%d, "
"seg_32bit:%d, "
"contents:%d, "
"read_exec_only:%d, "
"limit_in_pages:%d, "
"seg_not_present:%d, "
"useable:%d}",
copy.base_addr,
copy.limit,
copy.seg_32bit,
copy.contents,
copy.read_exec_only,
copy.limit_in_pages,
copy.seg_not_present,
copy.useable);
}
}
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
#endif /* LINUX && __i386__ */

836
net.c Normal file
View File

@ -0,0 +1,836 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#if defined(LINUX)
#include <asm/types.h>
#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3)
# include <netipx/ipx.h>
#else
# include <linux/ipx.h>
#endif
#endif /* LINUX */
#ifndef PF_UNSPEC
#define PF_UNSPEC AF_UNSPEC
#endif
#ifdef LINUX
/* Under Linux these are enums so we can't test for them with ifdef. */
#define IPPROTO_EGP IPPROTO_EGP
#define IPPROTO_PUP IPPROTO_PUP
#define IPPROTO_IDP IPPROTO_IDP
#define IPPROTO_IGMP IPPROTO_IGMP
#define IPPROTO_RAW IPPROTO_RAW
#define IPPROTO_MAX IPPROTO_MAX
#endif
static struct xlat domains[] = {
{ PF_UNSPEC, "PF_UNSPEC" },
{ PF_UNIX, "PF_UNIX" },
{ PF_INET, "PF_INET" },
#ifdef PF_LOCAL
{ PF_LOCAL, "PS_LOCAL" },
#endif
#ifdef PF_ISO
{ PF_ISO, "PF_ISO" },
#endif
#ifdef PF_AX25
{ PF_AX25, "PF_AX25" },
#endif
#ifdef PF_IPX
{ PF_IPX, "PF_IPX" },
#endif
#ifdef PF_APPLETALK
{ PF_APPLETALK, "PF_APPLETALK" },
#endif
#ifdef PF_NETROM
{ PF_NETROM, "PF_NETROM" },
#endif
#ifdef PF_BRIDGE
{ PF_BRIDGE, "PF_BRIDGE" },
#endif
#ifdef PF_AAL5
{ PF_AAL5, "PF_AAL5" },
#endif
#ifdef PF_X25
{ PF_X25, "PF_X25" },
#endif
#ifdef PF_INET6
{ PF_INET6, "PF_INET6" },
#endif
#ifdef PF_ROSE
{ PF_ROSE, "PF_ROSE" },
#endif
#ifdef PF_DECNET
{ PF_DECNET, "PF_DECNET" },
#endif
#ifdef PF_NETBEUI
{ PF_NETBEUI, "PF_NETBEUI" },
#endif
#ifdef PF_IMPLINK
{ PF_IMPLINK, "PF_IMPLINK" },
#endif
{ 0, NULL },
};
static struct xlat socktypes[] = {
{ SOCK_STREAM, "SOCK_STREAM" },
{ SOCK_DGRAM, "SOCK_DGRAM" },
#ifdef SOCK_RAW
{ SOCK_RAW, "SOCK_RAW" },
#endif
#ifdef SOCK_SEQPACKET
{ SOCK_SEQPACKET,"SOCK_SEQPACKET"},
#endif
#ifdef SOCK_RDM
{ SOCK_RDM, "SOCK_RDM" },
#endif
#ifdef SOCK_PACKET
{ SOCK_PACKET, "SOCK_PACKET" },
#endif
{ 0, NULL },
};
static struct xlat protocols[] = {
{ IPPROTO_IP, "IPPROTO_IP" },
{ IPPROTO_ICMP, "IPPROTO_ICMP" },
{ IPPROTO_TCP, "IPPROTO_TCP" },
{ IPPROTO_UDP, "IPPROTO_UDP" },
#ifdef IPPROTO_GGP
{ IPPROTO_GGP, "IPPROTO_GGP" },
#endif
#ifdef IPPROTO_EGP
{ IPPROTO_EGP, "IPPROTO_EGP" },
#endif
#ifdef IPPROTO_PUP
{ IPPROTO_PUP, "IPPROTO_PUP" },
#endif
#ifdef IPPROTO_IDP
{ IPPROTO_IDP, "IPPROTO_IDP" },
#endif
#ifdef IPPROTO_IPV6
{ IPPROTO_IPV6, "IPPROTO_IPV6" },
#endif
#ifdef IPPROTO_ICMPV6
{ IPPROTO_ICMPV6,"IPPROTO_ICMPV6"},
#endif
#ifdef IPPROTO_IGMP
{ IPPROTO_IGMP, "IPPROTO_IGMP" },
#endif
#ifdef IPPROTO_HELLO
{ IPPROTO_HELLO,"IPPROTO_HELLO" },
#endif
#ifdef IPPROTO_ND
{ IPPROTO_ND, "IPPROTO_ND" },
#endif
#ifdef IPPROTO_RAW
{ IPPROTO_RAW, "IPPROTO_RAW" },
#endif
#ifdef IPPROTO_MAX
{ IPPROTO_MAX, "IPPROTO_MAX" },
#endif
#ifdef IPPROTO_IPIP
{ IPPROTO_IPIP, "IPPROTO_IPIP" },
#endif
{ 0, NULL },
};
static struct xlat msg_flags[] = {
{ MSG_OOB, "MSG_OOB" },
#ifdef MSG_DONTROUTE
{ MSG_DONTROUTE,"MSG_DONTROUTE" },
#endif
#ifdef MSG_PEEK
{ MSG_PEEK, "MSG_PEEK" },
#endif
#ifdef MSG_CTRUNC
{ MSG_CTRUNC, "MSG_CTRUNC" },
#endif
#ifdef MSG_PROXY
{ MSG_PROXY, "MSG_PROXY" },
#endif
#ifdef MSG_EOR
{ MSG_EOR, "MSG_EOR" },
#endif
#ifdef MSG_WAITALL
{ MSG_WAITALL, "MSG_WAITALL" },
#endif
{ 0, NULL },
};
static struct xlat sockoptions[] = {
#ifdef SO_DEBUG
{ SO_DEBUG, "SO_DEBUG" },
#endif
#ifdef SO_REUSEADDR
{ SO_REUSEADDR, "SO_REUSEADDR" },
#endif
#ifdef SO_KEEPALIVE
{ SO_KEEPALIVE, "SO_KEEPALIVE" },
#endif
#ifdef SO_DONTROUTE
{ SO_DONTROUTE, "SO_DONTROUTE" },
#endif
#ifdef SO_BROADCAST
{ SO_BROADCAST, "SO_BROADCAST" },
#endif
#ifdef SO_LINGER
{ SO_LINGER, "SO_LINGER" },
#endif
#ifdef SO_OOBINLINE
{ SO_OOBINLINE, "SO_OOBINLINE" },
#endif
#ifdef SO_TYPE
{ SO_TYPE, "SO_TYPE" },
#endif
#ifdef SO_ERROR
{ SO_ERROR, "SO_ERROR" },
#endif
#ifdef SO_SNDBUF
{ SO_SNDBUF, "SO_SNDBUF" },
#endif
#ifdef SO_RCVBUF
{ SO_RCVBUF, "SO_RCVBUF" },
#endif
#ifdef SO_NO_CHECK
{ SO_NO_CHECK, "SO_NO_CHECK" },
#endif
#ifdef SO_PRIORITY
{ SO_PRIORITY, "SO_PRIORITY" },
#endif
#ifdef SO_ACCEPTCONN
{ SO_ACCEPTCONN,"SO_ACCEPTCONN" },
#endif
#ifdef SO_USELOOPBACK
{ SO_USELOOPBACK,"SO_USELOOPBACK"},
#endif
#ifdef SO_SNDLOWAT
{ SO_SNDLOWAT, "SO_SNDLOWAT" },
#endif
#ifdef SO_RCVLOWAT
{ SO_RCVLOWAT, "SO_RCVLOWAT" },
#endif
#ifdef SO_SNDTIMEO
{ SO_SNDTIMEO, "SO_SNDTIMEO" },
#endif
#ifdef SO_RCVTIMEO
{ SO_RCVTIMEO, "SO_RCVTIMEO" },
#endif
#ifdef SO_BSDCOMPAT
{ SO_BSDCOMPAT, "SO_BSDCOMPAT" },
#endif
#ifdef SO_REUSEPORT
{ SO_REUSEPORT, "SO_REUSEPORT" },
#endif
#ifdef SO_RCVLOWAT
{ SO_RCVLOWAT, "SO_RCVLOWAT" },
#endif
#ifdef SO_SNDLOWAT
{ SO_SNDLOWAT, "SO_SNDLOWAT" },
#endif
#ifdef SO_RCVTIMEO
{ SO_RCVTIMEO, "SO_RCVTIMEO" },
#endif
#ifdef SO_SNDTIMEO
{ SO_SNDTIMEO, "SO_SNDTIMEO" },
#endif
{ 0, NULL },
};
#ifdef SOL_IP
static struct xlat sockipoptions[] = {
{ IP_TOS, "IP_TOS" },
{ IP_TTL, "IP_TTL" },
#if defined(IP_HDRINCL)
{ IP_HDRINCL, "IP_HDRINCL" },
#endif
#if defined(IP_OPTIONS)
{ IP_OPTIONS, "IP_OPTIONS" },
#endif
{ IP_MULTICAST_IF, "IP_MULTICAST_IF" },
{ IP_MULTICAST_TTL, "IP_MULTICAST_TTL" },
{ IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP" },
{ IP_ADD_MEMBERSHIP, "IP_ADD_MEMBERSHIP" },
{ IP_DROP_MEMBERSHIP, "IP_DROP_MEMBERSHIP" },
{ 0, NULL },
};
#endif /* SOL_IP */
#ifdef SOL_IPX
static struct xlat sockipxoptions[] = {
{ IPX_TYPE, "IPX_TYPE" },
{ 0, NULL },
};
#endif /* SOL_IPX */
#ifdef SOL_TCP
static struct xlat socktcpoptions[] = {
{ TCP_NODELAY, "TCP_NODELAY" },
{ TCP_MAXSEG, "TCP_MAXSEG" },
{ 0, NULL },
};
#endif /* SOL_TCP */
void
printsock(tcp, addr)
struct tcb *tcp;
long addr;
{
struct sockaddr sa;
struct sockaddr_in *sin = (struct sockaddr_in *) &sa;
struct sockaddr_un sau;
#ifdef LINUX
struct sockaddr_ipx sipx;
#endif
if (addr == 0) {
tprintf("NULL");
return;
}
if (!verbose(tcp)) {
tprintf("%#lx", addr);
return;
}
if (umove(tcp, addr, &sa) < 0) {
tprintf("{...}");
return;
}
switch (sa.sa_family) {
case AF_UNIX:
if (umove(tcp, addr, &sau) < 0)
tprintf("{sun_family=AF_UNIX, ...}");
else
tprintf("{sun_family=AF_UNIX, sun_path=\"%s\"}",
sau.sun_path);
break;
case AF_INET:
tprintf("{sin_family=AF_INET, ");
tprintf("sin_port=htons(%u), sin_addr=inet_addr(\"%s\")}",
ntohs(sin->sin_port), inet_ntoa(sin->sin_addr));
break;
#ifdef AF_IPX
case AF_IPX:
if (umove(tcp, addr, &sipx)<0)
tprintf("{sipx_family=AF_IPX, ...}");
else {
int i;
tprintf("{sipx_family=AF_IPX, ");
tprintf("{sipx_port=htons(%u), ",
ntohs(sipx.sipx_port));
/* Yes, I know, this does not look too
* strace-ish, but otherwise the IPX
* addresses just look monstrous...
* Anyways, feel free if you don't like
* this way.. :)
*/
tprintf("%08lx:", ntohl(sipx.sipx_network));
for (i = 0; i<IPX_NODE_LEN; i++)
tprintf("%02x", sipx.sipx_node[i]);
tprintf("/[%02x]", sipx.sipx_type);
tprintf("}");
}
break;
#endif /* AF_IPX */
/* AF_AX25 AF_APPLETALK AF_NETROM AF_BRIDGE AF_AAL5
AF_X25 AF_INET6 AF_ROSE still need to be done */
default:
tprintf("{sa_family=%u, sa_data=", sa.sa_family);
printstr(tcp, (long) &((struct sockaddr *) addr)->sa_data,
sizeof sa.sa_data);
tprintf("}");
break;
}
}
#if HAVE_SENDMSG
static void
printmsghdr(tcp, addr)
struct tcb *tcp;
long addr;
{
struct msghdr msg;
umove(tcp, addr, &msg);
tprintf("{msg_name=%s, msg_namelen=%u, msg_iov=%#lx, msg_iovlen=%u, ",
(char *) msg.msg_name, msg.msg_namelen,
(unsigned long) msg.msg_iov, msg.msg_iovlen);
#ifdef HAVE_MSG_CONTROL
tprintf("msg_control=%#lx, msg_controllen=%u, msg_flags=%#x}",
(unsigned long) msg.msg_control, msg.msg_controllen,
msg.msg_flags);
#else /* !HAVE_MSG_CONTROL */
tprintf("msg_accrights=%#lx, msg_accrightslen=%u}",
(unsigned long) msg.msg_accrights, msg.msg_accrightslen);
#endif /* !HAVE_MSG_CONTROL */
}
#endif /* HAVE_SENDMSG */
int
sys_socket(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printxval(domains, tcp->u_arg[0], "PF_???");
tprintf(", ");
printxval(socktypes, tcp->u_arg[1], "SOCK_???");
tprintf(", ");
switch (tcp->u_arg[0]) {
case PF_INET:
printxval(protocols, tcp->u_arg[2], "IPPROTO_???");
break;
#ifdef PF_IPX
case PF_IPX:
/* BTW: I don't believe this.. */
tprintf("[");
printxval(domains, tcp->u_arg[2], "PF_???");
tprintf("]");
break;
#endif /* PF_IPX */
default:
tprintf("%lu", tcp->u_arg[2]);
break;
}
}
return 0;
}
int
sys_bind(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printsock(tcp, tcp->u_arg[1]);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
int
sys_connect(tcp)
struct tcb *tcp;
{
return sys_bind(tcp);
}
int
sys_listen(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
}
return 0;
}
int
sys_accept(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else if (!tcp->u_arg[2])
tprintf("%#lx, NULL", tcp->u_arg[1]);
else {
if (tcp->u_arg[1] == 0 || syserror(tcp)) {
tprintf("%#lx", tcp->u_arg[1]);
} else {
printsock(tcp, tcp->u_arg[1]);
}
tprintf(", ");
printnum(tcp, tcp->u_arg[2], "%lu");
}
return 0;
}
int
sys_send(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
/* flags */
if (printflags(msg_flags, tcp->u_arg[3]) == 0)
tprintf("0");
}
return 0;
}
int
sys_sendto(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
/* flags */
if (printflags(msg_flags, tcp->u_arg[3]) == 0)
tprintf("0");
/* to address */
tprintf(", ");
printsock(tcp, tcp->u_arg[4]);
/* to length */
tprintf(", %lu", tcp->u_arg[5]);
}
return 0;
}
#ifdef HAVE_SENDMSG
int
sys_sendmsg(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printmsghdr(tcp, tcp->u_arg[1]);
/* flags */
tprintf(", ");
if (printflags(msg_flags, tcp->u_arg[2]) == 0)
tprintf("0");
}
return 0;
}
#endif /* HAVE_SENDMSG */
int
sys_recv(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf(", %lu, ", tcp->u_arg[2]);
if (printflags(msg_flags, tcp->u_arg[3]) == 0)
tprintf("0");
}
return 0;
}
int
sys_recvfrom(tcp)
struct tcb *tcp;
{
int fromlen;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu, %lu, %#lx, %#lx",
tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3],
tcp->u_arg[4], tcp->u_arg[5]);
return 0;
}
/* buf */
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
/* len */
tprintf(", %lu, ", tcp->u_arg[2]);
/* flags */
if (printflags(msg_flags, tcp->u_arg[3]) == 0)
tprintf("0");
/* from address, len */
if (!tcp->u_arg[4] || !tcp->u_arg[5]) {
if (tcp->u_arg[4] == 0)
tprintf(", NULL");
else
tprintf(", %#lx", tcp->u_arg[4]);
if (tcp->u_arg[5] == 0)
tprintf(", NULL");
else
tprintf(", %#lx", tcp->u_arg[5]);
return 0;
}
if (umove(tcp, tcp->u_arg[5], &fromlen) < 0) {
tprintf(", {...}, [?]");
return 0;
}
tprintf(", ");
printsock(tcp, tcp->u_arg[4]);
/* from length */
tprintf(", [%u]", fromlen);
}
return 0;
}
#ifdef HAVE_SENDMSG
int
sys_recvmsg(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printmsghdr(tcp, tcp->u_arg[1]);
/* flags */
tprintf(", ");
if (printflags(msg_flags, tcp->u_arg[2]) == 0)
tprintf("0");
}
return 0;
}
#endif /* HAVE_SENDMSG */
int
sys_shutdown(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, %ld", tcp->u_arg[0], tcp->u_arg[1]);
switch (tcp->u_arg[1]) {
case 0:
tprintf("%s", " /* receive */");
break;
case 1:
tprintf("%s", " /* send */");
break;
case 2:
tprintf("%s", " /* send and receive */");
break;
}
}
return 0;
}
int
sys_getsockname(tcp)
struct tcb *tcp;
{
return sys_accept(tcp);
}
int
sys_getpeername(tcp)
struct tcb *tcp;
{
return sys_accept(tcp);
}
int
sys_pipe(tcp)
struct tcb *tcp;
{
#if defined(LINUX) && !defined(SPARC)
int fds[2];
if (exiting(tcp)) {
if (syserror(tcp)) {
tprintf("%#lx", tcp->u_arg[0]);
return 0;
}
if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0)
tprintf("[...]");
else
tprintf("[%u, %u]", fds[0], fds[1]);
}
#else
#if defined(SPARC) || defined(SVR4)
if (exiting(tcp))
tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp));
#endif
#endif
return 0;
}
int
sys_socketpair(tcp)
struct tcb *tcp;
{
#ifdef LINUX
int fds[2];
#endif
if (entering(tcp)) {
printxval(domains, tcp->u_arg[0], "PF_???");
tprintf(", ");
printxval(socktypes, tcp->u_arg[1], "SOCK_???");
tprintf(", ");
switch (tcp->u_arg[0]) {
case PF_INET:
printxval(protocols, tcp->u_arg[2], "IPPROTO_???");
break;
#ifdef PF_IPX
case PF_IPX:
/* BTW: I don't believe this.. */
tprintf("[");
printxval(domains, tcp->u_arg[2], "PF_???");
tprintf("]");
break;
#endif /* PF_IPX */
default:
tprintf(", %lu", tcp->u_arg[2]);
break;
}
} else {
if (syserror(tcp)) {
tprintf("%#lx", tcp->u_arg[3]);
return 0;
}
#ifdef LINUX
if (umoven(tcp, tcp->u_arg[3], sizeof fds, (char *) fds) < 0)
tprintf("[...]");
else
tprintf(", [%u, %u]", fds[0], fds[1]);
#endif /* LINUX */
#ifdef SUNOS4
tprintf(", [%lu, %lu]", tcp->u_rval, getrval2(tcp));
#endif /* SUNOS4 */
#ifdef SVR4
tprintf(", [%lu, %lu]", tcp->u_rval, getrval2(tcp));
#endif /* SVR4 */
}
return 0;
}
int
sys_getsockopt(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
switch (tcp->u_arg[1]) {
case SOL_SOCKET:
tprintf("SOL_SOCKET, ");
printxval(sockoptions, tcp->u_arg[2], "SO_???");
tprintf(", ");
break;
#ifdef SOL_IP
case SOL_IP:
tprintf("SOL_IP, ");
printxval(sockipoptions, tcp->u_arg[2], "IP_???");
tprintf(", ");
break;
#endif
#ifdef SOL_IPX
case SOL_IPX:
tprintf("SOL_IPX, ");
printxval(sockipxoptions, tcp->u_arg[2], "IPX_???");
tprintf(", ");
break;
#endif
#ifdef SOL_TCP
case SOL_TCP:
tprintf("SOL_TCP, ");
printxval(socktcpoptions, tcp->u_arg[2], "TCP_???");
tprintf(", ");
break;
#endif
/* SOL_AX25 SOL_ROSE SOL_ATALK SOL_NETROM SOL_UDP SOL_DECNET SOL_X25
* etc. still need work */
default:
/* XXX - should know socket family here */
printxval(protocols, tcp->u_arg[1], "IPPROTO_???");
tprintf("%lu, ", tcp->u_arg[2]);
break;
}
} else {
if (syserror(tcp)) {
tprintf("%#lx, %#lx",
tcp->u_arg[3], tcp->u_arg[4]);
return 0;
}
printnum(tcp, tcp->u_arg[3], "%ld");
tprintf(", ");
printnum(tcp, tcp->u_arg[4], "%ld");
}
return 0;
}
int
sys_setsockopt(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
switch (tcp->u_arg[1]) {
case SOL_SOCKET:
tprintf("SOL_SOCKET, ");
printxval(sockoptions, tcp->u_arg[2], "SO_???");
tprintf(", ");
break;
#ifdef SOL_IP
case SOL_IP:
tprintf("SOL_IP, ");
printxval(sockipoptions, tcp->u_arg[2], "IP_???");
tprintf(", ");
break;
#endif
#ifdef SOL_IPX
case SOL_IPX:
tprintf("SOL_IPX, ");
printxval(sockipxoptions, tcp->u_arg[2], "IPX_???");
tprintf(", ");
break;
#endif
#ifdef SOL_TCP
case SOL_TCP:
tprintf("SOL_TCP, ");
printxval(socktcpoptions, tcp->u_arg[2], "TCP_???");
tprintf(", ");
break;
#endif
/* SOL_AX25 SOL_ATALK SOL_NETROM SOL_UDP SOL_DECNET SOL_X25
* etc. still need work */
default:
/* XXX - should know socket family here */
printxval(protocols, tcp->u_arg[1], "IPPROTO_???");
tprintf("%lu, ", tcp->u_arg[2]);
break;
}
printnum(tcp, tcp->u_arg[3], "%ld");
tprintf(", %lu", tcp->u_arg[4]);
}
return 0;
}

252
proc.c Normal file
View File

@ -0,0 +1,252 @@
/*
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#ifdef SVR4
static struct xlat proc_status_flags[] = {
{ PR_STOPPED, "PR_STOPPED" },
{ PR_ISTOP, "PR_ISTOP" },
{ PR_DSTOP, "PR_DSTOP" },
{ PR_ASLEEP, "PR_ASLEEP" },
{ PR_FORK, "PR_FORK" },
{ PR_RLC, "PR_RLC" },
{ PR_PTRACE, "PR_PTRACE" },
{ PR_PCINVAL, "PR_PCINVAL" },
{ PR_ISSYS, "PR_ISSYS" },
#ifdef PR_STEP
{ PR_STEP, "PR_STEP" },
#endif
#ifdef PR_KLC
{ PR_KLC, "PR_KLC" },
#endif
#ifdef PR_ASYNC
{ PR_ASYNC, "PR_ASYNC" },
#endif
#ifdef PR_PCOMPAT
{ PR_PCOMPAT, "PR_PCOMPAT" },
#endif
{ 0, NULL },
};
static struct xlat proc_status_why[] = {
{ PR_REQUESTED, "PR_REQUESTED" },
{ PR_SIGNALLED, "PR_SIGNALLED" },
{ PR_SYSENTRY, "PR_SYSENTRY" },
{ PR_SYSEXIT, "PR_SYSEXIT" },
{ PR_JOBCONTROL,"PR_JOBCONTROL" },
{ PR_FAULTED, "PR_FAULTED" },
#ifdef PR_SUSPENDED
{ PR_SUSPENDED, "PR_SUSPENDED" },
#endif
#ifdef PR_CHECKPOINT
{ PR_CHECKPOINT,"PR_CHECKPOINT" },
#endif
{ 0, NULL },
};
static struct xlat proc_run_flags[] = {
{ PRCSIG, "PRCSIG" },
{ PRCFAULT, "PRCFAULT" },
{ PRSTRACE, "PRSTRACE" },
{ PRSHOLD, "PRSHOLD" },
{ PRSFAULT, "PRSFAULT" },
{ PRSVADDR, "PRSVADDR" },
{ PRSTEP, "PRSTEP" },
{ PRSABORT, "PRSABORT" },
{ PRSTOP, "PRSTOP" },
{ 0, NULL },
};
#if 0
static struct xlat proc_map_flags[] = {
{ MA_READ, "MA_READ" },
{ MA_WRITE, "MA_WRITE" },
{ MA_EXEC, "MA_EXEC" },
{ MA_SHARED, "MA_SHARED" },
{ MA_BREAK, "MA_BREAK" },
{ MA_STACK, "MA_STACK" },
{ 0, NULL },
};
static struct xlat proc_page_flags[] = {
{ PG_REFERENCED,"PG_REFERENCED" },
{ PG_MODIFIED, "PG_MODIFIED" },
{ PG_HWMAPPED, "PG_HWMAPPED" },
{ 0, NULL },
};
#ifdef SPARC
static struct xlat proc_regs[] = {
{ R_G0, "R_G0" },
{ R_G1, "R_G1" },
{ R_G2, "R_G2" },
{ R_G3, "R_G3" },
{ R_G4, "R_G4" },
{ R_G5, "R_G5" },
{ R_G6, "R_G6" },
{ R_G7, "R_G7" },
{ R_O0, "R_O0" },
{ R_O1, "R_O1" },
{ R_O2, "R_O2" },
{ R_O3, "R_O3" },
{ R_O4, "R_O4" },
{ R_O5, "R_O5" },
{ R_O6, "R_O6" },
{ R_O7, "R_O7" },
{ R_L0, "R_L0" },
{ R_L1, "R_L1" },
{ R_L2, "R_L2" },
{ R_L3, "R_L3" },
{ R_L4, "R_L4" },
{ R_L5, "R_L5" },
{ R_L6, "R_L6" },
{ R_L7, "R_L7" },
{ R_I0, "R_I0" },
{ R_I1, "R_I1" },
{ R_I2, "R_I2" },
{ R_I3, "R_I3" },
{ R_I4, "R_I4" },
{ R_I5, "R_I5" },
{ R_I6, "R_I6" },
{ R_I7, "R_I7" },
{ R_PSR, "R_PSR" },
{ R_PC, "R_PC" },
{ R_nPC, "R_nPC" },
{ R_Y, "R_Y" },
{ R_WIM, "R_WIM" },
{ R_TBR, "R_TBR" },
{ 0, NULL },
};
#endif /* SPARC */
#endif /* 0 */
int
proc_ioctl(tcp, code, arg)
struct tcb *tcp;
int code, arg;
{
int val;
prstatus_t status;
prrun_t run;
if (entering(tcp))
return 0;
switch (code) {
case PIOCSTATUS:
case PIOCSTOP:
case PIOCWSTOP:
if (arg == 0)
tprintf(", NULL");
else if (syserror(tcp))
tprintf(", %#x", arg);
else if (umove(tcp, arg, &status) < 0)
tprintf(", {...}");
else {
tprintf(", {pr_flags=");
if (!printflags(proc_status_flags, status.pr_flags))
tprintf("0");
if (status.pr_why) {
tprintf(", pr_why=");
printxval(proc_status_why, status.pr_why,
"PR_???");
}
switch (status.pr_why) {
case PR_SIGNALLED:
case PR_JOBCONTROL:
tprintf(", pr_what=");
printsignal(status.pr_what);
break;
case PR_FAULTED:
tprintf(", pr_what=%d", status.pr_what);
break;
case PR_SYSENTRY:
case PR_SYSEXIT:
tprintf(", pr_what=SYS_%s",
sysent[status.pr_what].sys_name);
break;
}
tprintf(", ...}");
}
return 1;
case PIOCRUN:
if (arg == 0)
tprintf(", NULL");
else if (umove(tcp, arg, &run) < 0)
tprintf(", {...}");
else {
tprintf(", {pr_flags=");
if (!printflags(proc_run_flags, run.pr_flags))
tprintf("0");
tprintf(", ...}");
}
return 1;
#ifdef PIOCSET
case PIOCSET:
case PIOCRESET:
if (umove(tcp, arg, &val) < 0)
tprintf(", [?]");
else {
tprintf(", [");
if (!printflags(proc_status_flags, val))
tprintf("0");
tprintf("]");
}
return 1;
#endif /* PIOCSET */
case PIOCKILL:
case PIOCUNKILL:
/* takes a pointer to a signal */
if (umove(tcp, arg, &val) < 0)
tprintf(", [?]");
else {
tprintf(", [");
printsignal(val);
tprintf("]");
}
return 1;
case PIOCSFORK:
case PIOCRFORK:
case PIOCSRLC:
case PIOCRRLC:
/* doesn't take an arg */
return 1;
default:
/* ad naseum */
return 0;
}
}
#endif /* SVR4 */

1645
process.c Normal file

File diff suppressed because it is too large Load Diff

318
resource.c Normal file
View File

@ -0,0 +1,318 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#include <sys/resource.h>
#ifdef LINUX
#include <sys/times.h>
#include <linux/kernel.h>
#endif /* LINUX */
#ifdef SUNOS4
#include <ufs/quota.h>
#endif /* SUNOS4 */
#ifdef SVR4
#include <sys/times.h>
#include <sys/time.h>
#endif
static struct xlat resources[] = {
#ifdef RLIMIT_CPU
{ RLIMIT_CPU, "RLIMIT_CPU" },
#endif
#ifdef RLIMIT_FSIZE
{ RLIMIT_FSIZE, "RLIMIT_FSIZE" },
#endif
#ifdef RLIMIT_DATA
{ RLIMIT_DATA, "RLIMIT_DATA" },
#endif
#ifdef RLIMIT_STACK
{ RLIMIT_STACK, "RLIMIT_STACK" },
#endif
#ifdef RLIMIT_CORE
{ RLIMIT_CORE, "RLIMIT_CORE" },
#endif
#ifdef RLIMIT_RSS
{ RLIMIT_RSS, "RLIMIT_RSS" },
#endif
#ifdef RLIMIT_NOFILE
{ RLIMIT_NOFILE,"RLIMIT_NOFILE" },
#endif
#ifdef RLIMIT_VMEM
{ RLIMIT_VMEM, "RLIMIT_VMEM" },
#endif
#ifdef RLIMIT_AS
{ RLIMIT_AS, "RLIMIT_AS" },
#endif
{ 0, NULL },
};
static char *
sprintrlim(lim)
long lim;
{
static char buf[32];
if (lim == RLIM_INFINITY)
sprintf(buf, "RLIM_INFINITY");
else if (lim > 1024 && lim%1024 == 0)
sprintf(buf, "%ld*1024", lim/1024);
else
sprintf(buf, "%ld", lim);
return buf;
}
int
sys_getrlimit(tcp)
struct tcb *tcp;
{
struct rlimit rlim;
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
tprintf(", ");
}
else {
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
tprintf("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
}
}
return 0;
}
int
sys_setrlimit(tcp)
struct tcb *tcp;
{
struct rlimit rlim;
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
tprintf(", ");
if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
tprintf("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
}
}
return 0;
}
#ifndef SVR4
static struct xlat usagewho[] = {
{ RUSAGE_SELF, "RUSAGE_SELF" },
{ RUSAGE_CHILDREN, "RUSAGE_CHILDREN" },
{ 0, NULL },
};
void
printrusage(tcp, addr)
struct tcb *tcp;
long addr;
{
struct rusage ru;
if (!addr)
tprintf("NULL");
else if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &ru) < 0)
tprintf("{...}");
else if (!abbrev(tcp)) {
tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
(long) ru.ru_stime.tv_sec, (long) ru.ru_stime.tv_usec);
tprintf("ru_maxrss=%lu, ru_ixrss=%lu, ",
ru.ru_maxrss, ru.ru_ixrss);
tprintf("ru_idrss=%lu, ru_isrss=%lu, ",
ru.ru_idrss, ru.ru_isrss);
tprintf("ru_minflt=%lu, ru_majflt=%lu, ru_nswap=%lu, ",
ru.ru_minflt, ru.ru_majflt, ru.ru_nswap);
tprintf("ru_inblock=%lu, ru_oublock=%lu, ",
ru.ru_inblock, ru.ru_oublock);
tprintf("ru_msgsnd=%lu, ru_msgrcv=%lu, ",
ru.ru_msgsnd, ru.ru_msgrcv);
tprintf("ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}",
ru.ru_nsignals, ru.ru_nvcsw, ru.ru_nivcsw);
}
else {
tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ...}",
(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
(long) ru.ru_stime.tv_sec, (long) ru.ru_stime.tv_usec);
}
}
int
sys_getrusage(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
tprintf(", ");
}
else
printrusage(tcp, tcp->u_arg[1]);
return 0;
}
#endif /* !SVR4 */
#ifdef LINUX
int
sys_sysinfo(tcp)
struct tcb *tcp;
{
struct sysinfo si;
if (exiting(tcp)) {
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &si) < 0)
tprintf("{...}");
else {
tprintf("{uptime=%lu, loads=[%lu, %lu, %lu] ",
si.uptime, si.loads[0], si.loads[1],
si.loads[2]);
tprintf("totalram=%lu, freeram=%lu, ",
si.totalram, si.freeram);
tprintf("sharedram=%lu, bufferram=%lu} ",
si.sharedram, si.bufferram);
tprintf("totalswap=%lu, freeswap=%lu, procs=%hu}",
si.totalswap, si.freeswap, si.procs);
}
}
return 0;
}
#endif /* LINUX */
static struct xlat priorities[] = {
{ PRIO_PROCESS, "PRIO_PROCESS" },
{ PRIO_PGRP, "PRIO_PGRP" },
{ PRIO_USER, "PRIO_USER" },
{ 0, NULL },
};
int
sys_getpriority(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printxval(priorities, tcp->u_arg[0], "PRIO_???");
tprintf(", %lu", tcp->u_arg[1]);
}
return 0;
}
int
sys_setpriority(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printxval(priorities, tcp->u_arg[0], "PRIO_???");
tprintf(", %lu, %ld", tcp->u_arg[1], tcp->u_arg[2]);
}
return 0;
}
int
sys_nice(tcp)
struct tcb *tcp;
{
if (entering(tcp))
tprintf("%ld", tcp->u_arg[0]);
return 0;
}
#ifndef SUNOS4
int
sys_times(tcp)
struct tcb *tcp;
{
struct tms tbuf;
if (exiting(tcp)) {
if (tcp->u_arg[0] == 0)
tprintf("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &tbuf) < 0)
tprintf("{...}");
else {
tprintf("{tms_utime=%lu, tms_stime=%lu, ",
tbuf.tms_utime, tbuf.tms_stime);
tprintf("tms_cutime=%lu, tms_cstime=%lu}",
tbuf.tms_cutime, tbuf.tms_cstime);
}
}
return 0;
}
#endif /* !SUNOS4 */
#ifdef SUNOS4
static struct xlat quotacmds[] = {
{ Q_QUOTAON, "Q_QUOTAON" },
{ Q_QUOTAOFF, "Q_QUOTAOFF" },
{ Q_GETQUOTA, "Q_GETQUOTA" },
{ Q_SETQUOTA, "Q_SETQUOTA" },
{ Q_SETQLIM, "Q_SETQLIM" },
{ Q_SYNC, "Q_SYNC" },
{ 0, NULL },
};
int
sys_quotactl(tcp)
struct tcb *tcp;
{
/* fourth arg (addr) not interpreted here */
if (entering(tcp)) {
printxval(quotacmds, tcp->u_arg[0], "Q_???");
tprintf(", ");
printstr(tcp, tcp->u_arg[1], -1);
tprintf(", %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
}
return 0;
}
#endif /* SUNOS4 */

1528
signal.c Normal file

File diff suppressed because it is too large Load Diff

55
signalent.sh Normal file
View File

@ -0,0 +1,55 @@
#!/bin/sh
# Copyright (c) 1996 Rick Sladkey <jrs@world.std.com>
# 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$
cat $* |
sed -n -e 's/\/\*.*\*\// /' -e 's/^#[ ]*define[ ][ ]*SIG\([^_ ]*\)[ ][ ]*\([0-9][0-9]*\)[ ]*$/\1 \2/p' |
sort +1n |
awk '
BEGIN {
tabs = "\t\t\t\t\t\t\t\t"
signal = -1;
}
$2 <= 256 {
if (signal == $2)
next
while (++signal < $2) {
n = "\"SIG_" signal "\""
s = "\t" n ","
s = s substr(tabs, 1, 16/8 - int((length(n) + 1)/8))
s = s "/* " signal " */"
print s
}
if (signal == $2)
n = "\"SIG" $1 "\""
n = "\"SIG" $1 "\""
s = "\t" n ","
s = s substr(tabs, 1, 16/8 - int((length(n) + 1)/8))
s = s "/* " signal " */"
print s
}
'

83
sock.c Normal file
View File

@ -0,0 +1,83 @@
/*
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#ifdef linux
#include <sys/socket.h>
#else
#include <sys/sockio.h>
#endif
#ifdef ALPHA
#include <ioctls.h>
#endif
int
sock_ioctl(tcp, code, arg)
struct tcb *tcp;
long code, arg;
{
if (entering(tcp))
return 0;
switch (code) {
#ifdef SIOCSHIWAT
case SIOCSHIWAT:
#endif
#ifdef SIOCGHIWAT
case SIOCGHIWAT:
#endif
#ifdef SIOCSLOWAT
case SIOCSLOWAT:
#endif
#ifdef SIOCGLOWAT
case SIOCGLOWAT:
#endif
#ifdef FIOSETOWN
case FIOSETOWN:
#endif
#ifdef FIOGETOWN
case FIOGETOWN:
#endif
#ifdef SIOCSPGRP
case SIOCSPGRP:
#endif
#ifdef SIOCGPGRP
case SIOCGPGRP:
#endif
#ifdef SIOCATMARK
case SIOCATMARK:
#endif
printnum(tcp, arg, ", %#d");
return 1;
default:
return 0;
}
}

544
strace.1 Normal file
View File

@ -0,0 +1,544 @@
.\" Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
.\" Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
.\" Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
.\" 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$
.\"
.de CW
.sp
.nf
.ft CW
..
.de CE
.ft
.fi
.sp
..
.TH STRACE 1 "96/02/13"
.SH NAME
strace \- trace system calls and signals
.SH SYNOPSIS
.B strace
[
.B \-dffhiqrtttTvxx
]
[
.BI \-a column
]
[
.BI \-e expr
]
\&...
[
.BI \-o file
]
[
.BI \-p pid
]
\&...
[
.BI \-s strsize
]
[
.BI \-u username
]
[
.I command
[
.I arg
\&...
]
]
.sp
.B strace
.B \-c
[
.BI \-e expr
]
\&...
[
.BI \-O overhead
]
[
.BI \-S sortby
]
[
.I command
[
.I arg
\&...
]
]
.SH DESCRIPTION
.IX "strace command" "" "\fLstrace\fR command"
.LP
In the simplest case
.B strace
runs the specified
.I command
until it exits.
It intercepts and records the system calls which are called
by a process and the signals which are received by a process.
The name of each system call, its arguments and its return value
are printed on standard error or to the file specified with the
.B \-o
option.
.LP
.B strace
is a useful diagnositic, instructional, and debugging tool.
System adminstrators, diagnosticians and trouble-shooters will find
it invaluable for solving problems with
programs for which the source is not readily available since
they do not need to be recompiled in order to trace them.
Students, hackers and the overly-curious will find that
a great deal can be learned about a system and its system calls by
tracing even ordinary programs. And programmers will find that
since system calls and signals are events that happen at the user/kernel
interface, a close examination of this boundary is very
useful for bug isolation, sanity checking and
attempting to capture race conditions.
.LP
Each line in the trace contains the system call name, followed
by its arguments in parentheses and its return value.
An example from stracing the command ``cat /dev/null'' is:
.CW
open("/dev/null", O_RDONLY) = 3
.CE
Errors (typically a return value of \-1) have the errno symbol
and error string appended.
.CW
open("/foo/bar", O_RDONLY) = -1 ENOENT (No such file or directory)
.CE
Signals are printed as a signal symbol and a signal string.
An excerpt from stracing and interrupting the command ``sleep 666'' is:
.CW
sigsuspend([] <unfinished ...>
--- SIGINT (Interrupt) ---
+++ killed by SIGINT +++
.CE
Arguments are printed in symbolic form with a passion.
This example shows the shell peforming ``>>xyzzy'' output redirection:
.CW
open("xyzzy", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
.CE
Here the three argument form of open is decoded by breaking down the
flag argument into its three bitwise-OR constituents and printing the
mode value in octal by tradition. Where traditional or native
usage differs from ANSI or POSIX, the latter forms are preferred.
In some cases, strace output has proven to be more readable than
the source.
.LP
Structure pointers are dereferenced and the members are displayed
as appropriate. In all cases arguments are formatted in the most C-like
fashion possible.
For example, the essence of the command ``ls \-l /dev/null'' is captured as:
.CW
lstat("/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
.CE
Notice how the `struct stat' argument is dereferenced and how each member is
displayed symbolically. In particular, observe how the st_mode member
is carefully decoded into a bitwise-OR of symbolic and numeric values.
Also notice in this example that the first argument to lstat is an input
to the system call and the second argument is an output. Since output
arguments not modified if the system call fails, arguments may not
always be dereferenced. For example, retrying the ``ls \-l'' example
with a non-existent file produces the following line:
.CW
lstat("/foo/bar", 0xb004) = -1 ENOENT (No such file or directory)
.CE
In this case the porch light is on but nobody is home.
.LP
Character pointers are dereferenced and printed as C strings.
Non-printing characters in strings are normally represented by
ordinary C escape codes.
Only the first
.I strsize
(32 by default) bytes of strings are printed;
longer strings have an ellipsis appended following the closing quote.
Here is a line from ``ls \-l'' where the getpwuid library routine is
reading the password file:
.CW
read(3, "root::0:0:System Administrator:/"..., 1024) = 422
.CE
While structures are annotated using curly braces, simple pointers
and arrays are printed using square brackets with commas separating
elements. Here is an example from the command ``id'' on a system with
supplementary group ids:
.CW
getgroups(32, [100, 0]) = 2
.CE
On the other hand, bit-sets are also shown using square brackets
but set elements are separated only by a space. Here is the shell
preparing to execute an external command:
.CW
sigprocmask(SIG_BLOCK, [CHLD TTOU], []) = 0
.CE
Here the second argument is a bit-set of two signals, SIGCHLD and SIGTTOU.
In some cases the bit-set is so full that printing out the unset
elements is more valuable. In that case, the bit-set is prefixed by
a tilde like this:
.CW
sigprocmask(SIG_UNBLOCK, ~[], NULL) = 0
.CE
Here the second argument represents the full set of all signals.
.SH OPTIONS
.TP 12
.TP
.B \-c
Count time, calls, and errors for each system call and report a
summary on program exit.
.TP
.B \-d
Show some debugging output of strace itself on
.I stderr .
.TP
.B \-f
Trace child processes as they are created by currently traced
processes as a result of the fork(2) system call. The new process is
attached to as soon as its pid is known (through the return value of
fork(2) in the parent process). This means that such children may run
uncontrolled for a while (especially in the case of a vfork(2)), until
the parent is scheduled again to complete its (v)fork(2) call.
If the parent process decides to wait(2) for a child that is currently
being traced, it is suspended until an appropriate child process either
terminates or incurs a signal that would cause it to terminate (as
determined from the child's current signal disposition).
.TP
.B \-ff
If the
.B \-o
.I filename
option is in effect, each processes trace is written to
.I filename.pid
where pid is the numeric process id of each process.
.TP
.B \-F
On SunOS 4.x, this option has the effect of attempting to follow
vforks by performing some dynamic linking trickery. Otherwise,
vforks will not be followed even if
.B \-f
has been given.
.TP
.B \-h
Print the help summary.
.TP
.B \-i
Print the instruction pointer at the time of the system call.
.TP
.B \-q
Suppress messages about attaching, detaching etc. This happens
automatically when output is redirected to a file and the command
is run directly instead of attaching.
.TP
.B \-r
Print a relative timestamp upon entry to each system call. This
records the time difference between the beginning of successive
system calls.
.TP
.B \-t
Prefix each line of the trace with the time of day.
.TP
.B \-tt
If given twice, the time printed will include the microseconds.
.TP
.B \-ttt
If given thrice, the time printed will include the microseconds
and the leading portion will be printed as the number
of seconds since the epoch.
.TP
.B \-T
Show the time spent in system calls. This records the time
difference between the beginning and the end of each system call.
.TP
.B \-v
Print unabbreviated versions of environment, stat, termios, etc.
calls. These structures are very common in calls and so the default
behavior displays a reasonable subset of structure members. Use
this option to get all of the gory details.
.TP
.B \-V
Print the version number of strace.
.TP
.B \-x
Print all non-ascii strings in hexadecimal string format.
.TP
.B \-xx
Print all strings in hexadecimal string format.
.TP
.BI "\-a " column
Align return values in a secific column (default column 40).
.TP
.BI "\-e " expr
A qualifying expression which modifies which events to trace
or how to trace them. The format of the expression is:
.br
[qualifier=][!]value1[,value2]...
.br
where qualifier is one of trace, abbrev, verbose, raw, signal, read, or write
and value is a qualifier-dependent symbol or number. The default
qualifier is trace. Using an exclamation mark negates the set of values.
For example \-eopen means literally \-e trace=open which in turn means
trace only the open system call. By contrast, \-etrace=!open means
to trace every system call except open. In addition the special values
all and none have the obvious meanings.
.LP
Note that some shells use the exclamation point for history
expansion; even inside quoted arguments. If so, you must escape
the exclamation point with a backslash.
.TP
.BI "\-e trace=" set
Trace only the specified set of system calls. The
.B \-c
option is useful for determining which system calls might be useful
to trace. For example, trace=open,close,read,write means to only
trace those four system calls. Be careful when making inferences
about the user/kernel boundary if only a subset of system calls
are being monitored. The default is trace=all.
.TP
.B "\-e trace=file"
Trace all system calls which take a file name as an argument. You
can think of this as an abbreviation for
.BR "\-e trace=open,stat,chmod,unlink," ...
which is useful to seeing what files the process is referencing.
Furthermore, using the abbreviation will ensure that you don't
accidentally forget to include a call like
.B lstat
in the list. Betchya woulda forgot that one.
.TP
.B "\-e trace=process"
Trace all system calls which involve process management. This
is useful for watching the fork, wait, and exec steps of a process.
.TP
.B "\-e trace=network"
Trace all the network related system calls.
.TP
.B "\-e trace=signal"
Trace all signal related system calls.
.TP
.B "\-e trace=ipc"
Trace all IPC related system calls.
.TP
.BI "\-e abbrev=" set
Abbreviate the output from printing each member of large structures.
The default is abbrev=all. The
.B \-v
option has the effect of abbrev=none.
.TP
.BI "\-e verbose=" set
Dereference structures for the specified set of system calls. The
default is verbose=all.
.TP
.BI "\-e raw=" set
Print raw, undecoded arguments for the specifed set of system calls.
This option has the effect of causing all arguments to be printed
in hexadecimal. This is mostly useful if you don't trust the
decoding or you need to know the actual numeric value of an
argument.
.TP
.BI "\-e signal=" set
Trace only the specified subset of signals. The default is signal=all.
For example signal=!SIGIO (or signal=!io) causes SIGIO signals not to
be traced.
.TP
.BI "\-e read=" set
Perform a full hexadecimal and ascii dump of all the data read from
file descriptors listed in the specified set. For example, to see
all input activity on file descriptors 3 and 5 use
.BR "\-e read=3,5" .
Note that this is independent from the normal tracing of the read
system call which is controlled by the option
.BR "\-e trace=read" .
.TP
.BI "\-e write=" set
Perform a full hexadecimal and ascii dump of all the data written to
file descriptors listed in the specified set. For example, to see
all output activity on file descriptors 3 and 5 use
.BR "\-e write=3,5" .
Note that this is independent from the normal tracing of the write
system call which is controlled by the option
.BR "\-e trace=write" .
.TP
.BI "\-o " filename
Write the trace output to the file
.I filename
rather than to stderr.
Use
.I filename.pid
if
.B \-ff
is used.
If the argument begins with `|' or with `!' then the rest of the
argument is treated as a command and all output is piped to it.
This is convenient for piping the debugging output to a program
without affecting the redirections of executed programs.
.TP
.BI "\-O " overhead
Set the overhead for tracing system calls to overhead microseconds.
This is useful for overriding the default heuristic for guessing
how much time is spent in mere measuring when timing system calls using
the
.B \-c
option. The acuracy of the heuristic can be gauged by timing a given
program run without tracing (using time(1)) and comparing the accumulated
system call time to the total produced using
.B \-c .
.TP
.BI "\-p " pid
Attach to the process with the process
.SM ID
.I pid
and begin tracing.
The trace may be terminated
at any time by a keyboard interrupt signal (\c
.SM CTRL\s0-C).
.B strace
will respond by detaching itself from the traced process(es)
leaving it (them) to continue running.
Multiple
.B \-p
options can be used to attach to up to 32 processes in addition to
.I command
(which is optional if at least one
.B \-p
option is given).
.TP
.BI "\-s " strsize
Specify the maximum string size to print (the default is 32). Note
that filenames are not considered strings and are always printed in
full.
.TP
.BI "\-S " sortby
Sort the output of the histogram printed by the
.B \-c
option by the specified critereon. Legal values are
time, calls, name, and nothing (default time).
.TP
.BI "\-u " username
Run command with the userid, groupid and supplementary groups of
.IR username .
This option is only useful when running as root and enables the
correct execution of setuid and/or setgid binaries.
Unless this option is used setuid and setgid programs are executed
without effective privileges.
.SH "SETUID INSTALLATION"
If
.B strace
is installed setuid to root then the invoking user will be able to
attach to and trace processes owned by any user.
In addition setuid and setgid programs will be executed and traced
with the correct effective privileges.
Since only users trusted with full root privileges should be allowed
to do these things,
it only makes sense to install
.B strace
as setuid to root when the users who can execute it are restricted
to those users who have this trust.
For example, it makes sense to install a special version of
.B
strace
with mode `rwsr-xr--', user root and group trace,
where members of the trace group are trusted users.
If you do use this feature, please remember to install
a non-setuid version of strace for ordinary lusers to use.
.SH "SEE ALSO"
.BR ptrace(2) ,
.BR proc(4) ,
.BR time(1) ,
.BR trace(1) ,
.BR truss(1)
.SH NOTES
It is a pity that so much tracing clutter is produced by systems
employing shared libraries.
.LP
It is instructive to think about system call inputs and outputs
as data-flow across the user/kernel boundary. Because user-space
and kernel-space are separate and address-protected, it is
sometimes possible to make deductive inferences about process
behavior using inputs and outputs as propositions.
.LP
In some cases, a system call will differ from the documented behavior
or have a different name. For example, on System V derived systems
the true time(2) system call does not take an argument and the stat
function is called xstat and takes an extra leading argument. These
discrepancies are normal but idiosyncratic characteristics of the
system call interface and are accounted for by C library wrapper
functions.
.LP
On some platforms a process that has a system call trace applied
to it with the
.B \-p
option will receive a
.BR \s-1SIGSTOP\s0 .
This signal may interrupt a system call that is not restartable.
This may have an unpredictable effect on the process
if the process takes no action to restart the system call.
.SH BUGS
Programs that use the
.I setuid
bit do not have
effective user
.SM ID
privileges while being traced.
.LP
A traced process ignores
.SM SIGSTOP
except of SVR4 platforms.
.LP
A traced process which tries to block SIGTRAP will be sent a SIGSTOP
in an attempt to force continuation of tracing.
.LP
A traced process runs slowly.
.LP
Traced processes which are descended from
.I command
may be left running after an interrupt signal (\c
.SM CTRL\s0-C).
.LP
On Linux, exciting as it would be, tracing the init process is forbidden.
.LP
The
.B \-i
option is weakly supported.
.SH HISTORY
.B strace
The original strace was written by Paul Kranenburg
for SunOS and was inspired by its trace utility.
The SunOS version of strace was ported to Linux and enhanced
by Branko Lankester, who also wrote the Linux kernel support.
Even though Paul released strace 2.5 in 1992,
Branko's work was based on Paul's strace 1.5 release from 1991.
In 1993, Rick Sladkey merged strace 2.5 for SunOS and the
second release of strace for Linux, added many of the features of
truss from SVR4, and produced an strace that worked on both platforms.
In 1994 Rick ported strace to SVR4 and Solaris and wrote the
automatic configuration support. In 1995 he ported strace to Irix
and tired of writing about himself in the third person.
.SH PROBLEMS
Problems with
.B strace
should be reported to the current
.B strace
maintainer, Rick Sladkey, at <jrs@world.std.com>.

1653
strace.c Normal file

File diff suppressed because it is too large Load Diff

822
stream.c Normal file
View File

@ -0,0 +1,822 @@
/*
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#if defined(HAVE_SYS_STREAM_H) || defined(LINUXSPARC) || defined(linux)
#if defined(LINUXSPARC) || defined(linux)
#include <sys/poll.h>
#define RS_HIPRI 1
struct strbuf {
int maxlen; /* no. of bytes in buffer */
int len; /* no. of bytes returned */
char *buf; /* pointer to data */
};
#define MORECTL 1
#define MOREDATA 2
#else /* LINUXSPARC */
#include <stropts.h>
#include <poll.h>
#include <sys/conf.h>
#include <sys/stream.h>
#include <sys/tihdr.h>
#endif /* LINUXSPARC */
#ifdef HAVE_SYS_TIUSER_H
#include <sys/tiuser.h>
#include <sys/sockmod.h>
#include <sys/timod.h>
#endif /* HAVE_SYS_TIUSER_H */
static struct xlat msgflags[] = {
{ RS_HIPRI, "RS_HIPRI" },
{ 0, NULL },
};
#if 0
static struct xlat getmsgflags[] = {
{ MORECTL, "MORECTL" },
{ MOREDATA, "MOREDATA" },
{ 0, NULL },
};
#endif
static void
printstrbuf(tcp, sbp, getting)
struct tcb *tcp;
struct strbuf *sbp;
int getting;
{
if (sbp->maxlen == -1 && getting)
tprintf("{maxlen=-1}");
else {
tprintf("{");
if (getting)
tprintf("maxlen=%d, ", sbp->maxlen);
tprintf("len=%d, buf=", sbp->len);
printstr(tcp, (int) sbp->buf, sbp->len);
tprintf("}");
}
}
static void
printstrbufarg(tcp, arg, getting)
struct tcb *tcp;
int arg;
int getting;
{
struct strbuf buf;
if (arg == 0)
tprintf("NULL");
else if (umove(tcp, arg, &buf) < 0)
tprintf("{...}");
else
printstrbuf(tcp, &buf, getting);
tprintf(", ");
}
int
sys_putmsg(tcp)
struct tcb *tcp;
{
int i;
if (entering(tcp)) {
/* fd */
tprintf("%ld, ", tcp->u_arg[0]);
/* control and data */
for (i = 1; i < 3; i++)
printstrbufarg(tcp, tcp->u_arg[i], 0);
/* flags */
if (!printflags(msgflags, tcp->u_arg[3]))
tprintf("0");
}
return 0;
}
int
sys_getmsg(tcp)
struct tcb *tcp;
{
int i, flags;
if (entering(tcp)) {
/* fd */
tprintf("%lu, ", tcp->u_arg[0]);
} else {
if (syserror(tcp)) {
tprintf("%#lx, %#lx, %#lx",
tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
return 0;
}
/* control and data */
for (i = 1; i < 3; i++)
printstrbufarg(tcp, tcp->u_arg[i], 1);
/* pointer to flags */
if (tcp->u_arg[3] == 0)
tprintf("NULL");
else if (umove(tcp, tcp->u_arg[3], &flags) < 0)
tprintf("[?]");
else {
tprintf("[");
if (!printflags(msgflags, flags))
tprintf("0");
tprintf("]");
}
/* decode return value */
switch (tcp->u_rval) {
case MORECTL:
tcp->auxstr = "MORECTL";
break;
case MORECTL|MOREDATA:
tcp->auxstr = "MORECTL|MOREDATA";
break;
case MOREDATA:
tcp->auxstr = "MORECTL";
break;
default:
tcp->auxstr = NULL;
break;
}
}
return RVAL_HEX | RVAL_STR;
}
#ifdef HAVE_PUTPMSG
static struct xlat pmsgflags[] = {
{ MSG_HIPRI, "MSG_HIPRI" },
{ MSG_ANY, "MSG_ANY" },
{ MSG_BAND, "MSG_BAND" },
{ 0, NULL },
};
int
sys_putpmsg(tcp)
struct tcb *tcp;
{
int i;
if (entering(tcp)) {
/* fd */
tprintf("%ld, ", tcp->u_arg[0]);
/* control and data */
for (i = 1; i < 3; i++)
printstrbufarg(tcp, tcp->u_arg[i], 0);
/* band */
tprintf("%ld, ", tcp->u_arg[3]);
/* flags */
if (!printflags(pmsgflags, tcp->u_arg[4]))
tprintf("0");
}
return 0;
}
int
sys_getpmsg(tcp)
struct tcb *tcp;
{
int i, flags;
if (entering(tcp)) {
/* fd */
tprintf("%lu, ", tcp->u_arg[0]);
} else {
if (syserror(tcp)) {
tprintf("%#lx, %#lx, %#lx, %#lx", tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[4]);
return 0;
}
/* control and data */
for (i = 1; i < 3; i++)
printstrbufarg(tcp, tcp->u_arg[i], 1);
/* pointer to band */
printnum(tcp, tcp->u_arg[3], "%d");
/* pointer to flags */
if (tcp->u_arg[4] == 0)
tprintf("NULL");
else if (umove(tcp, tcp->u_arg[4], &flags) < 0)
tprintf("[?]");
else {
tprintf("[");
if (!printflags(pmsgflags, flags))
tprintf("0");
tprintf("]");
}
/* decode return value */
switch (tcp->u_rval) {
case MORECTL:
tcp->auxstr = "MORECTL";
break;
case MORECTL|MOREDATA:
tcp->auxstr = "MORECTL|MOREDATA";
break;
case MOREDATA:
tcp->auxstr = "MORECTL";
break;
default:
tcp->auxstr = NULL;
break;
}
}
return RVAL_HEX | RVAL_STR;
}
#endif /* HAVE_PUTPMSG */
#if !defined(LINUXSPARC)
static struct xlat pollflags[] = {
{ POLLIN, "POLLIN" },
{ POLLPRI, "POLLPRI" },
{ POLLOUT, "POLLOUT" },
#ifdef POLLRDNORM
{ POLLRDNORM, "POLLRDNORM" },
#endif
#ifdef POLLWRNORM
{ POLLWRNORM, "POLLWRNORM" },
#endif
#ifdef POLLRDBAND
{ POLLRDBAND, "POLLRDBAND" },
#endif
#ifdef POLLWRBAND
{ POLLWRBAND, "POLLWRBAND" },
#endif
{ POLLERR, "POLLERR" },
{ POLLHUP, "POLLHUP" },
{ POLLNVAL, "POLLNVAL" },
{ 0, NULL },
};
int
sys_poll(tcp)
struct tcb *tcp;
{
struct pollfd *pollp;
if (exiting(tcp)) {
int i;
int nfds = tcp->u_arg[1];
if (nfds <= 0) {
tprintf("%#lx, %d, %ld\n",
tcp->u_arg[0], nfds, tcp->u_arg[2]);
return 0;
}
pollp = (struct pollfd *) malloc(nfds * sizeof(*pollp));
if (pollp == NULL) {
fprintf(stderr, "sys_poll: no memory\n");
tprintf("%#lx, %d, %ld",
tcp->u_arg[0], nfds, tcp->u_arg[2]);
return 0;
}
if (umoven(tcp, tcp->u_arg[0],
(nfds * sizeof(*pollp)), (char *) pollp) < 0) {
tprintf("%#lx", tcp->u_arg[0]);
}
else {
tprintf("[");
for (i = 0; i < nfds; i++) {
if (i)
tprintf(", ");
if (pollp[i].fd < 0) {
tprintf("{fd=%d}", pollp[i].fd);
continue;
}
tprintf("{fd=%d, events=", pollp[i].fd);
if (!printflags(pollflags, pollp[i].events))
tprintf("0");
if (!syserror(tcp) && pollp[i].revents) {
tprintf(", revents=");
if (!printflags(pollflags,
pollp[i].revents))
tprintf("0");
}
tprintf("}");
}
tprintf("]");
}
tprintf(", %d, ", nfds);
#ifdef INFTIM
if (tcp->u_arg[2] == INFTIM)
tprintf("INFTIM");
else
#endif
tprintf("%ld", tcp->u_arg[2]);
free(pollp);
}
return 0;
}
#ifndef linux
static struct xlat stream_flush_options[] = {
{ FLUSHR, "FLUSHR" },
{ FLUSHW, "FLUSHW" },
{ FLUSHRW, "FLUSHRW" },
#ifdef FLUSHBAND
{ FLUSHBAND, "FLUSHBAND" },
#endif
{ 0, NULL },
};
static struct xlat stream_setsig_flags[] = {
{ S_INPUT, "S_INPUT" },
{ S_HIPRI, "S_HIPRI" },
{ S_OUTPUT, "S_OUTPUT" },
{ S_MSG, "S_MSG" },
#ifdef S_ERROR
{ S_ERROR, "S_ERROR" },
#endif
#ifdef S_HANGUP
{ S_HANGUP, "S_HANGUP" },
#endif
#ifdef S_RDNORM
{ S_RDNORM, "S_RDNORM" },
#endif
#ifdef S_WRNORM
{ S_WRNORM, "S_WRNORM" },
#endif
#ifdef S_RDBAND
{ S_RDBAND, "S_RDBAND" },
#endif
#ifdef S_WRBAND
{ S_WRBAND, "S_WRBAND" },
#endif
#ifdef S_BANDURG
{ S_BANDURG, "S_BANDURG" },
#endif
{ 0, NULL },
};
static struct xlat stream_read_options[] = {
{ RNORM, "RNORM" },
{ RMSGD, "RMSGD" },
{ RMSGN, "RMSGN" },
{ 0, NULL },
};
static struct xlat stream_read_flags[] = {
#ifdef RPROTDAT
{ RPROTDAT, "RPROTDAT" },
#endif
#ifdef RPROTDIS
{ RPROTDIS, "RPROTDIS" },
#endif
#ifdef RPROTNORM
{ RPROTNORM, "RPROTNORM" },
#endif
{ 0, NULL },
};
#ifndef RMODEMASK
#define RMODEMASK (~0)
#endif
#ifdef I_SWROPT
static struct xlat stream_write_flags[] = {
{ SNDZERO, "SNDZERO" },
{ SNDPIPE, "SNDPIPE" },
{ 0, NULL },
};
#endif /* I_SWROPT */
#ifdef I_ATMARK
static struct xlat stream_atmark_options[] = {
{ ANYMARK, "ANYMARK" },
{ LASTMARK, "LASTMARK" },
{ 0, NULL },
};
#endif /* I_ATMARK */
#ifdef TI_BIND
static struct xlat transport_user_options[] = {
{ T_CONN_REQ, "T_CONN_REQ" },
{ T_CONN_RES, "T_CONN_RES" },
{ T_DISCON_REQ, "T_DISCON_REQ" },
{ T_DATA_REQ, "T_DATA_REQ" },
{ T_EXDATA_REQ, "T_EXDATA_REQ" },
{ T_INFO_REQ, "T_INFO_REQ" },
{ T_BIND_REQ, "T_BIND_REQ" },
{ T_UNBIND_REQ, "T_UNBIND_REQ" },
{ T_UNITDATA_REQ,"T_UNITDATA_REQ"},
{ T_OPTMGMT_REQ,"T_OPTMGMT_REQ" },
{ T_ORDREL_REQ, "T_ORDREL_REQ" },
{ 0, NULL },
};
static struct xlat transport_provider_options[] = {
{ T_CONN_IND, "T_CONN_IND" },
{ T_CONN_CON, "T_CONN_CON" },
{ T_DISCON_IND, "T_DISCON_IND" },
{ T_DATA_IND, "T_DATA_IND" },
{ T_EXDATA_IND, "T_EXDATA_IND" },
{ T_INFO_ACK, "T_INFO_ACK" },
{ T_BIND_ACK, "T_BIND_ACK" },
{ T_ERROR_ACK, "T_ERROR_ACK" },
{ T_OK_ACK, "T_OK_ACK" },
{ T_UNITDATA_IND,"T_UNITDATA_IND"},
{ T_UDERROR_IND,"T_UDERROR_IND" },
{ T_OPTMGMT_ACK,"T_OPTMGMT_ACK" },
{ T_ORDREL_IND, "T_ORDREL_IND" },
{ 0, NULL },
};
#endif /* TI_BIND */
static int
internal_stream_ioctl(tcp, arg)
struct tcb *tcp;
int arg;
{
struct strioctl si;
char *name;
int in_and_out;
#ifdef SI_GETUDATA
struct si_udata udata;
#endif /* SI_GETUDATA */
if (!arg)
return 0;
if (umove(tcp, arg, &si) < 0) {
if (entering(tcp))
tprintf(", {...}");
return 1;
}
if (entering(tcp)) {
name = ioctl_lookup(si.ic_cmd);
if (name)
tprintf(", {ic_cmd=%s", name);
else
tprintf(", {ic_cmd=%#x", si.ic_cmd);
if (si.ic_timout == INFTIM)
tprintf(", ic_timout=INFTIM, ");
else
tprintf(" ic_timout=%d, ", si.ic_timout);
}
in_and_out = 1;
switch (si.ic_cmd) {
#ifdef SI_GETUDATA
case SI_GETUDATA:
in_and_out = 0;
break;
#endif /* SI_GETUDATA */
}
if (in_and_out) {
if (entering(tcp))
tprintf("/* in */ ");
else
tprintf(", /* out */ ");
}
if (in_and_out || entering(tcp))
tprintf("ic_len=%d, ic_dp=", si.ic_len);
switch (si.ic_cmd) {
#ifdef TI_BIND
case TI_BIND:
/* in T_BIND_REQ, out T_BIND_ACK */
if (entering(tcp)) {
struct T_bind_req data;
#if 0
tprintf("struct T_bind_req ");
#endif
if (umove(tcp, (int) si.ic_dp, &data) < 0)
tprintf("{...}");
else {
tprintf("{PRIM_type=");
printxval(transport_user_options,
data.PRIM_type, "T_???");
tprintf(", ADDR_length=%ld, ADDR_offset=%ld",
data.ADDR_length, data.ADDR_offset);
tprintf(", CONIND_number=%ld}",
data.CONIND_number);
}
}
else {
struct T_bind_ack data;
#if 0
tprintf("struct T_bind_ack ");
#endif
if (umove(tcp, (int) si.ic_dp, &data) < 0)
tprintf("{...}");
else {
tprintf("[");
tprintf("{PRIM_type=");
printxval(transport_provider_options,
data.PRIM_type, "T_???");
tprintf(", ADDR_length=%ld, ADDR_offset=%ld",
data.ADDR_length, data.ADDR_offset);
tprintf(", CONIND_number=%ld}",
data.CONIND_number);
tprintf(", ");
printstr(tcp,
(int) si.ic_dp + data.ADDR_offset,
data.ADDR_length);
tprintf("]");
}
}
break;
#endif /* TI_BIND */
#if 0
#ifdef TI_UNBIND
case TI_UNBIND:
/* in T_UNBIND_REQ, out T_OK_ACK */
break;
#endif /* TI_UNBIND */
#ifdef TI_GETINFO
case TI_GETINFO:
/* in T_INFO_REQ, out T_INFO_ACK */
break;
#endif /* TI_GETINFO */
#ifdef TI_OPTMGMT
case TI_OPTMGMT:
/* in T_OPTMGMT_REQ, out T_OPTMGMT_ACK */
break;
#endif /* TI_OPTMGMT */
#endif
#ifdef SI_GETUDATA
case SI_GETUDATA:
if (entering(tcp))
break;
#if 0
tprintf("struct si_udata ");
#endif
if (umove(tcp, (int) si.ic_dp, &udata) < 0)
tprintf("{...}");
else {
tprintf("{tidusize=%d, addrsize=%d, ",
udata.tidusize, udata.addrsize);
tprintf("optsize=%d, etsdusize=%d, ",
udata.optsize, udata.etsdusize);
tprintf("servtype=%d, so_state=%d, ",
udata.servtype, udata.so_state);
tprintf("so_options=%d", udata.so_options);
#if 0
tprintf(", tsdusize=%d", udata.tsdusize);
#endif
tprintf("}");
}
break;
#endif /* SI_GETUDATA */
default:
printstr(tcp, (int) si.ic_dp, si.ic_len);
break;
}
if (exiting(tcp))
tprintf("}");
return 1;
}
int
stream_ioctl(tcp, code, arg)
struct tcb *tcp;
int code, arg;
{
#ifdef I_LIST
int i;
#endif
int val;
#ifdef I_FLUSHBAND
struct bandinfo bi;
#endif
struct strpeek sp;
struct strfdinsert sfi;
struct strrecvfd srf;
#ifdef I_LIST
struct str_list sl;
#endif
/* I_STR is a special case because the data is read & written. */
if (code == I_STR)
return internal_stream_ioctl(tcp, arg);
if (entering(tcp))
return 0;
switch (code) {
case I_PUSH:
case I_LOOK:
case I_FIND:
/* arg is a string */
tprintf(", ");
printpath(tcp, arg);
return 1;
case I_POP:
/* doesn't take an argument */
return 1;
case I_FLUSH:
/* argument is an option */
tprintf(", ");
printxval(stream_flush_options, arg, "FLUSH???");
return 1;
#ifdef I_FLUSHBAND
case I_FLUSHBAND:
/* argument is a pointer to a bandinfo struct */
if (umove(tcp, arg, &bi) < 0)
tprintf(", {...}");
else {
tprintf(", {bi_pri=%d, bi_flag=", bi.bi_pri);
if (!printflags(stream_flush_options, bi.bi_flag))
tprintf("0");
tprintf("}");
}
return 1;
#endif /* I_FLUSHBAND */
case I_SETSIG:
/* argument is a set of flags */
tprintf(", ");
if (!printflags(stream_setsig_flags, arg))
tprintf("0");
return 1;
case I_GETSIG:
/* argument is a pointer to a set of flags */
if (syserror(tcp))
return 0;
tprintf(", [");
if (umove(tcp, arg, &val) < 0)
tprintf("?");
else if (!printflags(stream_setsig_flags, val))
tprintf("0");
tprintf("]");
return 1;
case I_PEEK:
/* argument is a pointer to a strpeek structure */
if (syserror(tcp) || !arg)
return 0;
if (umove(tcp, arg, &sp) < 0) {
tprintf(", {...}");
return 1;
}
tprintf(", {ctlbuf=");
printstrbuf(tcp, &sp.ctlbuf, 1);
tprintf(", databuf=");
printstrbuf(tcp, &sp.databuf, 1);
if (!printflags(msgflags, sp.flags))
tprintf("0");
return 1;
case I_SRDOPT:
/* argument is an option with flags */
tprintf(", ");
printxval(stream_read_options, arg & RMODEMASK, "R???");
addflags(stream_read_flags, arg & ~RMODEMASK);
return 1;
case I_GRDOPT:
/* argument is an pointer to an option with flags */
if (syserror(tcp))
return 0;
tprintf(", [");
if (umove(tcp, arg, &val) < 0)
tprintf("?");
else {
printxval(stream_read_options,
arg & RMODEMASK, "R???");
addflags(stream_read_flags, arg & ~RMODEMASK);
}
tprintf("]");
return 1;
case I_NREAD:
#ifdef I_GETBAND
case I_GETBAND:
#endif
#ifdef I_SETCLTIME
case I_SETCLTIME:
#endif
#ifdef I_GETCLTIME
case I_GETCLTIME:
#endif
/* argument is a pointer to a decimal integer */
if (syserror(tcp))
return 0;
tprintf(", ");
printnum(tcp, arg, "%d");
return 1;
case I_FDINSERT:
/* argument is a pointer to a strfdinsert structure */
if (syserror(tcp) || !arg)
return 0;
if (umove(tcp, arg, &sfi) < 0) {
tprintf(", {...}");
return 1;
}
tprintf(", {ctlbuf=");
printstrbuf(tcp, &sfi.ctlbuf, 1);
tprintf(", databuf=");
printstrbuf(tcp, &sfi.databuf, 1);
if (!printflags(msgflags, sfi.flags))
tprintf("0");
tprintf(", filedes=%d, offset=%d}", sfi.fildes, sfi.offset);
return 1;
#ifdef I_SWROPT
case I_SWROPT:
/* argument is a set of flags */
tprintf(", ");
if (!printflags(stream_write_flags, arg))
tprintf("0");
return 1;
#endif /* I_SWROPT */
#ifdef I_GWROPT
case I_GWROPT:
/* argument is an pointer to an option with flags */
if (syserror(tcp))
return 0;
tprintf(", [");
if (umove(tcp, arg, &val) < 0)
tprintf("?");
else if (!printflags(stream_write_flags, arg))
tprintf("0");
tprintf("]");
return 1;
#endif /* I_GWROPT */
case I_SENDFD:
#ifdef I_CKBAND
case I_CKBAND:
#endif
#ifdef I_CANPUT
case I_CANPUT:
#endif
case I_LINK:
case I_UNLINK:
case I_PLINK:
case I_PUNLINK:
/* argument is a decimal integer */
tprintf(", %d", arg);
return 1;
case I_RECVFD:
/* argument is a pointer to a strrecvfd structure */
if (syserror(tcp) || !arg)
return 0;
if (umove(tcp, arg, &srf) < 0) {
tprintf(", {...}");
return 1;
}
tprintf(", {fd=%d, uid=%lu, gid=%lu}", srf.fd,
(unsigned long) srf.uid, (unsigned long) srf.gid);
return 1;
#ifdef I_LIST
case I_LIST:
if (syserror(tcp))
return 0;
if (arg == 0) {
tprintf(", NULL");
return 1;
}
if (umove(tcp, arg, &sl) < 0) {
tprintf(", {...}");
return 1;
}
tprintf(", {sl_nmods=%d, sl_modlist=[", sl.sl_nmods);
for (i = 0; i < tcp->u_rval; i++) {
if (i)
tprintf(", ");
printpath(tcp, (int) sl.sl_modlist[i].l_name);
}
tprintf("]}");
return 1;
#endif /* I_LIST */
#ifdef I_ATMARK
case I_ATMARK:
tprintf(", ");
printxval(stream_atmark_options, arg, "???MARK");
return 1;
#endif /* I_ATMARK */
default:
return 0;
}
}
#endif /* linux */
#endif /* LINUXSPARC && linux */
#endif /* HAVE_SYS_STREAM_H */

56
sunos4/Makefile.in Normal file
View File

@ -0,0 +1,56 @@
#
# $Id$
#
srcdir = @srcdir@
VPATH = $(srcdir)
CC = @CC@
CPP = @CPP@
SHELL = /bin/sh
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = -g
LDFLAGS = -g
WARNFLAGS = @WARNFLAGS@
CPPFLAGS =
INCLUDES = -I. -I.. -I$(srcdir)
includedir = @includedir@
all: ioctlent.h errnoent.h signalent.h syscallent.h
ioctlent.raw: ioctlent.sh
$(SHELL) $(srcdir)/ioctlent.sh $(includedir) >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort: ioctlsort.o
$(CC) $(LDFLAGS) ioctlsort.o -o ioctlsort
ioctlsort.o: ../ioctlsort.c ioctlent.raw
$(CC) $(WARNFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $(srcdir)/../ioctlsort.c
errnoent.h: ../errnoent.sh $(includedir)/sys/errno.h
$(SHELL) $(srcdir)/../errnoent.sh $(includedir)/sys/errno.h >$@
signalent.h: ../signalent.sh $(includedir)/sys/signal.h
$(SHELL) $(srcdir)/../signalent.sh $(includedir)/sys/signal.h >$@
#syscallent.h: ../syscallent.sh $(includedir)/sys/syscall.h
syscallent.h:
$(SHELL) $(srcdir)/../syscallent.sh $(includedir)/sys/syscall.h >$@
clean:
rm -f ioctlent.c *.raw *.tmp *.o ioctlsort
distclean: clean
rm -f Makefile
realclean: distclean
rm -f ioctlent.h errnoent.h signalent.h

212
sunos4/dummy.h Normal file
View File

@ -0,0 +1,212 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
/* Obsolete syscalls */
#define sys_otime printargs
#define sys_osetuid printargs
#define sys_ostime printargs
#define sys_oalarm printargs
#define sys_ofstat printargs
#define sys_opause printargs
#define sys_outime printargs
#define sys_onice printargs
#define sys_oftime printargs
#define sys_osetpgrp printargs
#define sys_otimes printargs
#define sys_osetgid printargs
#define sys_ossig printargs
#define sys_owait3 printargs
#define sys_omsync printargs
#define sys_ovadvise printargs
#define sys_omadvise printargs
#define sys_ovlimit printargs
#define sys_owait printargs
#define sys_ovtimes printargs
#define sys_oldquota printargs
#define sys_getdirentries printargs
/* No interesting parameters or return values */
#define sys_vhangup printargs
#define sys_sys_setsid printargs
#define sys_errsys printargs
#define sys_nosys printargs
/* Don't know what to do with these */
#define sys_sstk printargs
#define sys_profil printargs
#define sys_vtrace printargs
#define sys_async_daemon printargs
#define sys_nfs_getfh printargs
#define sys_rtschedule printargs
#define sys_auditsys printargs
#define sys_rfssys printargs
#define sys_vpixsys printargs
#define sys_getdopt printargs
#define sys_setdopt printargs
#define sys_semsys printargs
#define sys_msgsys printargs
#define sys_shmsys printargs
#define sys_semop printargs
#if DONE
#define sys_rexit printargs
#define sys_indir printargs
#define sys_read printargs
#define sys_write printargs
#define sys_readv printargs
#define sys_writev printargs
#define sys_ioctl printargs
#define sys_fcntl printargs
#define sys_fstat printargs
#define sys_stat printargs
#define sys_lstat printargs
#define sys_open printargs
#define sys_creat printargs
#define sys_close printargs
#define sys_chdir printargs
#define sys_fchdir printargs
#define sys_mkdir printargs
#define sys_rmdir printargs
#define sys_chroot printargs
#define sys_fchroot printargs
#define sys_mknod printargs
#define sys_link printargs
#define sys_unlink printargs
#define sys_chown printargs
#define sys_fchown printargs
#define sys_chmod printargs
#define sys_fchmod printargs
#define sys_utimes printargs
#define sys_symlink printargs
#define sys_readlink printargs
#define sys_rename printargs
#define sys_getdents printargs
#define sys_truncate printargs
#define sys_ftruncate printargs
#define sys_access printargs
#define sys_lseek printargs
#define sys_socket printargs
#define sys_bind printargs
#define sys_connect printargs
#define sys_listen printargs
#define sys_accept printargs
#define sys_shutdown printargs
#define sys_send printargs
#define sys_sendto printargs
#define sys_sendmsg printargs
#define sys_recv printargs
#define sys_recvfrom printargs
#define sys_recvmsg printargs
#define sys_pipe printargs
#define sys_socketpair printargs
#define sys_setsockopt printargs
#define sys_getsockopt printargs
#define sys_getsockname printargs
#define sys_getpeername printargs
#define sys_gethostid printargs
#define sys_gethostname printargs
#define sys_sethostname printargs
#define sys_getpid printargs
#define sys_getdomainname printargs
#define sys_setdomainname printargs
#define sys_vfork printargs
#define sys_fork printargs
#define sys_getuid printargs
#define sys_getgid printargs
#define sys_setreuid printargs
#define sys_setregid printargs
#define sys_getgroups printargs
#define sys_setgroups printargs
#define sys_getpgrp printargs
#define sys_setpgrp printargs
#define sys_setpgid printargs
#define sys_execv printargs
#define sys_execve printargs
#define sys_wait4 printargs
#define sys_uname printargs
#define sys_ptrace printargs
#define sys_brk printargs
#define sys_sbrk printargs
#define sys_mmap printargs
#define sys_munmap printargs
#define sys_mprotect printargs
#define sys_mctl printargs
#define sys_mincore printargs
#define sys_sigvec printargs
#define sys_sigblock printargs
#define sys_sigsetmask printargs
#define sys_sigpause printargs
#define sys_sigstack printargs
#define sys_sigcleanup printargs
#define sys_sigpending printargs
#define sys_kill printargs
#define sys_killpg printargs
#define sys_dup printargs
#define sys_dup2 printargs
#define sys_getdtablesize printargs
#define sys_select printargs
#define sys_flock printargs
#define sys_umask printargs
#define sys_gettimeofday printargs
#define sys_settimeofday printargs
#define sys_getitimer printargs
#define sys_setitimer printargs
#define sys_adjtime printargs
#define sys_setpriority printargs
#define sys_getpriority printargs
#define sys_getrusage printargs
#define sys_getrlimit printargs
#define sys_setrlimit printargs
#define sys_quotactl printargs
#define sys_sysacct printargs
#define sys_reboot printargs
#define sys_sync printargs
#define sys_mount printargs
#define sys_umount printargs
#define sys_unmount printargs
#define sys_swapon printargs
#define sys_fsync printargs
#define sys_exportfs printargs
#define sys_nfs_svc printargs
#define sys_statfs printargs
#define sys_fstatfs printargs
#define sys_ustat printargs
#define sys_aioread printargs
#define sys_aiowrite printargs
#define sys_aiowait printargs
#define sys_aiocancel printargs
#define sys_getpagesize printargs
#define sys_pathconf printargs
#define sys_fpathconf printargs
#define sys_sysconf printargs
#define sys_getmsg printargs
#define sys_putmsg printargs
#define sys_poll printargs
#endif

91
sunos4/errnoent.h Normal file
View File

@ -0,0 +1,91 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EAGAIN", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"EWOULDBLOCK", /* 35 */
"EINPROGRESS", /* 36 */
"EALREADY", /* 37 */
"ENOTSOCK", /* 38 */
"EDESTADDRREQ", /* 39 */
"EMSGSIZE", /* 40 */
"EPROTOTYPE", /* 41 */
"ENOPROTOOPT", /* 42 */
"EPROTONOSUPPORT", /* 43 */
"ESOCKTNOSUPPORT", /* 44 */
"EOPNOTSUPP", /* 45 */
"EPFNOSUPPORT", /* 46 */
"EAFNOSUPPORT", /* 47 */
"EADDRINUSE", /* 48 */
"EADDRNOTAVAIL", /* 49 */
"ENETDOWN", /* 50 */
"ENETUNREACH", /* 51 */
"ENETRESET", /* 52 */
"ECONNABORTED", /* 53 */
"ECONNRESET", /* 54 */
"ENOBUFS", /* 55 */
"EISCONN", /* 56 */
"ENOTCONN", /* 57 */
"ESHUTDOWN", /* 58 */
"ETOOMANYREFS", /* 59 */
"ETIMEDOUT", /* 60 */
"ECONNREFUSED", /* 61 */
"ELOOP", /* 62 */
"ENAMETOOLONG", /* 63 */
"EHOSTDOWN", /* 64 */
"EHOSTUNREACH", /* 65 */
"ENOTEMPTY", /* 66 */
"EPROCLIM", /* 67 */
"EUSERS", /* 68 */
"EDQUOT", /* 69 */
"ESTALE", /* 70 */
"EREMOTE", /* 71 */
"ENOSTR", /* 72 */
"ETIME", /* 73 */
"ENOSR", /* 74 */
"ENOMSG", /* 75 */
"EBADMSG", /* 76 */
"EIDRM", /* 77 */
"EDEADLK", /* 78 */
"ENOLCK", /* 79 */
"ENONET", /* 80 */
"ERREMOTE", /* 81 */
"ENOLINK", /* 82 */
"EADV", /* 83 */
"ESRMNT", /* 84 */
"ECOMM", /* 85 */
"EPROTO", /* 86 */
"EMULTIHOP", /* 87 */
"EDOTDOT", /* 88 */
"EREMCHG", /* 89 */
"ENOSYS", /* 90 */

493
sunos4/ioctlent.h Normal file
View File

@ -0,0 +1,493 @@
{"sun/audioio.h", "AUDIO_DRAIN", 0x20004103},
{"sun/isdnio.h", "ISDN_PH_ACTIVATE_REQ", 0x2000410a},
{"sun/isdnio.h", "ISDN_MPH_DEACTIVATE_REQ", 0x2000410b},
{"sun/fbio.h", "FBIO_WID_DBL_SET", 0x20004625},
{"pixrect/gp1var.h", "GP1IO_SCMAP", 0x20004766},
{"sun/mem.h", "MM_HRCNT", 0x20004d02},
{"sundev/openpromio.h", "OPROMGETOPT", 0x20004f01},
{"sundev/openpromio.h", "OPROMSETOPT", 0x20004f02},
{"sundev/openpromio.h", "OPROMNXTOPT", 0x20004f03},
{"sundev/openpromio.h", "OPROMSETOPT2", 0x20004f04},
{"sundev/openpromio.h", "OPROMNEXT", 0x20004f05},
{"sundev/openpromio.h", "OPROMCHILD", 0x20004f06},
{"sundev/openpromio.h", "OPROMGETPROP", 0x20004f07},
{"sundev/openpromio.h", "OPROMNXTPROP", 0x20004f08},
{"sundev/openpromio.h", "OPROMU2P", 0x20004f09},
{"sundev/openpromio.h", "OPROMGETCONS", 0x20004f0a},
{"stropts.h", "I_POP", 0x20005303},
{"sys/stropts.h", "I_POP", 0x20005303},
{"stropts.h", "I_FLUSH", 0x20005305},
{"sys/stropts.h", "I_FLUSH", 0x20005305},
{"sys/stropts.h", "I_SRDOPT", 0x20005306},
{"stropts.h", "I_SRDOPT", 0x20005306},
{"sys/stropts.h", "I_SETSIG", 0x20005309},
{"stropts.h", "I_SETSIG", 0x20005309},
{"sys/stropts.h", "I_LINK", 0x2000530c},
{"stropts.h", "I_LINK", 0x2000530c},
{"sys/stropts.h", "I_UNLINK", 0x2000530d},
{"stropts.h", "I_UNLINK", 0x2000530d},
{"sys/stropts.h", "I_SENDFD", 0x20005311},
{"stropts.h", "I_SENDFD", 0x20005311},
{"sys/stropts.h", "I_PLINK", 0x20005313},
{"stropts.h", "I_PLINK", 0x20005313},
{"stropts.h", "I_PUNLINK", 0x20005314},
{"sys/stropts.h", "I_PUNLINK", 0x20005314},
{"termio.h", "TCSBRK", 0x20005405},
{"sys/termio.h", "TCSBRK", 0x20005405},
{"termios.h", "TCXONC", 0x20005406},
{"sys/termios.h", "TCXONC", 0x20005406},
{"sys/termios.h", "TCFLSH", 0x20005407},
{"termios.h", "TCFLSH", 0x20005407},
{"sun/tvio.h", "TVIOGRAB", 0x2000581d},
{"sun/tvio.h", "TVIORELEASE", 0x2000581e},
{"sun/tvio.h", "TVIOREDIRECT", 0x20005822},
{"sun/tvio.h", "TVIOSYNC", 0x20005825},
{"sun/tvio.h", "TVIOVWAIT", 0x2000582d},
{"sun/tvio.h", "TVIOSLOOPBACKCAL", 0x2000583d},
{"sbusdev/bpp_io.h", "BPPIOC_TESTIO", 0x20006206},
{"scsi/targets/srdef.h", "CDROMPAUSE", 0x2000630a},
{"sundev/srreg.h", "CDROMPAUSE", 0x2000630a},
{"sundev/srreg.h", "CDROMRESUME", 0x2000630b},
{"sundev/srreg.h", "CDROMSTOP", 0x20006369},
{"scsi/targets/srdef.h", "CDROMSTOP", 0x20006369},
{"scsi/targets/srdef.h", "CDROMSTART", 0x2000636a},
{"sundev/srreg.h", "CDROMSTART", 0x2000636a},
{"scsi/targets/srdef.h", "CDROMEJECT", 0x2000636b},
{"sundev/srreg.h", "CDROMEJECT", 0x2000636b},
{"sun/dkio.h", "FDKEJECT", 0x20006470},
{"sys/filio.h", "FIOCLEX", 0x20006601},
{"sys/filio.h", "FIONCLEX", 0x20006602},
{"sys/filio.h", "FIOLFS", 0x20006640},
{"sys/filio.h", "FIOLFSS", 0x20006641},
{"sys/filio.h", "FIOFFS", 0x20006642},
{"sys/filio.h", "FIOAI", 0x20006643},
{"sys/filio.h", "FIODUTIMES", 0x20006644},
{"sys/filio.h", "FIODIO", 0x20006645},
{"sys/filio.h", "FIODIOS", 0x20006646},
{"sunwindow/win_ioctl.h", "WININSERT", 0x20006703},
{"sunwindow/win_ioctl.h", "WINREMOVE", 0x20006704},
{"sunwindow/win_ioctl.h", "WINCOMPUTECLIPPING", 0x20006712},
{"sunwindow/win_ioctl.h", "WINLOCKDATA", 0x20006715},
{"sunwindow/win_ioctl.h", "WINUNLOCKDATA", 0x20006716},
{"sunwindow/win_ioctl.h", "WINGRABIO", 0x20006717},
{"sunwindow/win_ioctl.h", "WINRELEASEIO", 0x20006718},
{"sunwindow/win_ioctl.h", "WINUNLOCKEVENT", 0x2000671c},
{"sunwindow/win_ioctl.h", "WINUNLOCKSCREEN", 0x2000671e},
{"sunwindow/win_ioctl.h", "WINSCREENDESTROY", 0x2000672a},
{"sunwindow/win_ioctl.h", "WINPRINT", 0x2000672c},
{"sunwindow/win_ioctl.h", "WINREFUSEKBDFOCUS", 0x2000673a},
{"sunwindow/win_ioctl.h", "WINDBLACCESS", 0x20006747},
{"sunwindow/win_ioctl.h", "WINDBLFLIP", 0x20006748},
{"sunwindow/win_ioctl.h", "WINDBLABSORB", 0x20006749},
{"sunwindow/win_ioctl.h", "WINDBLRLSE", 0x2000674a},
{"sunwindow/win_ioctl.h", "WINSHAREQUEUE", 0x20006750},
{"sunwindow/win_ioctl.h", "WINDISCONNECT", 0x20006798},
{"sunwindow/win_ioctl.h", "WINRECONNECT", 0x20006799},
{"sun/ndio.h", "NDIOCSON", 0x20006e00},
{"sun/ndio.h", "NDIOCSOFF", 0x20006e01},
{"sun/ndio.h", "NDIOCCLEAR", 0x20006e05},
{"net/nit_buf.h", "NIOCCTIME", 0x20007008},
{"sys/ttold.h", "TIOCHPCL", 0x20007402},
{"sbusdev/gtreg.h", "FB_SETSERVER", 0x20007407},
{"sys/ttold.h", "TIOCEXCL", 0x2000740d},
{"sys/ttold.h", "TIOCNXCL", 0x2000740e},
{"sbusdev/gtreg.h", "FB_DISCONNECT", 0x20007410},
{"sbusdev/gtreg.h", "FB_UNGRABHW", 0x20007414},
{"sys/ttycom.h", "TIOCCONS", 0x20007424},
{"sys/ttold.h", "_O_TIOCCONS", 0x20007468},
{"sys/ttold.h", "TIOCSTART", 0x2000746e},
{"sys/ttold.h", "TIOCSTOP", 0x2000746f},
{"sys/ttycom.h", "TIOCNOTTY", 0x20007471},
{"sys/ttold.h", "TIOCCDTR", 0x20007478},
{"sys/ttold.h", "TIOCSDTR", 0x20007479},
{"sys/ttold.h", "TIOCCBRK", 0x2000747a},
{"sys/ttold.h", "TIOCSBRK", 0x2000747b},
{"sys/ttycom.h", "TIOCSCTTY", 0x20007484},
{"sun/gpio.h", "GP1IO_GET_TRUMINORDEV", 0x40014708},
{"sundev/kbio.h", "KIOCGLED", 0x40016b0f},
{"sundev/ppreg.h", "PPIOCGETS", 0x40017000},
{"sundev/ppreg.h", "PPIOCGETC", 0x40017001},
{"sun/gpio.h", "GP1IO_GET_REQDEV", 0x40024707},
{"sun/tvio.h", "TVIOGBIND", 0x4002581f},
{"sbusdev/bpp_io.h", "BPPIOC_GETOUTPINS", 0x40026204},
{"sundev/srreg.h", "CDROMREADTOCHDR", 0x40026367},
{"sbusdev/bpp_io.h", "BPPIOC_GETERR", 0x40036205},
{"sun/audioio.h", "AUDIO_GETDEV", 0x40044104},
{"sun/fbio.h", "FBIOGVIDEO", 0x40044608},
{"sun/fbio.h", "GRABPAGEALLOC", 0x4004460a},
{"sun/fbio.h", "FBIOGPLNGRP", 0x4004460d},
{"sun/fbio.h", "FBIOGCMSIZE", 0x4004460e},
{"sun/fbio.h", "FBIOAVAILPLNGRP", 0x40044611},
{"sun/fbio.h", "FBIOSWINFD", 0x40044614},
{"sun/fbio.h", "FBIOSAVWINFD", 0x40044615},
{"sun/fbio.h", "FBIORESWINFD", 0x40044616},
{"sun/fbio.h", "FBIOSRWINFD", 0x40044617},
{"sun/fbio.h", "FBIOGCURMAX", 0x4004461c},
{"sun/fbio.h", "GRABLOCKINFO", 0x4004461d},
{"sun/fbio.h", "FBIO_DEVID", 0x40044622},
{"sun/fbio.h", "FBIO_FULLSCREEN_ELIMINATION_GROUPS", 0x40044624},
{"sun/fbio.h", "FBIOVRTOFFSET", 0x40044626},
{"sun/gpio.h", "GP1IO_GET_STATIC_BLOCK", 0x40044701},
{"sun/gpio.h", "GP1IO_GET_GBUFFER_STATE", 0x40044703},
{"sun/gpio.h", "GP1IO_GET_RESTART_COUNT", 0x40044705},
{"sun/gpio.h", "GP1IO_CHK_FOR_GBUFFER", 0x40044709},
{"stropts.h", "I_NREAD", 0x40045301},
{"sys/stropts.h", "I_NREAD", 0x40045301},
{"sys/stropts.h", "I_GRDOPT", 0x40045307},
{"stropts.h", "I_GRDOPT", 0x40045307},
{"sys/stropts.h", "I_GETSIG", 0x4004530a},
{"stropts.h", "I_GETSIG", 0x4004530a},
{"sun/tvio.h", "TVIOGFORMAT", 0x40045801},
{"sun/tvio.h", "TVIOGCOMPOUT", 0x40045803},
{"sun/tvio.h", "TVIOGSYNC", 0x40045805},
{"pixrect/cg8var.h", "PIPIO_G_PIP_ON_OFF", 0x40045805},
{"sun/tvio.h", "TVIOGOUT", 0x40045807},
{"sun/tvio.h", "TVIOGCOMPRESS", 0x40045809},
{"pixrect/cg8var.h", "PIPIO_G_PIP_ON_OFF_RESUME", 0x40045809},
{"pixrect/cg8var.h", "PIPIO_G_PIP_ON_OFF_SUSPEND", 0x4004580a},
{"sun/tvio.h", "TVIOGCHROMAGAIN", 0x4004580b},
{"sun/tvio.h", "TVIOGREDGAIN", 0x4004580d},
{"sun/tvio.h", "TVIOGREDBLACK", 0x4004580f},
{"sun/tvio.h", "TVIOGGREENGAIN", 0x40045811},
{"sun/tvio.h", "TVIOGGREENBLACK", 0x40045813},
{"sun/tvio.h", "TVIOGBLUEGAIN", 0x40045815},
{"sun/tvio.h", "TVIOGBLUEBLACK", 0x40045817},
{"sun/tvio.h", "TVIOGLUMAGAIN", 0x40045819},
{"sun/tvio.h", "TVIOGBTYPE", 0x40045821},
{"sun/tvio.h", "TVIOGLIVE", 0x40045823},
{"sun/tvio.h", "TVIOGCHROMASEP", 0x40045827},
{"pixrect/cg8var.h", "PIPIO_G_CURSOR_COLOR_FREEZE", 0x40045828},
{"sun/tvio.h", "TVIOGCHROMADEMOD", 0x40045829},
{"pixrect/cg8var.h", "PIPIO_G_TEST", 0x4004582b},
{"sun/tvio.h", "TVIOGGENLOCK", 0x4004582b},
{"sun/tvio.h", "TVIOGSYNCABSENT", 0x4004582e},
{"sun/tvio.h", "TVIOGBURSTABSENT", 0x4004582f},
{"sun/tvio.h", "TVIOGIBSTATE", 0x40045837},
{"sun/tvio.h", "TVIOGABSTATE", 0x40045839},
{"sun/tvio.h", "TVIOGCONTROL", 0x4004583b},
{"sun/dkio.h", "FDKGETCHANGE", 0x4004646f},
{"sys/filio.h", "FIOGETOWN", 0x4004667b},
{"sys/filio.h", "FIONREAD", 0x4004667f},
{"sunwindow/win_ioctl.h", "WINGETUSERFLAGS", 0x4004670e},
{"sunwindow/win_ioctl.h", "WINGETOWNER", 0x40046710},
{"sunwindow/win_ioctl.h", "WINGETBUTTONORDER", 0x40046724},
{"sunwindow/win_ioctl.h", "WINGETNEXTINPUT", 0x40046739},
{"sunwindow/win_ioctl.h", "WINGETPLANEGROUP", 0x40046740},
{"sunwindow/win_ioctl.h", "WINGETNOTIFYALL", 0x40046751},
{"sundev/kbio.h", "KIOCGTRANS", 0x40046b05},
{"sundev/kbio.h", "KIOCGTRANSABLE", 0x40046b07},
{"sundev/kbio.h", "KIOCTYPE", 0x40046b09},
{"sundev/kbio.h", "KIOCGDIRECT", 0x40046b0b},
{"sundev/kbio.h", "KIOCGCOMPAT", 0x40046b11},
{"sundev/kbio.h", "KIOCLAYOUT", 0x40046b14},
{"sys/sockio.h", "SIOCGHIWAT", 0x40047301},
{"sys/sockio.h", "SIOCGLOWAT", 0x40047303},
{"sys/sockio.h", "SIOCATMARK", 0x40047307},
{"sys/sockio.h", "SIOCGPGRP", 0x40047309},
{"sys/ttold.h", "TIOCGETD", 0x40047400},
{"sys/ttold.h", "TIOCMODG", 0x40047403},
{"sbusdev/gtreg.h", "FB_GETWPART", 0x4004740a},
{"sbusdev/gtreg.h", "FB_GETMONITOR", 0x4004740c},
{"sbusdev/gtreg.h", "FB_GRABHW", 0x40047413},
{"sbusdev/gtreg.h", "FB_GETCLUTPART", 0x40047418},
{"sys/ttold.h", "TIOCGETX", 0x40047423},
{"sys/ttycom.h", "TIOCGSOFTCAR", 0x40047464},
{"sys/ttycom.h", "TIOCMGET", 0x4004746a},
{"sys/ttycom.h", "TIOCOUTQ", 0x40047473},
{"sys/ttycom.h", "TIOCGPGRP", 0x40047477},
{"sys/ttold.h", "TIOCLGET", 0x4004747c},
{"sys/ttycom.h", "TIOCISPACE", 0x40047480},
{"sys/ttycom.h", "TIOCISIZE", 0x40047481},
{"sys/ttycom.h", "TIOCGETPGRP", 0x40047483},
{"sys/vcmd.h", "VGETSTATE", 0x40047600},
{"sundev/vuid_event.h", "VUIDGFORMAT", 0x40047602},
{"sun/dkio.h", "DKIOCGTYPE", 0x4006647c},
{"sys/ttold.h", "TIOCGETP", 0x40067408},
{"sys/ttold.h", "TIOCGETC", 0x40067412},
{"sys/ttold.h", "TIOCGLTC", 0x40067474},
{"sun/tvio.h", "TVIOGPOS", 0x4008581b},
{"sun/dkio.h", "DKIOCGPART", 0x40086404},
{"sun/dkio.h", "FDKGETSEARCH", 0x4008646c},
{"sunwindow/win_ioctl.h", "WINNEXTFREE", 0x40086705},
{"sunwindow/win_ioctl.h", "WINGETRECT", 0x4008670a},
{"sunwindow/win_ioctl.h", "WINGETSAVEDRECT", 0x4008670d},
{"sunwindow/win_ioctl.h", "WINGETEVENTTIMEOUT", 0x4008673c},
{"sunwindow/win_ioctl.h", "WINDBLCURRENT", 0x4008674d},
{"sun/sqz.h", "SQZGET", 0x40087102},
{"sbusdev/gtreg.h", "FB_GETLIGHTPENPARAM", 0x4008741b},
{"sbusdev/gtreg.h", "FB_GETGAMMA", 0x40087420},
{"sys/ttycom.h", "TIOCGSIZE", 0x40087426},
{"sys/ttold.h", "_O_TIOCGSIZE", 0x40087466},
{"sys/ttycom.h", "TIOCGWINSZ", 0x40087468},
{"sun/dkio.h", "DKIOCINFO", 0x400c6408},
{"sun/dkio.h", "DKIOCGDIAG", 0x400c6474},
{"sun/dkio.h", "DKIOCGLOG", 0x400c6476},
{"sunwindow/win_ioctl.h", "WINGETFOCUSEVENT", 0x400c6747},
{"sunwindow/win_ioctl.h", "WINGETSWALLOWEVENT", 0x400c6749},
{"pixrect/cg8var.h", "PIPIO_G_EMULATION_MODE", 0x400e5803},
{"sun/fbio.h", "FBIOGXINFO", 0x40104627},
{"sys/stropts.h", "I_RECVFD", 0x40105312},
{"stropts.h", "I_RECVFD", 0x40105312},
{"sunwindow/win_ioctl.h", "WINGETSCREENPOSITIONS", 0x4010672d},
{"scsi/targets/stdef.h", "STIOCGET", 0x40106d02},
{"sundev/streg.h", "STIOCGET", 0x40106d02},
{"sys/termio.h", "TCGETA", 0x40125401},
{"termio.h", "TCGETA", 0x40125401},
{"sunwindow/win_ioctl.h", "WINGETAVAILPLANEGROUPS", 0x40146742},
{"sun/fbio.h", "FBIOGTYPE", 0x40184600},
{"sun/fbio.h", "FBIOGINFO", 0x40184602},
{"sun/fbio.h", "FBIODBLGINFO", 0x40184612},
{"sys/mtio.h", "MTIOCGET", 0x40186d02},
{"sun/dkio.h", "FDKIOGCHAR", 0x401c6472},
{"sun/fbio.h", "FBIOMONINFO", 0x40204628},
{"sbusdev/bpp_io.h", "BPPIOC_GETPARMS", 0x40206202},
{"sbusdev/gtreg.h", "FB_GT_GETVERSION", 0x40207429},
{"sys/termios.h", "TCGETS", 0x40245408},
{"termios.h", "TCGETS", 0x40245408},
{"sun/dkio.h", "DKIOCGGEOM", 0x40266402},
{"sunwindow/win_ioctl.h", "WINGETKBDMASK", 0x40346734},
{"sunwindow/win_ioctl.h", "WINGETPICKMASK", 0x40346735},
{"sun/dkio.h", "FDKGETDRIVECHAR", 0x4038646e},
{"sun/dkio.h", "DKIOCGCONF", 0x403c647e},
{"sun/tvio.h", "TVIOGVIDEOCAL", 0x40405831},
{"sun/tvio.h", "TVIONVREAD", 0x40405833},
{"sun/dkio.h", "DKIOCGAPART", 0x4040647a},
{"sunwindow/win_ioctl.h", "WINGETSCALING", 0x40406726},
{"sun/fbio.h", "FBIOGATTR", 0x40584606},
{"sunwindow/win_ioctl.h", "WINSCREENGET", 0x40646729},
{"sunwindow/win_ioctl.h", "WINGETINPUTMASK", 0x406c6713},
{"sun/audioio.h", "AUDIO_GETINFO", 0x40844101},
{"pixrect/cg8var.h", "PIPIO_G_FB_INFO", 0x40d05801},
{"sundev/kbio.h", "KIOCSLED", 0x80016b0e},
{"sundev/ppreg.h", "PPIOCSETC", 0x80017002},
{"sys/ttycom.h", "TIOCSTI", 0x80017472},
{"sun/tvio.h", "TVIOSBIND", 0x80025820},
{"sbusdev/bpp_io.h", "BPPIOC_SETOUTPINS", 0x80026203},
{"sun/isdnio.h", "ISDN_MESSAGE_SET", 0x8004410c},
{"sun/fbio.h", "FBIOSVIDEO", 0x80044607},
{"sun/fbio.h", "FBIOVERTICAL", 0x80044609},
{"sun/fbio.h", "GRABPAGEFREE", 0x8004460b},
{"sun/fbio.h", "GRABATTACH", 0x8004460c},
{"sun/fbio.h", "FBIOSCMSIZE", 0x8004460f},
{"sun/fbio.h", "FBIOSCMS", 0x80044610},
{"sun/fbio.h", "FBIOSCURPOS", 0x8004461a},
{"sun/fbio.h", "FBIOGCURPOS", 0x8004461b},
{"sun/fbio.h", "FBIO_U_RST", 0x80044623},
{"sun/gpio.h", "GP1IO_FREE_STATIC_BLOCK", 0x80044702},
{"sun/gpio.h", "GP1IO_CHK_GP", 0x80044704},
{"sun/gpio.h", "GP1IO_REDIRECT_DEVFB", 0x80044706},
{"sun/gpio.h", "GP1IO_SET_USING_GBUFFER", 0x8004470a},
{"sun/mem.h", "MM_CCRW", 0x80044d03},
{"sun/mem.h", "MM_PCNT0", 0x80044d04},
{"sun/mem.h", "MM_PCNT1", 0x80044d05},
{"sun/vddrv.h", "VDFREEVADDR", 0x80045604},
{"sun/tvio.h", "TVIOSFORMAT", 0x80045802},
{"sun/tvio.h", "TVIOSCOMPOUT", 0x80045804},
{"sun/tvio.h", "TVIOSSYNC", 0x80045806},
{"pixrect/cg8var.h", "PIPIO_S_PIP_ON_OFF", 0x80045807},
{"sun/tvio.h", "TVIOSOUT", 0x80045808},
{"sun/tvio.h", "TVIOSCOMPRESS", 0x8004580a},
{"sun/tvio.h", "TVIOSCHROMAGAIN", 0x8004580c},
{"sun/tvio.h", "TVIOSREDGAIN", 0x8004580e},
{"sun/tvio.h", "TVIOSREDBLACK", 0x80045810},
{"sun/tvio.h", "TVIOSGREENGAIN", 0x80045812},
{"sun/tvio.h", "TVIOSGREENBLACK", 0x80045814},
{"sun/tvio.h", "TVIOSBLUEGAIN", 0x80045816},
{"sun/tvio.h", "TVIOSBLUEBLACK", 0x80045818},
{"sun/tvio.h", "TVIOSLUMAGAIN", 0x8004581a},
{"sun/tvio.h", "TVIOSLIVE", 0x80045824},
{"sun/tvio.h", "TVIOSCHROMASEP", 0x80045828},
{"pixrect/cg8var.h", "PIPIO_S_CURSOR_COLOR_FREEZE", 0x80045829},
{"pixrect/cg8var.h", "PIPIO_S_MAP_SLOT", 0x8004582a},
{"sun/tvio.h", "TVIOSCHROMADEMOD", 0x8004582a},
{"pixrect/cg8var.h", "PIPIO_S_TEST", 0x8004582c},
{"sun/tvio.h", "TVIOSGENLOCK", 0x8004582c},
{"sun/tvio.h", "TVIOSIBADVANCE", 0x80045835},
{"sun/tvio.h", "TVIOSABSTATE", 0x80045838},
{"sun/tvio.h", "TVIOSCONTROL", 0x8004583c},
{"sundev/srreg.h", "CDROMPLAYTRKIND", 0x8004630d},
{"scsi/targets/srdef.h", "CDROMPLAYTRKIND", 0x8004630d},
{"sundev/srreg.h", "CDROMVOLCTRL", 0x8004630e},
{"sun/dkio.h", "DKIOCGBAD", 0x80046478},
{"sun/dkio.h", "DKIOCSBAD", 0x80046479},
{"sys/filio.h", "FIOSETOWN", 0x8004667c},
{"sys/filio.h", "FIOASYNC", 0x8004667d},
{"sys/filio.h", "FIONBIO", 0x8004667e},
{"sunwindow/win_ioctl.h", "WINSETMOUSE", 0x80046706},
{"sunwindow/win_ioctl.h", "WINSETUSERFLAGS", 0x8004670f},
{"sunwindow/win_ioctl.h", "WINSETOWNER", 0x80046711},
{"sunwindow/win_ioctl.h", "WINDONEDAMAGED", 0x80046721},
{"sunwindow/win_ioctl.h", "WINSETBUTTONORDER", 0x80046725},
{"sunwindow/win_ioctl.h", "WINSETNEXTINPUT", 0x80046738},
{"sunwindow/win_ioctl.h", "WINSETKBDFOCUS", 0x8004673d},
{"sunwindow/win_ioctl.h", "WINSETPLANEGROUP", 0x8004673f},
{"sunwindow/win_ioctl.h", "WINSETNOTIFYALL", 0x80046752},
{"sunwindow/win_ioctl.h", "WINSETRECQUE", 0x800467c8},
{"sunwindow/win_ioctl.h", "WINSETRECORD", 0x800467c9},
{"sunwindow/win_ioctl.h", "WINSETPLAYBACK", 0x800467cb},
{"sys/sockio.h", "SIOCSPROMISC", 0x80046930},
{"sundev/kbio.h", "KIOCTRANS", 0x80046b00},
{"sundev/kbio.h", "KIOCTRANSABLE", 0x80046b06},
{"sundev/kbio.h", "KIOCCMD", 0x80046b08},
{"sundev/kbio.h", "KIOCSDIRECT", 0x80046b0a},
{"sundev/kbio.h", "KIOCSCOMPAT", 0x80046b10},
{"sun/ndio.h", "NDIOCSAT", 0x80046e04},
{"sun/ndio.h", "NDIOCVER", 0x80046e07},
{"net/nit_if.h", "NIOCSFLAGS", 0x80047004},
{"net/nit_if.h", "NIOCSSNAP", 0x80047006},
{"net/nit_buf.h", "NIOCSCHUNK", 0x80047009},
{"sun/sqz.h", "SQZSET", 0x80047101},
{"sys/sockio.h", "SIOCSHIWAT", 0x80047300},
{"sys/sockio.h", "SIOCSLOWAT", 0x80047302},
{"sys/sockio.h", "SIOCSPGRP", 0x80047308},
{"sys/ttold.h", "TIOCSETD", 0x80047401},
{"sys/ttold.h", "TIOCMODS", 0x80047404},
{"sbusdev/gtreg.h", "FB_FCSFREE", 0x80047406},
{"sbusdev/gtreg.h", "FB_SETDIAGMODE", 0x80047408},
{"sbusdev/gtreg.h", "FB_SETWPART", 0x80047409},
{"sbusdev/gtreg.h", "FB_SETMONITOR", 0x8004740b},
{"sys/ttold.h", "TIOCFLUSH", 0x80047410},
{"sbusdev/gtreg.h", "FB_LOADKMCB", 0x80047411},
{"sbusdev/gtreg.h", "FB_SETCLUTPART", 0x80047417},
{"sbusdev/gtreg.h", "FB_LIGHTPENENABLE", 0x80047419},
{"sys/ttycom.h", "TIOCTCNTL", 0x80047420},
{"sys/ttycom.h", "TIOCSIGNAL", 0x80047421},
{"sys/ttold.h", "TIOCSETX", 0x80047422},
{"sys/ttycom.h", "TIOCSSOFTCAR", 0x80047465},
{"sys/ttycom.h", "TIOCUCNTL", 0x80047466},
{"sys/ttycom.h", "TIOCREMOTE", 0x80047469},
{"sys/ttycom.h", "TIOCMBIC", 0x8004746b},
{"sys/ttycom.h", "TIOCMBIS", 0x8004746c},
{"sys/ttycom.h", "TIOCMSET", 0x8004746d},
{"sys/ttycom.h", "TIOCPKT", 0x80047470},
{"sys/ttycom.h", "TIOCSPGRP", 0x80047476},
{"sys/ttold.h", "TIOCLSET", 0x8004747d},
{"sys/ttold.h", "TIOCLBIC", 0x8004747e},
{"sys/ttold.h", "TIOCLBIS", 0x8004747f},
{"sys/ttycom.h", "TIOCSETPGRP", 0x80047482},
{"sundev/vuid_event.h", "VUIDSFORMAT", 0x80047601},
{"sys/vcmd.h", "VSETSTATE", 0x80047601},
{"sundev/vuid_event.h", "VUIDSADDR", 0x80047603},
{"scsi/targets/srdef.h", "CDROMPLAYMSF", 0x8006630c},
{"sundev/srreg.h", "CDROMPLAYMSF", 0x8006630c},
{"sun/dkio.h", "DKIOCSTYPE", 0x8006647d},
{"sys/ttold.h", "TIOCSETP", 0x80067409},
{"sys/ttold.h", "TIOCSETN", 0x8006740a},
{"sys/ttold.h", "TIOCSETC", 0x80067411},
{"sys/ttold.h", "TIOCSLTC", 0x80067475},
{"sun/isdnio.h", "ISDN_SET_LOOPBACK", 0x8008410e},
{"sun/isdnio.h", "ISDN_RESET_LOOPBACK", 0x8008410f},
{"sundev/lightpenreg.h", "LIGHTPEN_CALIBRATE", 0x80084c01},
{"sun/tvio.h", "TVIOSPOS", 0x8008581c},
{"sun/dkio.h", "DKIOCSPART", 0x80086405},
{"sun/dkio.h", "FDKSETSEARCH", 0x8008646b},
{"sunwindow/win_ioctl.h", "WINSETLINK", 0x80086701},
{"sunwindow/win_ioctl.h", "WINSETRECT", 0x8008670b},
{"sunwindow/win_ioctl.h", "WINSETSAVEDRECT", 0x8008670c},
{"sunwindow/win_ioctl.h", "WINPARTIALREPAIR", 0x8008672b},
{"sunwindow/win_ioctl.h", "WINSETEVENTTIMEOUT", 0x8008673b},
{"sunwindow/win_ioctl.h", "WINDBLSET", 0x8008674b},
{"sunwindow/win_ioctl.h", "WINSETPLAYINTR", 0x800867cc},
{"sys/mtio.h", "MTIOCTOP", 0x80086d01},
{"net/nit_buf.h", "NIOCSTIME", 0x80087006},
{"sbusdev/gtreg.h", "FB_VMBACK", 0x80087415},
{"sbusdev/gtreg.h", "FB_VMUNBACK", 0x80087416},
{"sbusdev/gtreg.h", "FB_SETLIGHTPENPARAM", 0x8008741a},
{"sbusdev/gtreg.h", "FB_SETGAMMA", 0x8008741f},
{"sys/ttycom.h", "TIOCSSIZE", 0x80087425},
{"sys/ttold.h", "_O_TIOCSSIZE", 0x80087467},
{"sys/ttycom.h", "TIOCSWINSZ", 0x80087467},
{"sun/isdnio.h", "ISDN_SET_PARAM", 0x800c4110},
{"sun/fbio.h", "FBIO_WID_FREE", 0x800c461f},
{"sun/fbio.h", "FBIO_WID_PUT", 0x800c4620},
{"sun/fbio.h", "FBIO_WID_GET", 0x800c4621},
{"sundev/lightpenreg.h", "LIGHTPEN_FILTER", 0x800c4c02},
{"sundev/fdreg.h", "V_FORMAT", 0x800c5605},
{"sundev/srreg.h", "CDROMREADMODE2", 0x800c636e},
{"sundev/srreg.h", "CDROMREADMODE1", 0x800c636f},
{"sunwindow/win_ioctl.h", "WINSETCURSOR", 0x800c6707},
{"sunwindow/win_ioctl.h", "WINSETFOCUSEVENT", 0x800c6746},
{"sunwindow/win_ioctl.h", "WINSETSWALLOWEVENT", 0x800c6748},
{"sundev/msio.h", "MSIOSETPARMS", 0x800c6d03},
{"sbusdev/gtreg.h", "FB_CLUTFREE", 0x800c7402},
{"sbusdev/gtreg.h", "FB_VMCTL", 0x800c741e},
{"pixrect/cg8var.h", "PIPIO_S_EMULATION_MODE", 0x800e5804},
{"sunwindow/win_ioctl.h", "WINSCREENPOSITIONS", 0x8010672b},
{"sundev/kbio.h", "KIOCSETKEY", 0x80106b01},
{"sun/ndio.h", "NDIOCETHER", 0x80106e08},
{"sys/termio.h", "TCSETA", 0x80125402},
{"termio.h", "TCSETA", 0x80125402},
{"sys/termio.h", "TCSETAW", 0x80125403},
{"termio.h", "TCSETAW", 0x80125403},
{"sys/termio.h", "TCSETAF", 0x80125404},
{"termio.h", "TCSETAF", 0x80125404},
{"sun/fbio.h", "FBIOPUTCMAP", 0x80144603},
{"sun/fbio.h", "FBIOGETCMAP", 0x80144604},
{"sunwindow/win_ioctl.h", "WINSETAVAILPLANEGROUPS", 0x80146741},
{"sunwindow/win_ioctl.h", "WINSETSYNCPT", 0x801467cd},
{"sundev/kbio.h", "KIOCSKEY", 0x80146b0c},
{"sun/fbio.h", "FBIODBLSINFO", 0x80184613},
{"sun/gpio.h", "GP1IO_PUT_INFO", 0x80184700},
{"sun/dkio.h", "DKIOCSCMD", 0x80186477},
{"sunwindow/win_ioctl.h", "WINSETINPUTDEV", 0x80186732},
{"sun/ndio.h", "NDIOCUSER", 0x80186e03},
{"sun/fbio.h", "FBIOPUTCMAPI", 0x801c4629},
{"sun/fbio.h", "FBIOGETCMAPI", 0x801c462a},
{"sun/dkio.h", "FDKIOSCHAR", 0x801c6471},
{"sbusdev/gtreg.h", "FB_CLUTPOST", 0x801c7404},
{"sbusdev/bpp_io.h", "BPPIOC_SETPARMS", 0x80206201},
{"sys/sockio.h", "SIOCSIFADDR", 0x8020690c},
{"sys/sockio.h", "SIOCSIFDSTADDR", 0x8020690e},
{"sys/sockio.h", "SIOCSIFFLAGS", 0x80206910},
{"sys/sockio.h", "SIOCSIFMEM", 0x80206912},
{"sys/sockio.h", "SIOCSIFMTU", 0x80206915},
{"sys/sockio.h", "SIOCSIFBRDADDR", 0x80206918},
{"sys/sockio.h", "SIOCSIFNETMASK", 0x8020691a},
{"sys/sockio.h", "SIOCSIFMETRIC", 0x8020691c},
{"sys/sockio.h", "SIOCUPPER", 0x80206928},
{"sys/sockio.h", "SIOCLOWER", 0x80206929},
{"sys/sockio.h", "SIOCSETSYNC", 0x8020692c},
{"sys/sockio.h", "SIOCADDMULTI", 0x80206931},
{"sys/sockio.h", "SIOCDELMULTI", 0x80206932},
{"sys/sockio.h", "SIOCFDRESET", 0x80206933},
{"sys/sockio.h", "SIOCFDSLEEP", 0x80206934},
{"sys/sockio.h", "SIOCLDNSTRTFW", 0x80206936},
{"sys/sockio.h", "SIOCGETFDSTAT", 0x80206937},
{"sys/sockio.h", "SIOCFDNMIINT", 0x80206938},
{"sys/sockio.h", "SIOCFDEXUSER", 0x80206939},
{"sys/sockio.h", "SIOCFDGNETMAP", 0x8020693a},
{"sys/sockio.h", "SIOCFDGIOCTL", 0x8020693b},
{"net/nit_if.h", "NIOCBIND", 0x80207003},
{"sbusdev/gtreg.h", "FB_GT_SETVERSION", 0x80207428},
{"sys/stropts.h", "I_FDINSERT", 0x80245310},
{"stropts.h", "I_FDINSERT", 0x80245310},
{"termios.h", "TCSETS", 0x80245409},
{"sys/termios.h", "TCSETS", 0x80245409},
{"termios.h", "TCSETSW", 0x8024540a},
{"sys/termios.h", "TCSETSW", 0x8024540a},
{"termios.h", "TCSETSF", 0x8024540b},
{"sys/termios.h", "TCSETSF", 0x8024540b},
{"sys/sockio.h", "SIOCSARP", 0x8024691e},
{"sys/sockio.h", "SIOCDARP", 0x80246920},
{"sys/sockio.h", "SIOCSNIT", 0x80247000},
{"sun/dkio.h", "DKIOCSGEOM", 0x80266403},
{"sun/fbio.h", "FBIOSATTR", 0x80284605},
{"sun/fbio.h", "FBIOSCURSOR", 0x802c4618},
{"sunwindow/win_ioctl.h", "WINSETLOCATOR", 0x80306730},
{"sunwindow/win_ioctl.h", "WINSETCPCURSOR", 0x80306796},
{"sbusdev/audio_79C30.h", "AUDIOSETREG", 0x80306902},
{"sys/sockio.h", "SIOCADDRT", 0x8030720a},
{"sys/sockio.h", "SIOCDELRT", 0x8030720b},
{"sunwindow/win_ioctl.h", "WINSETKBDMASK", 0x80346736},
{"sunwindow/win_ioctl.h", "WINSETPICKMASK", 0x80346737},
{"sun/dkio.h", "FDKSETDRIVECHAR", 0x8038646d},
{"sun/tvio.h", "TVIOSVIDEOCAL", 0x80405832},
{"sun/tvio.h", "TVIONVWRITE", 0x80405834},
{"sun/dkio.h", "DKIOCSAPART", 0x8040647b},
{"sunwindow/win_ioctl.h", "WINSETSCALING", 0x80406727},
{"net/nit_pf.h", "NIOCSETF", 0x80527002},
{"pixrect/gp1var.h", "GP1IO_SATTR", 0x80584765},
{"sunwindow/win_ioctl.h", "WINSETINPUTMASK", 0x806c6714},
{"sunwindow/win_ioctl.h", "WINSCREENNEW", 0x80706728},
{"sunwindow/win_ioctl.h", "WINSETKBD", 0x8070672e},
{"sunwindow/win_ioctl.h", "WINSETMS", 0x8070672f},

124
sunos4/ioctlent.sh Normal file
View File

@ -0,0 +1,124 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
# 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$
if [ $# -ne 1 ]
then
echo "usage: $0 include-directory" >&2
exit 1
fi
bad_defines='WINGETVALIDVALUES'
(
cd $1
find . -name '*.h' -print | sed 's/^\.\///' |
xargs egrep '^[ ]*#[ ]*define[ ][ ]*[A-Z_][A-Za-z0-9_]*[ ][ ]*_IO[RW]?\(' /dev/null |
sed 's/\(.*\):#[ ]*define[ ]*\([A-Z_][A-Za-z0-9_]*\)[ ]*\(_IO[^)]*)\)[ ]*\(.*\)/ { "\1", "\2", \2 }, \4/' |
sort -u
) >ioctlent.tmp
echo "\
#include <sys/types.h>
#define KERNEL
#include <stdio.h>
#include <strings.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/des.h>
#include <sys/mtio.h>
#include <sys/stropts.h>
#include <sys/stream.h>
#include <sys/vcmd.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <net/route.h>
#include <net/nit.h>
#include <net/nit_if.h>
#include <net/nit_pf.h>
#include <net/nit_buf.h>
#include <net/packetfilt.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <netinet/if_ether.h>
#include <scsi/impl/uscsi.h>
#define sprintf scsi_sprintf
#include <scsi/scsi.h>
#undef sprintf
#include <scsi/targets/srdef.h>
#include <scsi/targets/stdef.h>
#if 0
#include <scsi/targets/sddef.h>
#endif
#include <sun/audioio.h>
#include <sun/fbio.h>
#include <sun/gpio.h>
#include <sun/ndio.h>
#include <sun/tvio.h>
#include <sun/mem.h>
#include <sun/sqz.h>
#include <sun/vddrv.h>
#include <sun/isdnio.h>
#include <machine/reg.h>
#include <sundev/kbio.h>
#include <sundev/msio.h>
#include <sundev/fdreg.h>
#include <sundev/ppreg.h>
#include <sundev/openpromio.h>
#include <sundev/lightpenreg.h>
#include <sunwindow/window_hs.h>
#include <sunwindow/win_enum.h>
#include <sunwindow/win_ioctl.h>
#include <sbusdev/audiovar.h>
#define AMD_CHIP
#include <sbusdev/audio_79C30.h>
#include <sbusdev/bpp_io.h>
#include <sbusdev/gtreg.h>
#include <sys/termio.h>
"
echo "struct ioctlent ioctlent[] = {"
egrep -v "$bad_defines" ioctlent.tmp | awk '
{
print "#ifdef " $4
print
print "#endif"
}
'
echo "};"
rm -f ioctlent.tmp

32
sunos4/signalent.h Normal file
View File

@ -0,0 +1,32 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGEMT", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGBUS", /* 10 */
"SIGSEGV", /* 11 */
"SIGSYS", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGURG", /* 16 */
"SIGSTOP", /* 17 */
"SIGTSTP", /* 18 */
"SIGCONT", /* 19 */
"SIGCHLD", /* 20 */
"SIGTTIN", /* 21 */
"SIGTTOU", /* 22 */
"SIGIO", /* 23 */
"SIGXCPU", /* 24 */
"SIGXFSZ", /* 25 */
"SIGVTALRM", /* 26 */
"SIGPROF", /* 27 */
"SIGWINCH", /* 28 */
"SIGLOST", /* 29 */
"SIGUSR1", /* 30 */
"SIGUSR2", /* 31 */

175
sunos4/syscall.h Normal file
View File

@ -0,0 +1,175 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "dummy.h"
int sys_nosys();
int sys_nullsys();
int sys_errsys();
/* 1.1 processes and protection */
int sys_gethostid(),sys_sethostname(),sys_gethostname(),sys_getpid();
int sys_setdomainname(),sys_getdomainname();
int sys_fork(),sys_exit(),sys_execv(),sys_execve(),sys_wait4();
int sys_getuid(),sys_setreuid(),sys_getgid(),sys_getgroups(),sys_setregid(),sys_setgroups();
int sys_getpgrp(),sys_setpgrp();
int sys_sys_setsid(), sys_setpgid();
int sys_uname();
/* 1.2 memory management */
int sys_brk(),sys_sbrk(),sys_sstk();
int sys_getpagesize(),sys_mmap(),sys_mctl(),sys_munmap(),sys_mprotect(),sys_mincore();
int sys_omsync(),sys_omadvise();
/* 1.3 signals */
int sys_sigvec(),sys_sigblock(),sys_sigsetmask(),sys_sigpause(),sys_sigstack(),sys_sigcleanup();
int sys_kill(), sys_killpg(), sys_sigpending();
/* 1.4 timing and statistics */
int sys_gettimeofday(),sys_settimeofday();
int sys_adjtime();
int sys_getitimer(),sys_setitimer();
/* 1.5 descriptors */
int sys_getdtablesize(),sys_dup(),sys_dup2(),sys_close();
int sys_select(),sys_getdopt(),sys_setdopt(),sys_fcntl(),sys_flock();
/* 1.6 resource controls */
int sys_getpriority(),sys_setpriority(),sys_getrusage(),sys_getrlimit(),sys_setrlimit();
int sys_oldquota(), sys_quotactl();
int sys_rtschedule();
/* 1.7 system operation support */
int sys_mount(),sys_unmount(),sys_swapon();
int sys_sync(),sys_reboot();
int sys_sysacct();
int sys_auditsys();
/* 2.1 generic operations */
int sys_read(),sys_write(),sys_readv(),sys_writev(),sys_ioctl();
/* 2.1.1 asynch operations */
int sys_aioread(), sys_aiowrite(), sys_aiowait(), sys_aiocancel();
/* 2.2 file system */
int sys_chdir(),sys_chroot();
int sys_fchdir(),sys_fchroot();
int sys_mkdir(),sys_rmdir(),sys_getdirentries(), sys_getdents();
int sys_creat(),sys_open(),sys_mknod(),sys_unlink(),sys_stat(),sys_fstat(),sys_lstat();
int sys_chown(),sys_fchown(),sys_chmod(),sys_fchmod(),sys_utimes();
int sys_link(),sys_symlink(),sys_readlink(),sys_rename();
int sys_lseek(),sys_truncate(),sys_ftruncate(),sys_access(),sys_fsync();
int sys_statfs(),sys_fstatfs();
/* 2.3 communications */
int sys_socket(),sys_bind(),sys_listen(),sys_accept(),sys_connect();
int sys_socketpair(),sys_sendto(),sys_send(),sys_recvfrom(),sys_recv();
int sys_sendmsg(),sys_recvmsg(),sys_shutdown(),sys_setsockopt(),sys_getsockopt();
int sys_getsockname(),sys_getpeername(),sys_pipe();
int sys_umask(); /* XXX */
/* 2.3.1 SystemV-compatible IPC */
int sys_semsys(), sys_semctl(), sys_semget();
#define SYS_semsys_subcall 200
#define SYS_semsys_nsubcalls 3
#define SYS_semctl (SYS_semsys_subcall + 0)
#define SYS_semget (SYS_semsys_subcall + 1)
#define SYS_semop (SYS_semsys_subcall + 2)
int sys_msgsys(), sys_msgget(), sys_msgctl(), sys_msgrcv(), sys_msgsnd();
#define SYS_msgsys_subcall 203
#define SYS_msgsys_nsubcalls 4
#define SYS_msgget (SYS_msgsys_subcall + 0)
#define SYS_msgctl (SYS_msgsys_subcall + 1)
#define SYS_msgrcv (SYS_msgsys_subcall + 2)
#define SYS_msgsnd (SYS_msgsys_subcall + 3)
int sys_shmsys(), sys_shmat(), sys_shmctl(), sys_shmdt(), sys_shmget();
#define SYS_shmsys_subcall 207
#define SYS_shmsys_nsubcalls 4
#define SYS_shmat (SYS_shmsys_subcall + 0)
#define SYS_shmctl (SYS_shmsys_subcall + 1)
#define SYS_shmdt (SYS_shmsys_subcall + 2)
#define SYS_shmget (SYS_shmsys_subcall + 3)
/* 2.4 processes */
int sys_ptrace();
/* 2.5 terminals */
/* emulations for backwards compatibility */
int sys_otime(); /* now use gettimeofday */
int sys_ostime(); /* now use settimeofday */
int sys_oalarm(); /* now use setitimer */
int sys_outime(); /* now use utimes */
int sys_opause(); /* now use sigpause */
int sys_onice(); /* now use setpriority,getpriority */
int sys_oftime(); /* now use gettimeofday */
int sys_osetpgrp(); /* ??? */
int sys_otimes(); /* now use getrusage */
int sys_ossig(); /* now use sigvec, etc */
int sys_ovlimit(); /* now use setrlimit,getrlimit */
int sys_ovtimes(); /* now use getrusage */
int sys_osetuid(); /* now use setreuid */
int sys_osetgid(); /* now use setregid */
int sys_ostat(); /* now use stat */
int sys_ofstat(); /* now use fstat */
/* BEGIN JUNK */
int sys_profil(); /* 'cuz sys calls are interruptible */
int sys_vhangup(); /* should just do in sys_exit() */
int sys_vfork(); /* XXX - was awaiting fork w/ copy on write */
int sys_ovadvise(); /* awaiting new madvise */
int sys_indir(); /* indirect system call */
int sys_ustat(); /* System V compatibility */
int sys_owait(); /* should use wait4 interface */
int sys_owait3(); /* should use wait4 interface */
int sys_umount(); /* still more Sys V (and 4.2?) compatibility */
int sys_pathconf(); /* posix */
int sys_fpathconf(); /* posix */
int sys_sysconf(); /* posix */
int sys_debug();
/* END JUNK */
int sys_vtrace(); /* kernel event tracing */
/* nfs */
int sys_async_daemon(); /* client async daemon */
int sys_nfs_svc(); /* run nfs server */
int sys_nfs_getfh(); /* get file handle */
int sys_exportfs(); /* export file systems */
int sys_rfssys(); /* RFS-related calls */
int sys_getmsg();
int sys_putmsg();
int sys_poll();
int sys_vpixsys(); /* VP/ix system calls */

241
sunos4/syscallent.h Normal file
View File

@ -0,0 +1,241 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
{ 1, 0, sys_indir, "indir" }, /* 0 */
{ 1, TP, sys_exit, "_exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, 0, sys_read, "read" }, /* 3 */
{ 3, 0, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 4, TP, sys_wait4, "wait4" }, /* 7 */
{ 2, TF, sys_creat, "creat" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 2, TF|TP, sys_execv, "execv" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 0, 0, sys_otime, "otime" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "chown" }, /* 16 */
{ 1, 0, sys_brk, "brk" }, /* 17 */
{ 2, TF, sys_stat, "stat" }, /* 18 */
{ 3, 0, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 0, 0, sys_nosys, "nosys" }, /* 21 */
{ 1, TF, sys_umount, "umount" }, /* 22 */
{ 1, 0, sys_osetuid, "osetuid" }, /* 23 */
{ 0, 0, sys_getuid, "getuid" }, /* 24 */
{ 1, 0, sys_ostime, "ostime" }, /* 25 */
{ 5, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_oalarm, "oalarm" }, /* 27 */
{ 2, 0, sys_ofstat, "ofstat" }, /* 28 */
{ 0, 0, sys_opause, "opause" }, /* 29 */
{ 2, TF, sys_outime, "outime" }, /* 30 */
{ 0, 0, sys_nosys, "nosys" }, /* 31 */
{ 0, 0, sys_nosys, "nosys" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
{ 1, 0, sys_onice, "onice" }, /* 34 */
{ 1, 0, sys_oftime, "oftime" }, /* 35 */
{ 0, 0, sys_sync, "sync" }, /* 36 */
{ 2, TS, sys_kill, "kill" }, /* 37 */
{ 2, TF, sys_stat, "stat" }, /* 38 */
{ 2, 0, sys_osetpgrp, "osetpgrp" }, /* 39 */
{ 2, TF, sys_lstat, "lstat" }, /* 40 */
{ 2, 0, sys_dup, "dup" }, /* 41 */
{ 0, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_otimes, "otimes" }, /* 43 */
{ 4, 0, sys_profil, "profil" }, /* 44 */
{ 0, 0, sys_nosys, "nosys" }, /* 45 */
{ 1, 0, sys_osetgid, "osetgid" }, /* 46 */
{ 0, 0, sys_getgid, "getgid" }, /* 47 */
{ 2, 0, sys_ossig, "ossig" }, /* 48 */
{ 0, 0, sys_nosys, "nosys" }, /* 49 */
{ 0, 0, sys_nosys, "nosys" }, /* 50 */
{ 1, 0, sys_sysacct, "sysacct" }, /* 51 */
{ 0, 0, sys_nosys, "nosys" }, /* 52 */
{ 4, 0, sys_mctl, "mctl" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 2, 0, sys_reboot, "reboot" }, /* 55 */
{ 3, TP, sys_owait3, "owait3" }, /* 56 */
{ 2, TF, sys_symlink, "symlink" }, /* 57 */
{ 3, TF, sys_readlink, "readlink" }, /* 58 */
{ 3, TF|TP, sys_execve, "execve" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_fstat, "fstat" }, /* 62 */
{ 0, 0, sys_nosys, "nosys" }, /* 63 */
{ 1, 0, sys_getpagesize, "getpagesize" }, /* 64 */
{ 3, 0, sys_omsync, "omsync" }, /* 65 */
{ 0, TP, sys_vfork, "vfork" }, /* 66 */
{ 0, 0, sys_read, "read" }, /* 67 */
{ 0, 0, sys_write, "write" }, /* 68 */
{ 1, 0, sys_sbrk, "sbrk" }, /* 69 */
{ 1, 0, sys_sstk, "sstk" }, /* 70 */
{ 6, 0, sys_mmap, "mmap" }, /* 71 */
{ 1, 0, sys_ovadvise, "ovadvise" }, /* 72 */
{ 2, 0, sys_munmap, "munmap" }, /* 73 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 74 */
{ 3, 0, sys_omadvise, "omadvise" }, /* 75 */
{ 1, 0, sys_vhangup, "vhangup" }, /* 76 */
{ 2, 0, sys_ovlimit, "ovlimit" }, /* 77 */
{ 3, 0, sys_mincore, "mincore" }, /* 78 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 79 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 80 */
{ 1, 0, sys_getpgrp, "getpgrp" }, /* 81 */
{ 2, 0, sys_setpgrp, "setpgrp" }, /* 82 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 83 */
{ 0, TP, sys_owait, "owait" }, /* 84 */
{ 1, TF, sys_swapon, "swapon" }, /* 85 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 86 */
{ 2, 0, sys_gethostname, "gethostname" }, /* 87 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 88 */
{ 0, 0, sys_getdtablesize, "getdtablesize" }, /* 89 */
{ 2, 0, sys_dup2, "dup2" }, /* 90 */
{ 2, 0, sys_getdopt, "getdopt" }, /* 91 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 92 */
{ 5, 0, sys_select, "select" }, /* 93 */
{ 2, 0, sys_setdopt, "setdopt" }, /* 94 */
{ 1, 0, sys_fsync, "fsync" }, /* 95 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 96 */
{ 3, TN, sys_socket, "socket" }, /* 97 */
{ 3, TN, sys_connect, "connect" }, /* 98 */
{ 3, TN, sys_accept, "accept" }, /* 99 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 100 */
{ 4, TN, sys_send, "send" }, /* 101 */
{ 4, TN, sys_recv, "recv" }, /* 102 */
{ 0, 0, sys_nosys, "nosys" }, /* 103 */
{ 3, TN, sys_bind, "bind" }, /* 104 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */
{ 2, TN, sys_listen, "listen" }, /* 106 */
{ 2, 0, sys_ovtimes, "ovtimes" }, /* 107 */
{ 3, TS, sys_sigvec, "sigvec" }, /* 108 */
{ 1, TS, sys_sigblock, "sigblock" }, /* 109 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 110 */
{ 1, TS, sys_sigpause, "sigpause" }, /* 111 */
{ 2, TS, sys_sigstack, "sigstack" }, /* 112 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */
{ 3, 0, sys_vtrace, "vtrace" }, /* 115 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 116 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 117 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
{ 0, 0, sys_nosys, "nosys" }, /* 119 */
{ 3, 0, sys_readv, "readv" }, /* 120 */
{ 3, 0, sys_writev, "writev" }, /* 121 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 122 */
{ 3, 0, sys_fchown, "fchown" }, /* 123 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 124 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 125 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 126 */
{ 2, 0, sys_setregid, "setregid" }, /* 127 */
{ 2, TF, sys_rename, "rename" }, /* 128 */
{ 2, TF, sys_truncate, "truncate" }, /* 129 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 130 */
{ 2, 0, sys_flock, "flock" }, /* 131 */
{ 0, 0, sys_nosys, "nosys" }, /* 132 */
{ 6, TN, sys_sendto, "sendto" }, /* 133 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 134 */
{ 5, TN, sys_socketpair, "socketpair" }, /* 135 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 136 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 137 */
{ 2, TF, sys_utimes, "utimes" }, /* 138 */
{ 0, TS, sys_sigcleanup, "sigcleanup" }, /* 139 */
{ 2, 0, sys_adjtime, "adjtime" }, /* 140 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 141 */
{ 2, 0, sys_gethostid, "gethostid" }, /* 142 */
{ 0, 0, sys_nosys, "nosys" }, /* 143 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
{ 2, TS, sys_killpg, "killpg" }, /* 146 */
{ 0, 0, sys_nosys, "nosys" }, /* 147 */
{ 0, 0, sys_oldquota, "oldquota" }, /* 148 */
{ 0, 0, sys_oldquota, "oldquota" }, /* 149 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 150 */
{ 4, TN, sys_getmsg, "getmsg" }, /* 151 */
{ 4, TN, sys_putmsg, "putmsg" }, /* 152 */
{ 3, TN, sys_poll, "poll" }, /* 153 */
{ 0, 0, sys_nosys, "nosys" }, /* 154 */
{ 1, 0, sys_nfs_svc, "nfs_svc" }, /* 155 */
{ 4, 0, sys_getdirentries, "getdirentries" }, /* 156 */
{ 2, TF, sys_statfs, "statfs" }, /* 157 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 158 */
{ 1, TF, sys_unmount, "unmount" }, /* 159 */
{ 0, 0, sys_async_daemon, "async_daemon" }, /* 160 */
{ 2, 0, sys_nfs_getfh, "nfs_getfh" }, /* 161 */
{ 2, 0, sys_getdomainname, "getdomainname" }, /* 162 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 163 */
{ 5, 0, sys_rtschedule, "rtschedule" }, /* 164 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 165 */
{ 2, 0, sys_exportfs, "exportfs" }, /* 166 */
{ 4, TF, sys_mount, "mount" }, /* 167 */
{ 2, 0, sys_ustat, "ustat" }, /* 168 */
{ 5, TI, sys_semsys, "semsys" }, /* 169 */
{ 6, TI, sys_msgsys, "msgsys" }, /* 170 */
{ 4, TI, sys_shmsys, "shmsys" }, /* 171 */
{ 4, 0, sys_auditsys, "auditsys" }, /* 172 */
{ 5, 0, sys_rfssys, "rfssys" }, /* 173 */
{ 3, 0, sys_getdents, "getdents" }, /* 174 */
{ 1, 0, sys_sys_setsid, "sys_setsid" }, /* 175 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 176 */
{ 1, 0, sys_fchroot, "fchroot" }, /* 177 */
{ 2, 0, sys_vpixsys, "vpixsys" }, /* 178 */
{ 6, 0, sys_aioread, "aioread" }, /* 179 */
{ 6, 0, sys_aiowrite, "aiowrite" }, /* 180 */
{ 1, 0, sys_aiowait, "aiowait" }, /* 181 */
{ 1, 0, sys_aiocancel, "aiocancel" }, /* 182 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 183 */
{ 0, 0, sys_errsys, "errsys" }, /* 184 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 185 */
{ 2, TF, sys_pathconf, "pathconf" }, /* 186 */
{ 2, 0, sys_fpathconf, "fpathconf" }, /* 187 */
{ 1, 0, sys_sysconf, "sysconf" }, /* 188 */
{ 1, 0, sys_uname, "uname" }, /* 189 */
{ 0, 0, sys_nosys, "nosys" }, /* 190 */
{ 0, 0, sys_nosys, "nosys" }, /* 191 */
{ 0, 0, sys_nosys, "nosys" }, /* 192 */
{ 0, 0, sys_nosys, "nosys" }, /* 193 */
{ 0, 0, sys_nosys, "nosys" }, /* 194 */
{ 0, 0, sys_nosys, "nosys" }, /* 195 */
{ 0, 0, sys_nosys, "nosys" }, /* 196 */
{ 0, 0, sys_nosys, "nosys" }, /* 197 */
{ 0, 0, sys_nosys, "nosys" }, /* 198 */
{ 0, 0, sys_nosys, "nosys" }, /* 199 */
{ 4, TI, sys_semctl, "semctl" }, /* 200 */
{ 4, TI, sys_semget, "semget" }, /* 201 */
{ 4, TI, sys_semop, "semop" }, /* 202 */
{ 5, TI, sys_msgget, "msgget" }, /* 203 */
{ 5, TI, sys_msgctl, "msgctl" }, /* 204 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 205 */
{ 5, TI, sys_msgsnd, "msgsnd" }, /* 206 */
{ 3, TI, sys_shmat, "shmat" }, /* 207 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 208 */
{ 3, TI, sys_shmdt, "shmdt" }, /* 209 */
{ 3, TI, sys_shmget, "shmget" }, /* 210 */

58
svr4/Makefile.in Normal file
View File

@ -0,0 +1,58 @@
#
# $Id$
#
srcdir = @srcdir@
VPATH = $(srcdir)
CC = @CC@
CPP = @CPP@
SHELL = /bin/sh
DEFS = @DEFS@
LDLIBS = @LIBS@
CFLAGS = -g
LDFLAGS = -g
WARNFLAGS = @WARNFLAGS@
CPPFLAGS =
INCLUDES = -I. -I.. -I$(srcdir)
includedir = @includedir@
all: ioctlent.h errnoent.h signalent.h syscallent.h
ioctlent.c: ioctlent.sh
$(SHELL) $(srcdir)/ioctlent.sh $(includedir) >$@
ioctlent.raw: ioctlent.c
$(CPP) ioctlent.c | sed 1,/xyzzy/d >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort: ioctlsort.o
$(CC) $(LDFLAGS) ioctlsort.o -o ioctlsort
ioctlsort.o: ../ioctlsort.c ioctlent.raw
$(CC) $(WARNFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $(srcdir)/../ioctlsort.c
errnoent.h: ../errnoent.sh $(includedir)/sys/errno.h
$(SHELL) $(srcdir)/../errnoent.sh $(includedir)/sys/errno.h >$@
signalent.h: ../signalent.sh $(includedir)/sys/signal.h
$(SHELL) $(srcdir)/../signalent.sh $(includedir)/sys/signal.h >$@
#syscallent.h: ../syscallent.sh $(includedir)/sys/syscall.h
syscallent.h:
$(SHELL) $(srcdir)/../syscallent.sh $(includedir)/sys/syscall.h >$@
clean:
rm -f ioctlent.c *.raw *.tmp *.o ioctlsort
distclean: clean
rm -f Makefile
maintainer-clean: distclean
rm -f ioctlent.h errnoent.h signalent.h

276
svr4/dummy.h Normal file
View File

@ -0,0 +1,276 @@
/*
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
/* still unfinished */
#define sys_sysmp printargs
#define sys_sginap printargs
#define sys_sgikopt printargs
#define sys_sysmips printargs
#define sys_sigreturn printargs
#define sys_recvmsg printargs
#define sys_sendmsg printargs
#define sys_nfssvc printargs
#define sys_getfh printargs
#define sys_async_daemon printargs
#define sys_exportfs printargs
#define sys_BSD_getime printargs
#define sys_sproc printargs
#define sys_procblk printargs
#define sys_sprocsp printargs
#define sys_msync printargs
#define sys_madvise printargs
#define sys_pagelock printargs
#define sys_quotactl printargs
#define sys_cacheflush printargs
#define sys_cachectl printargs
#define sys_nuname printargs
#define sys_sigpoll printargs
#define sys_swapctl printargs
#define sys_sigstack printargs
#define sys_sigsendset printargs
#define sys_priocntl printargs
#define sys_ksigqueue printargs
#define sys_lwp_sema_wait printargs
#define sys_memcntl printargs
#define sys_syscall printargs
#define sys_clocal printargs
#define sys_syssun printargs
#define sys_sysi86 printargs
#define sys_sysmachine printargs
#define sys_plock printargs
#define sys_pathconf printargs
#define sys_sigtimedwait printargs
#define sys_ulimit printargs
#define sys_ptrace printargs
#define sys_stty printargs
#define sys_lwp_info printargs
#define sys_priocntlsys printargs
#define sys_hrtsys printargs
#define sys_xenix printargs
#define sys_statfs printargs
#define sys_fstatfs printargs
#define sys_statvfs printargs
#define sys_fstatvfs printargs
#define sys_fork1 printargs
#define sys_sigsendsys printargs
#define sys_gtty printargs
#define sys_vtrace printargs
#define sys_fpathconf printargs
#define sys_evsys printargs
#define sys_acct printargs
#define sys_exec printargs
#define sys_lwp_sema_post printargs
#define sys_nfssys printargs
#define sys_sigaltstack printargs
#define sys_uadmin printargs
#define sys_umount printargs
#define sys_modctl printargs
#define sys_acancel printargs
#define sys_async printargs
#define sys_evtrapret printargs
#define sys_lwp_create printargs
#define sys_lwp_exit printargs
#define sys_lwp_suspend printargs
#define sys_lwp_continue printargs
#define sys_lwp_kill printargs
#define sys_lwp_self printargs
#define sys_lwp_setprivate printargs
#define sys_lwp_getprivate printargs
#define sys_lwp_wait printargs
#define sys_lwp_mutex_unlock printargs
#define sys_lwp_mutex_lock printargs
#define sys_lwp_cond_wait printargs
#define sys_lwp_cond_signal printargs
#define sys_lwp_cond_broadcast printargs
#define sys_llseek printargs
#define sys_inst_sync printargs
#define sys_auditsys printargs
#define sys_processor_bind printargs
#define sys_processor_info printargs
#define sys_p_online printargs
#define sys_sigqueue printargs
#define sys_clock_gettime printargs
#define sys_clock_settime printargs
#define sys_clock_getres printargs
#define sys_nanosleep printargs
#define sys_timer_create printargs
#define sys_timer_delete printargs
#define sys_timer_settime printargs
#define sys_timer_gettime printargs
#define sys_timer_getoverrun printargs
#define sys_signal printargs
#define sys_sigset printargs
#define sys_sighold printargs
#define sys_sigrelse printargs
#define sys_sigignore printargs
#define sys_sigpause printargs
#define sys_msgctl printargs
#define sys_msgget printargs
#define sys_msgrcv printargs
#define sys_msgsnd printargs
#define sys_shmat printargs
#define sys_shmctl printargs
#define sys_shmdt printargs
#define sys_shmget printargs
#define sys_semctl printargs
#define sys_semget printargs
#define sys_semop printargs
#define sys_olduname printargs
#define sys_ustat printargs
#define sys_fusers printargs
#define sys_sysfs1 printargs
#define sys_sysfs2 printargs
#define sys_sysfs3 printargs
/* like another call */
#define sys_lchown sys_chown
#define sys_setuid sys_close
#define sys_seteuid sys_close
#define sys_setgid sys_close
#define sys_setegid sys_close
#define sys_vhangup sys_close
#define sys_fdsync sys_close
#define sys_sigfillset sys_sigpending
#define sys_vfork sys_fork
#define sys_ksigaction sys_sigaction
#define sys_BSDgetpgrp sys_getpgrp
#define sys_BSDsetpgrp sys_setpgrp
#define sys_waitsys sys_waitid
/* printargs does the right thing */
#define sys_sync printargs
#define sys_profil printargs
#define sys_yield printargs
#define sys_pause printargs
#define sys_sethostid printargs
/* subfunction entry points */
#define sys_pgrpsys printargs
#define sys_sigcall printargs
#define sys_msgsys printargs
#define sys_shmsys printargs
#define sys_semsys printargs
#define sys_utssys printargs
#define sys_sysfs printargs
#define sys_spcall printargs
#define sys_context printargs
#if DONE
#define sys_mount printargs
#define sys_sysinfo printargs
#define sys_sysconfig printargs
#define sys_getpmsg printargs
#define sys_putpmsg printargs
#define sys_pread printargs
#define sys_pwrite printargs
#define sys_readv printargs
#define sys_writev printargs
#define sys_wait printargs
#define sys_waitid printargs
#define sys_sigsuspend printargs
#define sys_getpgrp printargs
#define sys_setpgrp printargs
#define sys_getsid printargs
#define sys_setsid printargs
#define sys_getpgid printargs
#define sys_setpgid printargs
#define sys_getcontext printargs
#define sys_setcontext printargs
#define sys_stime printargs
#define sys_time printargs
#define sys_nice printargs
#define sys_times printargs
#define sys_alarm printargs
#define sys_xstat printargs
#define sys_fxstat printargs
#define sys_lxstat printargs
#define sys_xmknod printargs
#define sys_exit printargs
#define sys_fork printargs
#define sys_read printargs
#define sys_write printargs
#define sys_open printargs
#define sys_close printargs
#define sys_creat printargs
#define sys_link printargs
#define sys_unlink printargs
#define sys_chdir printargs
#define sys_mknod printargs
#define sys_chmod printargs
#define sys_chown printargs
#define sys_brk printargs
#define sys_stat printargs
#define sys_lseek printargs
#define sys_getpid printargs
#define sys_getuid printargs
#define sys_fstat printargs
#define sys_utime printargs
#define sys_access printargs
#define sys_kill printargs
#define sys_dup printargs
#define sys_pipe printargs
#define sys_getgid printargs
#define sys_ioctl printargs
#define sys_umask printargs
#define sys_chroot printargs
#define sys_fcntl printargs
#define sys_rmdir printargs
#define sys_mkdir printargs
#define sys_getdents printargs
#define sys_getmsg printargs
#define sys_putmsg printargs
#define sys_poll printargs
#define sys_lstat printargs
#define sys_symlink printargs
#define sys_readlink printargs
#define sys_setgroups printargs
#define sys_getgroups printargs
#define sys_fchmod printargs
#define sys_fchown printargs
#define sys_sigprocmask printargs
#define sys_sigaction printargs
#define sys_sigpending printargs
#define sys_mincore printargs
#define sys_mmap printargs
#define sys_mprotect printargs
#define sys_munmap printargs
#define sys_vfork printargs
#define sys_fchdir printargs
#define sys_setrlimit printargs
#define sys_getrlimit printargs
#define sys_rename printargs
#define sys_uname printargs
#define sys_adjtime printargs
#define sys_fchroot printargs
#define sys_utimes printargs
#define sys_gettimeofday printargs
#define sys_getitimer printargs
#define sys_setitimer printargs
#endif

152
svr4/errnoent.h Normal file
View File

@ -0,0 +1,152 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EAGAIN", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"ENOMSG", /* 35 */
"EIDRM", /* 36 */
"ECHRNG", /* 37 */
"EL2NSYNC", /* 38 */
"EL3HLT", /* 39 */
"EL3RST", /* 40 */
"ELNRNG", /* 41 */
"EUNATCH", /* 42 */
"ENOCSI", /* 43 */
"EL2HLT", /* 44 */
"EDEADLK", /* 45 */
"ENOLCK", /* 46 */
"ECANCELED", /* 47 */
"ENOTSUP", /* 48 */
"ERRNO_49", /* 49 */
"EBADE", /* 50 */
"EBADR", /* 51 */
"EXFULL", /* 52 */
"ENOANO", /* 53 */
"EBADRQC", /* 54 */
"EBADSLT", /* 55 */
"EDEADLOCK", /* 56 */
"EBFONT", /* 57 */
"ERRNO_58", /* 58 */
"ERRNO_59", /* 59 */
"ENOSTR", /* 60 */
"ENODATA", /* 61 */
"ETIME", /* 62 */
"ENOSR", /* 63 */
"ENONET", /* 64 */
"ENOPKG", /* 65 */
"EREMOTE", /* 66 */
"ENOLINK", /* 67 */
"EADV", /* 68 */
"ESRMNT", /* 69 */
"ECOMM", /* 70 */
"EPROTO", /* 71 */
"ERRNO_72", /* 72 */
"ERRNO_73", /* 73 */
"EMULTIHOP", /* 74 */
"ERRNO_75", /* 75 */
"ERRNO_76", /* 76 */
"EBADMSG", /* 77 */
"ENAMETOOLONG", /* 78 */
"EOVERFLOW", /* 79 */
"ENOTUNIQ", /* 80 */
"EBADFD", /* 81 */
"EREMCHG", /* 82 */
"ELIBACC", /* 83 */
"ELIBBAD", /* 84 */
"ELIBSCN", /* 85 */
"ELIBMAX", /* 86 */
"ELIBEXEC", /* 87 */
"EILSEQ", /* 88 */
"ENOSYS", /* 89 */
"ELOOP", /* 90 */
"ERESTART", /* 91 */
"ESTRPIPE", /* 92 */
"ENOTEMPTY", /* 93 */
"EUSERS", /* 94 */
"ENOTSOCK", /* 95 */
"EDESTADDRREQ", /* 96 */
"EMSGSIZE", /* 97 */
"EPROTOTYPE", /* 98 */
"ENOPROTOOPT", /* 99 */
"ERRNO_100", /* 100 */
"ERRNO_101", /* 101 */
"ERRNO_102", /* 102 */
"ERRNO_103", /* 103 */
"ERRNO_104", /* 104 */
"ERRNO_105", /* 105 */
"ERRNO_106", /* 106 */
"ERRNO_107", /* 107 */
"ERRNO_108", /* 108 */
"ERRNO_109", /* 109 */
"ERRNO_110", /* 110 */
"ERRNO_111", /* 111 */
"ERRNO_112", /* 112 */
"ERRNO_113", /* 113 */
"ERRNO_114", /* 114 */
"ERRNO_115", /* 115 */
"ERRNO_116", /* 116 */
"ERRNO_117", /* 117 */
"ERRNO_118", /* 118 */
"ERRNO_119", /* 119 */
"EPROTONOSUPPORT", /* 120 */
"ESOCKTNOSUPPORT", /* 121 */
"EOPNOTSUPP", /* 122 */
"EPFNOSUPPORT", /* 123 */
"EAFNOSUPPORT", /* 124 */
"EADDRINUSE", /* 125 */
"EADDRNOTAVAIL", /* 126 */
"ENETDOWN", /* 127 */
"ENETUNREACH", /* 128 */
"ENETRESET", /* 129 */
"ECONNABORTED", /* 130 */
"ECONNRESET", /* 131 */
"ENOBUFS", /* 132 */
"EISCONN", /* 133 */
"ENOTCONN", /* 134 */
"ERRNO_135", /* 135 */
"ERRNO_136", /* 136 */
"ERRNO_137", /* 137 */
"ERRNO_138", /* 138 */
"ERRNO_139", /* 139 */
"ERRNO_140", /* 140 */
"ERRNO_141", /* 141 */
"ERRNO_142", /* 142 */
"ESHUTDOWN", /* 143 */
"ETOOMANYREFS", /* 144 */
"ETIMEDOUT", /* 145 */
"ECONNREFUSED", /* 146 */
"EHOSTDOWN", /* 147 */
"EHOSTUNREACH", /* 148 */
"EALREADY", /* 149 */
"EINPROGRESS", /* 150 */
"ESTALE", /* 151 */

429
svr4/ioctlent.h Normal file
View File

@ -0,0 +1,429 @@
{"sys/dkio.h", "DKIOCGGEOM", 0x401},
{"sys/dkio.h", "DKIOCSGEOM", 0x402},
{"sys/dkio.h", "DKIOCINFO", 0x403},
{"sys/dkio.h", "DKIOCSAPART", 0x404},
{"sys/dkio.h", "DKIOCGAPART", 0x405},
{"sys/dkio.h", "DKIOCEJECT", 0x406},
{"sys/dkio.h", "DKIOCLOCK", 0x407},
{"sys/dkio.h", "DKIOCUNLOCK", 0x408},
{"sys/dkio.h", "DKIOCGVTOC", 0x40b},
{"sys/dkio.h", "DKIOCSVTOC", 0x40c},
{"sys/dkio.h", "DKIOCSTATE", 0x40d},
{"sys/fdio.h", "FDIOGCHAR", 0x433},
{"sys/fdio.h", "FDIOSCHAR", 0x434},
{"sys/fdio.h", "FDEJECT", 0x435},
{"sys/fdio.h", "FDGETCHANGE", 0x436},
{"sys/fdio.h", "FDGETDRIVECHAR", 0x437},
{"sys/fdio.h", "FDSETDRIVECHAR", 0x438},
{"sys/fdio.h", "FDGETSEARCH", 0x439},
{"sys/fdio.h", "FDSETSEARCH", 0x43a},
{"sys/fdio.h", "FDIOCMD", 0x43b},
{"sys/fdio.h", "FDRAW", 0x446},
{"sys/fdio.h", "FDDEFGEOCHAR", 0x456},
{"sys/hdio.h", "HDKIOCSTYPE", 0x465},
{"sys/hdio.h", "HDKIOCGTYPE", 0x466},
{"sys/hdio.h", "HDKIOCSBAD", 0x467},
{"sys/hdio.h", "HDKIOCGBAD", 0x468},
{"sys/hdio.h", "HDKIOCSCMD", 0x469},
{"sys/hdio.h", "HDKIOCGDIAG", 0x46a},
{"sys/cdio.h", "CDROMPAUSE", 0x497},
{"sys/cdio.h", "CDROMRESUME", 0x498},
{"sys/cdio.h", "CDROMPLAYMSF", 0x499},
{"sys/cdio.h", "CDROMPLAYTRKIND", 0x49a},
{"sys/cdio.h", "CDROMREADTOCHDR", 0x49b},
{"sys/cdio.h", "CDROMREADTOCENTRY", 0x49c},
{"sys/cdio.h", "CDROMSTOP", 0x49d},
{"sys/cdio.h", "CDROMSTART", 0x49e},
{"sys/cdio.h", "CDROMEJECT", 0x49f},
{"sys/cdio.h", "CDROMVOLCTRL", 0x4a0},
{"sys/cdio.h", "CDROMSUBCHNL", 0x4a1},
{"sys/cdio.h", "CDROMREADMODE2", 0x4a2},
{"sys/cdio.h", "CDROMREADMODE1", 0x4a3},
{"sys/cdio.h", "CDROMREADOFFSET", 0x4a4},
{"sys/cdio.h", "CDROMGBLKMODE", 0x4a5},
{"sys/cdio.h", "CDROMSBLKMODE", 0x4a6},
{"sys/cdio.h", "CDROMCDDA", 0x4a7},
{"sys/cdio.h", "CDROMCDXA", 0x4a8},
{"sys/cdio.h", "CDROMSUBCODE", 0x4a9},
{"sys/cdio.h", "CDROMGDRVSPEED", 0x4aa},
{"sys/cdio.h", "CDROMSDRVSPEED", 0x4ab},
{"sys/scsi/impl/uscsi.h", "USCSICMD", 0x4c9},
{"sys/bufmod.h", "SBIOCSTIME", 0x4201},
{"sys/bufmod.h", "SBIOCGTIME", 0x4202},
{"sys/bufmod.h", "SBIOCCTIME", 0x4203},
{"sys/bufmod.h", "SBIOCSCHUNK", 0x4204},
{"sys/bufmod.h", "SBIOCGCHUNK", 0x4205},
{"sys/bufmod.h", "SBIOCSSNAP", 0x4206},
{"sys/bufmod.h", "SBIOCGSNAP", 0x4207},
{"sys/bufmod.h", "SBIOCSFLAGS", 0x4208},
{"sys/bufmod.h", "SBIOCGFLAGS", 0x4209},
{"sys/termios.h", "LDOPEN", 0x4400},
{"sys/termios.h", "LDCLOSE", 0x4401},
{"sys/dlpi.h", "DLIOCRAW", 0x4401},
{"sys/sad.h", "SAD_SAP", 0x4401},
{"sys/termios.h", "LDCHG", 0x4402},
{"sys/sad.h", "SAD_GAP", 0x4402},
{"sys/sad.h", "SAD_VML", 0x4403},
{"sys/termios.h", "LDGETT", 0x4408},
{"sys/termios.h", "LDSETT", 0x4409},
{"sys/dlpi.h", "DL_IOC_HDR_INFO", 0x440a},
{"sys/termios.h", "LDSMAP", 0x446e},
{"sys/termios.h", "LDGMAP", 0x446f},
{"sys/termios.h", "LDNMAP", 0x4470},
{"sys/termios.h", "LDEMAP", 0x4471},
{"sys/termios.h", "LDDMAP", 0x4472},
{"sys/fbio.h", "FBIOGTYPE", 0x4600},
{"sys/fbio.h", "FBIOGINFO", 0x4602},
{"sys/fbio.h", "FBIOPUTCMAP", 0x4603},
{"sys/fbio.h", "FBIOGETCMAP", 0x4604},
{"sys/fbio.h", "FBIOSATTR", 0x4605},
{"sys/fbio.h", "FBIOGATTR", 0x4606},
{"sys/fbio.h", "FBIOSVIDEO", 0x4607},
{"sys/fbio.h", "FBIOGVIDEO", 0x4608},
{"sys/fbio.h", "FBIOVERTICAL", 0x4609},
{"sys/fbio.h", "GRABPAGEALLOC", 0x460a},
{"sys/fbio.h", "GRABPAGEFREE", 0x460b},
{"sys/fbio.h", "GRABATTACH", 0x460c},
{"sys/fbio.h", "FBIOGPLNGRP", 0x460d},
{"sys/fbio.h", "FBIOGCMSIZE", 0x460e},
{"sys/fbio.h", "FBIOSCMSIZE", 0x460f},
{"sys/fbio.h", "FBIOSCMS", 0x4610},
{"sys/fbio.h", "FBIOAVAILPLNGRP", 0x4611},
{"sys/fbio.h", "FBIODBLGINFO", 0x4612},
{"sys/fbio.h", "FBIODBLSINFO", 0x4613},
{"sys/fbio.h", "FBIOSWINFD", 0x4614},
{"sys/fbio.h", "FBIOSAVWINFD", 0x4615},
{"sys/fbio.h", "FBIORESWINFD", 0x4616},
{"sys/fbio.h", "FBIOSRWINFD", 0x4617},
{"sys/visual_io.h", "VIS_SETCURSOR", 0x4618},
{"sys/fbio.h", "FBIOSCURSOR", 0x4618},
{"sys/fbio.h", "FBIOGCURSOR", 0x4619},
{"sys/visual_io.h", "VIS_GETCURSOR", 0x4619},
{"sys/fbio.h", "FBIOSCURPOS", 0x461a},
{"sys/visual_io.h", "VIS_MOVECURSOR", 0x461a},
{"sys/fbio.h", "FBIOGCURPOS", 0x461b},
{"sys/visual_io.h", "VIS_GETCURSORPOS", 0x461b},
{"sys/fbio.h", "FBIOGCURMAX", 0x461c},
{"sys/fbio.h", "GRABLOCKINFO", 0x461d},
{"sys/fbio.h", "FBIO_WID_ALLOC", 0x461e},
{"sys/fbio.h", "FBIO_WID_FREE", 0x461f},
{"sys/fbio.h", "FBIO_WID_PUT", 0x4620},
{"sys/fbio.h", "FBIO_WID_GET", 0x4621},
{"sys/fbio.h", "FBIO_DEVID", 0x4622},
{"sys/fbio.h", "FBIO_U_RST", 0x4623},
{"sys/fbio.h", "FBIO_FULLSCREEN_ELIMINATION_GROUPS", 0x4624},
{"sys/fbio.h", "FBIO_WID_DBL_SET", 0x4625},
{"sys/fbio.h", "FBIOVRTOFFSET", 0x4626},
{"sys/fbio.h", "FBIOGXINFO", 0x4627},
{"sys/fbio.h", "FBIOMONINFO", 0x4628},
{"sys/fbio.h", "FBIOPUTCMAPI", 0x4629},
{"sys/fbio.h", "FBIOGETCMAPI", 0x462a},
{"sys/fbio.h", "FBIO_ASSIGNWID", 0x462b},
{"sys/fbio.h", "FBIO_STEREO", 0x462c},
{"sys/gpio.h", "GP1IO_PUT_INFO", 0x4700},
{"sys/gpio.h", "GP1IO_GET_STATIC_BLOCK", 0x4701},
{"sys/gpio.h", "GP1IO_FREE_STATIC_BLOCK", 0x4702},
{"sys/gpio.h", "GP1IO_GET_GBUFFER_STATE", 0x4703},
{"sys/gpio.h", "GP1IO_CHK_GP", 0x4704},
{"sys/gpio.h", "GP1IO_GET_RESTART_COUNT", 0x4705},
{"sys/gpio.h", "GP1IO_REDIRECT_DEVFB", 0x4706},
{"sys/gpio.h", "GP1IO_GET_REQDEV", 0x4707},
{"sys/gpio.h", "GP1IO_GET_TRUMINORDEV", 0x4708},
{"sys/gpio.h", "GP1IO_CHK_FOR_GBUFFER", 0x4709},
{"sys/gpio.h", "GP1IO_SET_USING_GBUFFER", 0x470a},
{"sys/gpio.h", "GP1IO_INFO_STATIC_BLOCK", 0x470b},
{"sys/sockmod.h", "O_SI_GETUDATA", 0x4965},
{"sys/sockmod.h", "SI_SHUTDOWN", 0x4966},
{"sys/sockmod.h", "SI_LISTEN", 0x4967},
{"sys/sockmod.h", "SI_SETMYNAME", 0x4968},
{"sys/sockmod.h", "SI_SETPEERNAME", 0x4969},
{"sys/sockmod.h", "SI_GETINTRANSIT", 0x496a},
{"sys/sockmod.h", "SI_SOCKPARAMS", 0x496d},
{"sys/sockmod.h", "SI_GETUDATA", 0x496e},
{"sys/strlog.h", "I_TRCLOG", 0x4c01},
{"sys/strlog.h", "I_ERRLOG", 0x4c02},
{"sys/strlog.h", "I_CONSLOG", 0x4c03},
{"sys/cg14io.h", "MDI_RESET", 0x4d01},
{"sys/cg14io.h", "MDI_GET_CFGINFO", 0x4d02},
{"sys/cg14io.h", "MDI_SET_PIXELMODE", 0x4d03},
{"sys/cg14io.h", "MDI_SET_COUNTERS", 0x4d04},
{"sys/cg14io.h", "MDI_SET_PPR", 0x4d05},
{"sys/cg14io.h", "MDI_VRT_CNTL", 0x4d06},
{"sys/cg14io.h", "MDI_SET_CLUT", 0x4d07},
{"sys/cg14io.h", "MDI_GET_CLUT", 0x4d08},
{"sys/cg14io.h", "MDI_SET_XLUT", 0x4d09},
{"sys/cg14io.h", "MDI_GET_XLUT", 0x4d0a},
{"sys/cg14io.h", "MDI_GAMMA_CORRECT", 0x4d0b},
{"sys/cg14io.h", "MDI_SET_GAMMALUT", 0x4d0c},
{"sys/cg14io.h", "MDI_GET_GAMMALUT", 0x4d0d},
{"sys/cg14io.h", "MDI_SET_DEGAMMALUT", 0x4d0e},
{"sys/cg14io.h", "MDI_GET_DEGAMMALUT", 0x4d0f},
{"sys/cg14io.h", "MDI_GET_BUFFER_INFO", 0x4d10},
{"sys/cg14io.h", "MDI_SET_CURSOR", 0x4d11},
{"sys/cg14io.h", "MDI_GET_DIAGINFO", 0x4d12},
{"sys/cg14io.h", "MDI_SET_RESOLUTION", 0x4d13},
{"sys/cg14io.h", "SET_MONITOR_POWER", 0x4d14},
{"sys/openpromio.h", "OPROMGETBOOTARGS", 0x4f0c},
{"sys/pfmod.h", "PFIOCSETF", 0x5001},
{"sys/stropts.h", "I_NREAD", 0x5301},
{"sys/stropts.h", "I_PUSH", 0x5302},
{"sys/stropts.h", "I_POP", 0x5303},
{"sys/stropts.h", "I_LOOK", 0x5304},
{"sys/stropts.h", "I_FLUSH", 0x5305},
{"sys/stropts.h", "I_SRDOPT", 0x5306},
{"sys/stropts.h", "I_GRDOPT", 0x5307},
{"sys/stropts.h", "I_STR", 0x5308},
{"sys/stropts.h", "I_SETSIG", 0x5309},
{"sys/stropts.h", "I_GETSIG", 0x530a},
{"sys/stropts.h", "I_FIND", 0x530b},
{"sys/stropts.h", "I_LINK", 0x530c},
{"sys/stropts.h", "I_UNLINK", 0x530d},
{"sys/stropts.h", "I_RECVFD", 0x530e},
{"sys/stropts.h", "I_PEEK", 0x530f},
{"sys/stropts.h", "I_FDINSERT", 0x5310},
{"sys/stropts.h", "I_SENDFD", 0x5311},
{"sys/stropts.h", "I_SWROPT", 0x5313},
{"sys/stropts.h", "I_GWROPT", 0x5314},
{"sys/stropts.h", "I_LIST", 0x5315},
{"sys/stropts.h", "I_PLINK", 0x5316},
{"sys/stropts.h", "I_PUNLINK", 0x5317},
{"sys/stropts.h", "I_SETEV", 0x5318},
{"sys/stropts.h", "I_GETEV", 0x5319},
{"sys/stropts.h", "I_STREV", 0x531a},
{"sys/stropts.h", "I_UNSTREV", 0x531b},
{"sys/stropts.h", "I_FLUSHBAND", 0x531c},
{"sys/stropts.h", "I_CKBAND", 0x531d},
{"sys/stropts.h", "I_GETBAND", 0x531e},
{"sys/stropts.h", "I_ATMARK", 0x531f},
{"sys/stropts.h", "I_SETCLTIME", 0x5320},
{"sys/stropts.h", "I_GETCLTIME", 0x5321},
{"sys/stropts.h", "I_CANPUT", 0x5322},
{"sys/termios.h", "TCGETA", 0x5401},
{"sys/termios.h", "TCSETA", 0x5402},
{"sys/termios.h", "TCSETAW", 0x5403},
{"sys/termios.h", "TCSETAF", 0x5404},
{"sys/termios.h", "TCSBRK", 0x5405},
{"sys/termios.h", "TCXONC", 0x5406},
{"sys/termios.h", "TCFLSH", 0x5407},
{"sys/termios.h", "TIOCKBON", 0x5408},
{"sys/termios.h", "TIOCKBOF", 0x5409},
{"sys/termios.h", "KBENABLED", 0x540a},
{"sys/termios.h", "TCGETS", 0x540d},
{"sys/termios.h", "TCSETS", 0x540e},
{"sys/termios.h", "TCSANOW", 0x540e},
{"sys/termios.h", "TCSADRAIN", 0x540f},
{"sys/termios.h", "TCSETSW", 0x540f},
{"sys/termios.h", "TCSAFLUSH", 0x5410},
{"sys/termios.h", "TCSETSF", 0x5410},
{"sys/termio.h", "TCDSET", 0x5420},
{"sys/termios.h", "TCDSET", 0x5420},
{"sys/termios.h", "RTS_TOG", 0x5421},
{"sys/ttold.h", "TIOCSWINSZ", 0x5467},
{"sys/termios.h", "TIOCSWINSZ", 0x5467},
{"sys/ttold.h", "TIOCGWINSZ", 0x5468},
{"sys/termios.h", "TIOCGWINSZ", 0x5468},
{"sys/termios.h", "TIOCGSOFTCAR", 0x5469},
{"sys/termios.h", "TIOCSSOFTCAR", 0x546a},
{"sys/timod.h", "TI_GETINFO", 0x548c},
{"sys/timod.h", "TI_OPTMGMT", 0x548d},
{"sys/timod.h", "TI_BIND", 0x548e},
{"sys/timod.h", "TI_UNBIND", 0x548f},
{"sys/timod.h", "TI_GETMYNAME", 0x5490},
{"sys/timod.h", "TI_GETPEERNAME", 0x5491},
{"sys/timod.h", "TI_SETMYNAME", 0x5492},
{"sys/timod.h", "TI_SETPEERNAME", 0x5493},
{"sys/termiox.h", "TCGETX", 0x5801},
{"sys/termiox.h", "TCSETX", 0x5802},
{"sys/termiox.h", "TCSETXW", 0x5803},
{"sys/termiox.h", "TCSETXF", 0x5804},
{"sys/ioctl.h", "DIOCGETC", 0x6401},
{"sys/ioctl.h", "DIOCGETB", 0x6402},
{"sys/ioctl.h", "DIOCSETE", 0x6403},
{"sys/termios.h", "DIOCGETP", 0x6408},
{"sys/termios.h", "DIOCSETP", 0x6409},
{"sys/jioctl.h", "JBOOT", 0x6a01},
{"sys/jioctl.h", "JTERM", 0x6a02},
{"sys/jioctl.h", "JMPX", 0x6a03},
{"sys/jioctl.h", "JWINSIZE", 0x6a05},
{"sys/jioctl.h", "JZOMBOOT", 0x6a07},
{"sys/jioctl.h", "JAGENT", 0x6a09},
{"sys/jioctl.h", "JTRUN", 0x6a0a},
{"sys/jioctl.h", "JXTPROTO", 0x6a0b},
{"sys/kbio.h", "KIOCTRANS", 0x6b00},
{"sys/kbio.h", "KIOCSETKEY", 0x6b01},
{"sys/kbio.h", "KIOCGETKEY", 0x6b02},
{"sys/kbio.h", "KIOCGTRANS", 0x6b05},
{"sys/kbio.h", "KIOCTRANSABLE", 0x6b06},
{"sys/kbio.h", "KIOCGTRANSABLE", 0x6b07},
{"sys/kbio.h", "KIOCCMD", 0x6b08},
{"sys/kbio.h", "KIOCTYPE", 0x6b09},
{"sys/kbio.h", "KIOCSDIRECT", 0x6b0a},
{"sys/kbio.h", "KIOCGDIRECT", 0x6b0b},
{"sys/kbio.h", "KIOCSKEY", 0x6b0c},
{"sys/kbio.h", "KIOCGKEY", 0x6b0d},
{"sys/kbio.h", "KIOCSLED", 0x6b0e},
{"sys/kbio.h", "KIOCGLED", 0x6b0f},
{"sys/kbio.h", "KIOCSCOMPAT", 0x6b10},
{"sys/kbio.h", "KIOCGCOMPAT", 0x6b11},
{"sys/kbio.h", "KIOCLAYOUT", 0x6b14},
{"sys/ioctl.h", "LIOCGETP", 0x6c01},
{"sys/ioctl.h", "LIOCSETP", 0x6c02},
{"sys/ioctl.h", "LIOCGETS", 0x6c05},
{"sys/ioctl.h", "LIOCSETS", 0x6c06},
{"sys/mtio.h", "MTIOCTOP", 0x6d01},
{"sys/msio.h", "MSIOGETPARMS", 0x6d01},
{"sys/msio.h", "MSIOSETPARMS", 0x6d02},
{"sys/mtio.h", "MTIOCGET", 0x6d02},
{"sys/mtio.h", "MTIOCGETDRIVETYPE", 0x6d03},
{"sys/procfs.h", "PIOCSTATUS", 0x7101},
{"sys/procfs.h", "PIOCSTOP", 0x7102},
{"sys/procfs.h", "PIOCWSTOP", 0x7103},
{"sys/procfs.h", "PIOCRUN", 0x7104},
{"sys/procfs.h", "PIOCGTRACE", 0x7105},
{"sys/procfs.h", "PIOCSTRACE", 0x7106},
{"sys/procfs.h", "PIOCSSIG", 0x7107},
{"sys/procfs.h", "PIOCKILL", 0x7108},
{"sys/procfs.h", "PIOCUNKILL", 0x7109},
{"sys/procfs.h", "PIOCGHOLD", 0x710a},
{"sys/procfs.h", "PIOCSHOLD", 0x710b},
{"sys/procfs.h", "PIOCMAXSIG", 0x710c},
{"sys/procfs.h", "PIOCACTION", 0x710d},
{"sys/procfs.h", "PIOCGFAULT", 0x710e},
{"sys/procfs.h", "PIOCSFAULT", 0x710f},
{"sys/procfs.h", "PIOCCFAULT", 0x7110},
{"sys/procfs.h", "PIOCGENTRY", 0x7111},
{"sys/procfs.h", "PIOCSENTRY", 0x7112},
{"sys/procfs.h", "PIOCGEXIT", 0x7113},
{"sys/procfs.h", "PIOCSEXIT", 0x7114},
{"sys/procfs.h", "PIOCSFORK", 0x7115},
{"sys/procfs.h", "PIOCRFORK", 0x7116},
{"sys/procfs.h", "PIOCSRLC", 0x7117},
{"sys/procfs.h", "PIOCRRLC", 0x7118},
{"sys/procfs.h", "PIOCGREG", 0x7119},
{"sys/procfs.h", "PIOCSREG", 0x711a},
{"sys/procfs.h", "PIOCGFPREG", 0x711b},
{"sys/procfs.h", "PIOCSFPREG", 0x711c},
{"sys/procfs.h", "PIOCNICE", 0x711d},
{"sys/procfs.h", "PIOCPSINFO", 0x711e},
{"sys/procfs.h", "PIOCNMAP", 0x711f},
{"sys/procfs.h", "PIOCMAP", 0x7120},
{"sys/procfs.h", "PIOCOPENM", 0x7121},
{"sys/procfs.h", "PIOCCRED", 0x7122},
{"sys/procfs.h", "PIOCGROUPS", 0x7123},
{"sys/procfs.h", "PIOCGETPR", 0x7124},
{"sys/procfs.h", "PIOCGETU", 0x7125},
{"sys/procfs.h", "PIOCSET", 0x7126},
{"sys/procfs.h", "PIOCRESET", 0x7127},
{"sys/procfs.h", "PIOCNWATCH", 0x7128},
{"sys/procfs.h", "PIOCGWATCH", 0x7129},
{"sys/procfs.h", "PIOCSWATCH", 0x712a},
{"sys/procfs.h", "PIOCUSAGE", 0x712b},
{"sys/procfs.h", "PIOCOPENPD", 0x712c},
{"sys/procfs.h", "PIOCLWPIDS", 0x712d},
{"sys/procfs.h", "PIOCOPENLWP", 0x712e},
{"sys/procfs.h", "PIOCLSTATUS", 0x712f},
{"sys/procfs.h", "PIOCLUSAGE", 0x7130},
{"sys/procfs.h", "PIOCNAUXV", 0x7131},
{"sys/procfs.h", "PIOCAUXV", 0x7132},
{"sys/procfs.h", "PIOCGWIN", 0x7165},
{"sys/ttold.h", "TIOCGETD", 0x7400},
{"sys/termios.h", "TIOCGETD", 0x7400},
{"sys/termios.h", "TIOCSETD", 0x7401},
{"sys/ttold.h", "TIOCSETD", 0x7401},
{"sys/termios.h", "TIOCHPCL", 0x7402},
{"sys/ttold.h", "TIOCHPCL", 0x7402},
{"sys/ttold.h", "TIOCGETP", 0x7408},
{"sys/termios.h", "TIOCGETP", 0x7408},
{"sys/termios.h", "TIOCSETP", 0x7409},
{"sys/ttold.h", "TIOCSETP", 0x7409},
{"sys/ttold.h", "TIOCSETN", 0x740a},
{"sys/termios.h", "TIOCSETN", 0x740a},
{"sys/ttold.h", "TIOCEXCL", 0x740d},
{"sys/termios.h", "TIOCEXCL", 0x740d},
{"sys/ttold.h", "TIOCNXCL", 0x740e},
{"sys/termios.h", "TIOCNXCL", 0x740e},
{"sys/termios.h", "TIOCFLUSH", 0x7410},
{"sys/ttold.h", "TIOCFLUSH", 0x7410},
{"sys/termios.h", "TIOCSETC", 0x7411},
{"sys/ttold.h", "TIOCSETC", 0x7411},
{"sys/termios.h", "TIOCGETC", 0x7412},
{"sys/ttold.h", "TIOCGETC", 0x7412},
{"sys/termios.h", "TIOCGPGRP", 0x7414},
{"sys/termios.h", "TIOCSPGRP", 0x7415},
{"sys/termios.h", "TIOCGSID", 0x7416},
{"sys/termios.h", "TIOCSTI", 0x7417},
{"sys/termios.h", "TIOCSSID", 0x7418},
{"sys/termios.h", "TIOCMSET", 0x741a},
{"sys/termios.h", "TIOCMBIS", 0x741b},
{"sys/termios.h", "TIOCMBIC", 0x741c},
{"sys/termios.h", "TIOCMGET", 0x741d},
{"sys/termios.h", "TIOCREMOTE", 0x741e},
{"sys/ttold.h", "TIOCREMOTE", 0x741e},
{"sys/termios.h", "TIOCSIGNAL", 0x741f},
{"sys/termios.h", "TIOCSTART", 0x746e},
{"sys/ttold.h", "TIOCSTART", 0x746e},
{"sys/termios.h", "TIOCSTOP", 0x746f},
{"sys/ttold.h", "TIOCSTOP", 0x746f},
{"sys/ttold.h", "TIOCNOTTY", 0x7471},
{"sys/termios.h", "TIOCNOTTY", 0x7471},
{"sys/termios.h", "TIOCOUTQ", 0x7473},
{"sys/ttold.h", "TIOCOUTQ", 0x7473},
{"sys/termios.h", "TIOCGLTC", 0x7474},
{"sys/ttold.h", "TIOCGLTC", 0x7474},
{"sys/termios.h", "TIOCSLTC", 0x7475},
{"sys/ttold.h", "TIOCSLTC", 0x7475},
{"sys/termios.h", "TIOCCDTR", 0x7478},
{"sys/ttold.h", "TIOCCDTR", 0x7478},
{"sys/ttold.h", "TIOCSDTR", 0x7479},
{"sys/termios.h", "TIOCSDTR", 0x7479},
{"sys/termios.h", "TIOCCBRK", 0x747a},
{"sys/ttold.h", "TIOCCBRK", 0x747a},
{"sys/termios.h", "TIOCSBRK", 0x747b},
{"sys/ttold.h", "TIOCSBRK", 0x747b},
{"sys/termios.h", "TIOCLGET", 0x747c},
{"sys/ttold.h", "TIOCLGET", 0x747c},
{"sys/termios.h", "TIOCLSET", 0x747d},
{"sys/ttold.h", "TIOCLSET", 0x747d},
{"sys/ttold.h", "TIOCLBIC", 0x747e},
{"sys/termios.h", "TIOCLBIC", 0x747e},
{"sys/ttold.h", "TIOCLBIS", 0x747f},
{"sys/termios.h", "TIOCLBIS", 0x747f},
{"sys/vol.h", "VOLIOCMAP", 0x7601},
{"sys/vuid_event.h", "VUIDSFORMAT", 0x7601},
{"sys/vuid_event.h", "VUIDSFORMAT", 0x7601},
{"sys/vuid_event.h", "VUIDGFORMAT", 0x7602},
{"sys/vuid_event.h", "VUIDGFORMAT", 0x7602},
{"sys/vol.h", "VOLIOCUNMAP", 0x7602},
{"sys/vol.h", "VOLIOCEVENT", 0x7603},
{"sys/vuid_event.h", "VUIDSADDR", 0x7603},
{"sys/vuid_event.h", "VUIDSADDR", 0x7603},
{"sys/vuid_event.h", "VUIDGADDR", 0x7604},
{"sys/vuid_event.h", "VUIDGADDR", 0x7604},
{"sys/vol.h", "VOLIOCEJECT", 0x7604},
{"sys/vol.h", "VOLIOCCHECK", 0x7605},
{"sys/vol.h", "VOLIOCINUSE", 0x7606},
{"sys/vol.h", "VOLIOCDGATTR", 0x7607},
{"sys/vol.h", "VOLIOCDSATTR", 0x7608},
{"sys/vol.h", "VOLIOCDCHECK", 0x7609},
{"sys/vol.h", "VOLIOCCANCEL", 0x760a},
{"sys/vol.h", "VOLIOCINFO", 0x760b},
{"sys/vol.h", "VOLIOCSATTR", 0x760c},
{"sys/vol.h", "VOLIOCGATTR", 0x760d},
{"sys/vol.h", "VOLIOCDINUSE", 0x760e},
{"sys/vol.h", "VOLIOCDAEMON", 0x760f},
{"sys/vol.h", "VOLIOCFLAGS", 0x7610},
{"sys/vol.h", "VOLIOCEXTRA4", 0x7611},
{"sys/vol.h", "VOLIOCEXTRA5", 0x7612},
{"sys/vol.h", "VOLIOCEXTRA6", 0x7613},
{"sys/vol.h", "VOLIOCEXTRA7", 0x7614},
{"sys/ser_sync.h", "S_IOCGETMODE", 0x7a01},
{"sys/ser_sync.h", "S_IOCSETMODE", 0x7a02},
{"sys/ser_sync.h", "S_IOCGETSTATS", 0x7a03},
{"sys/ser_sync.h", "S_IOCCLRSTATS", 0x7a04},
{"sys/ser_sync.h", "S_IOCGETSPEED", 0x7a05},
{"sys/ser_sync.h", "S_IOCGETMRU", 0x7a06},
{"sys/ser_sync.h", "S_IOCSETMRU", 0x7a07},
{"sys/ser_sync.h", "S_IOCGETMTU", 0x7a08},
{"sys/ser_sync.h", "S_IOCSETMTU", 0x7a09},
{"sys/ser_sync.h", "S_IOCGETMCTL", 0x7a0a},
{"sys/tl.h", "TL_IOC_CREDOPT", 0x544c01},

52
svr4/ioctlent.sh Normal file
View File

@ -0,0 +1,52 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
# 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$
if [ $# -ne 1 ]
then
echo "usage: $0 include-directory" >&2
exit 1
fi
bad_includes='cg[48]var\.h'
bad_defines='cg[48]var\.h|READSLICE|I_E_RECVFD|FBIOGPIXRECT|JTIMO|TTYTYPE|TIOCCONS|TCL_LINK|TCL_UNLINK'
(
cd $1 || exit
find sys -name '*.h' -print |
xargs grep '^[ ]*#[ ]*define[ ][ ]*[A-Z_][A-Za-z0-9_]*[ ][ ]*([A-Za-z_][A-Za-z0-9_]*|[0-9][0-9]*)' /dev/null |
sed 's/\(.*\):#[ ]*define[ ]*\([A-Z_][A-Za-z0-9_]*\)[ ]*\(([^)]*)\)[ ]*\(.*\)/ { "\1", "\2", \2 }, \4/'
) >ioctlent.tmp
cat ioctlent.tmp |
awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' |
sort -u |
egrep -v "$bad_includes"
echo xyzzy
echo "struct ioctlent ioctlent[] = {"
egrep -v "$bad_defines" ioctlent.tmp
echo "};"
rm -f ioctlent.tmp

36
svr4/signalent.h Normal file
View File

@ -0,0 +1,36 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGEMT", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGBUS", /* 10 */
"SIGSEGV", /* 11 */
"SIGSYS", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGUSR1", /* 16 */
"SIGUSR2", /* 17 */
"SIGCHLD", /* 18 */
"SIGPWR", /* 19 */
"SIGWINCH", /* 20 */
"SIGURG", /* 21 */
"SIGPOLL", /* 22 */
"SIGSTOP", /* 23 */
"SIGTSTP", /* 24 */
"SIGCONT", /* 25 */
"SIGTTIN", /* 26 */
"SIGTTOU", /* 27 */
"SIGVTALRM", /* 28 */
"SIGPROF", /* 29 */
"SIGXCPU", /* 30 */
"SIGXFSZ", /* 31 */
"SIGWAITING", /* 32 */
"SIGLWP", /* 33 */
"SIGFREEZE", /* 34 */
"SIGTHAW", /* 35 */

430
svr4/syscall.h Normal file
View File

@ -0,0 +1,430 @@
/*
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "dummy.h"
extern int sys_syscall();
extern int sys_exit();
extern int sys_fork();
extern int sys_read();
extern int sys_write();
extern int sys_open();
extern int sys_close();
extern int sys_wait();
extern int sys_creat();
extern int sys_link();
extern int sys_unlink();
extern int sys_exec();
extern int sys_chdir();
extern int sys_time();
extern int sys_mknod();
extern int sys_chmod();
extern int sys_chown();
extern int sys_brk();
extern int sys_stat();
extern int sys_lseek();
extern int sys_getpid();
extern int sys_mount();
extern int sys_umount();
extern int sys_setuid();
extern int sys_getuid();
extern int sys_stime();
extern int sys_ptrace();
extern int sys_alarm();
extern int sys_fstat();
extern int sys_pause();
extern int sys_utime();
extern int sys_stty();
extern int sys_gtty();
extern int sys_access();
extern int sys_nice();
extern int sys_statfs();
extern int sys_sync();
extern int sys_kill();
extern int sys_fstatfs();
extern int sys_pgrpsys();
extern int sys_setpgrp();
extern int sys_xenix();
extern int sys_syssgi();
extern int sys_dup();
extern int sys_pipe();
extern int sys_times();
extern int sys_profil();
extern int sys_plock();
extern int sys_setgid();
extern int sys_getgid();
extern int sys_sigcall();
extern int sys_msgsys();
extern int sys_syssun();
extern int sys_sysi86();
extern int sys_sysmips();
extern int sys_sysmachine();
extern int sys_acct();
extern int sys_shmsys();
extern int sys_semsys();
extern int sys_ioctl();
extern int sys_uadmin();
extern int sys_utssys();
extern int sys_fdsync();
extern int sys_execve();
extern int sys_umask();
extern int sys_chroot();
extern int sys_fcntl();
extern int sys_ulimit();
extern int sys_rmdir();
extern int sys_mkdir();
extern int sys_getdents();
extern int sys_sysfs();
extern int sys_getmsg();
extern int sys_putmsg();
extern int sys_poll();
#ifdef MIPS
extern int sys_sigreturn();
extern int sys_accept();
extern int sys_bind();
extern int sys_connect();
extern int sys_gethostid();
extern int sys_getpeername();
extern int sys_getsockname();
extern int sys_getsockopt();
extern int sys_listen();
extern int sys_recv();
extern int sys_recvfrom();
extern int sys_recvmsg();
extern int sys_select();
extern int sys_send();
extern int sys_sendmsg();
extern int sys_sendto();
extern int sys_sethostid();
extern int sys_setsockopt();
extern int sys_shutdown();
extern int sys_socket();
extern int sys_gethostname();
extern int sys_sethostname();
extern int sys_getdomainname();
extern int sys_setdomainname();
extern int sys_truncate();
extern int sys_ftruncate();
extern int sys_rename();
extern int sys_symlink();
extern int sys_readlink();
extern int sys_nfssvc();
extern int sys_getfh();
extern int sys_async_daemon();
extern int sys_exportfs();
extern int sys_setregid();
extern int sys_setreuid();
extern int sys_getitimer();
extern int sys_setitimer();
extern int sys_adjtime();
extern int sys_BSD_getime();
extern int sys_sproc();
extern int sys_prctl();
extern int sys_procblk();
extern int sys_sprocsp();
extern int sys_mmap();
extern int sys_munmap();
extern int sys_mprotect();
extern int sys_msync();
extern int sys_madvise();
extern int sys_pagelock();
extern int sys_getpagesize();
extern int sys_quotactl();
extern int sys_BSDgetpgrp();
extern int sys_BSDsetpgrp();
extern int sys_vhangup();
extern int sys_fsync();
extern int sys_fchdir();
extern int sys_getrlimit();
extern int sys_setrlimit();
extern int sys_cacheflush();
extern int sys_cachectl();
extern int sys_fchown();
extern int sys_fchmod();
extern int sys_socketpair();
extern int sys_sysinfo();
extern int sys_nuname();
extern int sys_xstat();
extern int sys_lxstat();
extern int sys_fxstat();
extern int sys_xmknod();
extern int sys_ksigaction();
extern int sys_sigpending();
extern int sys_sigprocmask();
extern int sys_sigsuspend();
extern int sys_sigpoll();
extern int sys_swapctl();
extern int sys_getcontext();
extern int sys_setcontext();
extern int sys_waitsys();
extern int sys_sigstack();
extern int sys_sigaltstack();
extern int sys_sigsendset();
extern int sys_statvfs();
extern int sys_fstatvfs();
extern int sys_getpmsg();
extern int sys_putpmsg();
extern int sys_lchown();
extern int sys_priocntl();
extern int sys_ksigqueue();
#else /* !MIPS */
extern int sys_lstat();
extern int sys_symlink();
extern int sys_readlink();
extern int sys_setgroups();
extern int sys_getgroups();
extern int sys_fchmod();
extern int sys_fchown();
extern int sys_sigprocmask();
extern int sys_sigsuspend();
extern int sys_sigaltstack();
extern int sys_sigaction();
extern int sys_spcall();
extern int sys_context();
extern int sys_evsys();
extern int sys_evtrapret();
extern int sys_statvfs();
extern int sys_fstatvfs();
extern int sys_nfssys();
extern int sys_waitid();
extern int sys_sigsendsys();
extern int sys_hrtsys();
extern int sys_acancel();
extern int sys_async();
extern int sys_priocntlsys();
extern int sys_pathconf();
extern int sys_mincore();
extern int sys_mmap();
extern int sys_mprotect();
extern int sys_munmap();
extern int sys_fpathconf();
extern int sys_vfork();
extern int sys_fchdir();
extern int sys_readv();
extern int sys_writev();
extern int sys_xstat();
extern int sys_lxstat();
extern int sys_fxstat();
extern int sys_xmknod();
extern int sys_clocal();
extern int sys_setrlimit();
extern int sys_getrlimit();
extern int sys_lchown();
extern int sys_memcntl();
extern int sys_getpmsg();
extern int sys_putpmsg();
extern int sys_rename();
extern int sys_uname();
extern int sys_setegid();
extern int sys_sysconfig();
extern int sys_adjtime();
extern int sys_sysinfo();
extern int sys_seteuid();
extern int sys_vtrace();
extern int sys_fork1();
extern int sys_sigtimedwait();
extern int sys_lwp_info();
extern int sys_yield();
extern int sys_lwp_sema_wait();
extern int sys_lwp_sema_post();
extern int sys_modctl();
extern int sys_fchroot();
extern int sys_utimes();
extern int sys_vhangup();
extern int sys_gettimeofday();
extern int sys_getitimer();
extern int sys_setitimer();
extern int sys_lwp_create();
extern int sys_lwp_exit();
extern int sys_lwp_suspend();
extern int sys_lwp_continue();
extern int sys_lwp_kill();
extern int sys_lwp_self();
extern int sys_lwp_setprivate();
extern int sys_lwp_getprivate();
extern int sys_lwp_wait();
extern int sys_lwp_mutex_unlock();
extern int sys_lwp_mutex_lock();
extern int sys_lwp_cond_wait();
extern int sys_lwp_cond_signal();
extern int sys_lwp_cond_broadcast();
extern int sys_pread();
extern int sys_pwrite();
extern int sys_llseek();
extern int sys_inst_sync();
extern int sys_auditsys();
extern int sys_processor_bind();
extern int sys_processor_info();
extern int sys_p_online();
extern int sys_sigqueue();
extern int sys_clock_gettime();
extern int sys_clock_settime();
extern int sys_clock_getres();
extern int sys_timer_create();
extern int sys_timer_delete();
extern int sys_timer_settime();
extern int sys_timer_gettime();
extern int sys_timer_getoverrun();
extern int sys_nanosleep();
#endif /* !MIPS */
#ifdef MIPS
#define SGI_KLUDGE 1
#else
#define SGI_KLUDGE 0
#endif
/* sys_pgrpsys subcalls */
extern int sys_getpgrp(), sys_setpgrp(), sys_getsid();
extern int sys_setsid(), sys_getpgid(), sys_setpgid();
#ifndef MIPS
#define SYS_pgrpsys_subcall 300 + SGI_KLUDGE
#define SYS_getpgrp (SYS_pgrpsys_subcall + 0)
#define SYS_setpgrp (SYS_pgrpsys_subcall + 1)
#define SYS_getsid (SYS_pgrpsys_subcall + 2)
#define SYS_setsid (SYS_pgrpsys_subcall + 3)
#define SYS_getpgid (SYS_pgrpsys_subcall + 4)
#define SYS_setpgid (SYS_pgrpsys_subcall + 5)
#define SYS_pgrpsys_nsubcalls 6
#endif /* !MIPS */
/* sys_sigcall subcalls */
#undef SYS_signal
#define SYS_sigcall 48
extern int sys_signal(), sys_sigset(), sys_sighold();
extern int sys_sigrelse(), sys_sigignore(), sys_sigpause();
#ifndef MIPS
#define SYS_sigcall_subcall 310 + SGI_KLUDGE
#define SYS_signal (SYS_sigcall_subcall + 0)
#define SYS_sigset (SYS_sigcall_subcall + 1)
#define SYS_sighold (SYS_sigcall_subcall + 2)
#define SYS_sigrelse (SYS_sigcall_subcall + 3)
#define SYS_sigignore (SYS_sigcall_subcall + 4)
#define SYS_sigpause (SYS_sigcall_subcall + 5)
#define SYS_sigcall_nsubcalls 6
#endif /* !MIPS */
/* msgsys subcalls */
extern int sys_msgget(), sys_msgctl(), sys_msgrcv(), sys_msgsnd();
#define SYS_msgsys_subcall 320 + SGI_KLUDGE
#define SYS_msgget (SYS_msgsys_subcall + 0)
#define SYS_msgctl (SYS_msgsys_subcall + 1)
#define SYS_msgrcv (SYS_msgsys_subcall + 2)
#define SYS_msgsnd (SYS_msgsys_subcall + 3)
#define SYS_msgsys_nsubcalls 4
/* shmsys subcalls */
extern int sys_shmat(), sys_shmctl(), sys_shmdt(), sys_shmget();
#define SYS_shmsys_subcall 330 + SGI_KLUDGE
#define SYS_shmat (SYS_shmsys_subcall + 0)
#define SYS_shmctl (SYS_shmsys_subcall + 1)
#define SYS_shmdt (SYS_shmsys_subcall + 2)
#define SYS_shmget (SYS_shmsys_subcall + 3)
#define SYS_shmsys_nsubcalls 4
/* semsys subcalls */
extern int sys_semctl(), sys_semget(), sys_semop();
#define SYS_semsys_subcall 340 + SGI_KLUDGE
#define SYS_semctl (SYS_semsys_subcall + 0)
#define SYS_semget (SYS_semsys_subcall + 1)
#define SYS_semop (SYS_semsys_subcall + 2)
#define SYS_semsys_nsubcalls 3
/* utssys subcalls */
extern int sys_olduname(), sys_ustat(), sys_fusers();
#define SYS_utssys_subcall 350 + SGI_KLUDGE
#define SYS_olduname (SYS_utssys_subcall + 0)
/* 1 is unused */
#define SYS_ustat (SYS_utssys_subcall + 2)
#define SYS_fusers (SYS_utssys_subcall + 3)
#define SYS_utssys_nsubcalls 4
/* sysfs subcalls */
extern int sys_sysfs1(), sys_sysfs2(), sys_sysfs3();
#define SYS_sysfs_subcall 360 + SGI_KLUDGE
/* 0 is unused */
#define SYS_sysfs1 (SYS_sysfs_subcall + 1)
#define SYS_sysfs2 (SYS_sysfs_subcall + 2)
#define SYS_sysfs3 (SYS_sysfs_subcall + 3)
#define SYS_sysfs_nsubcalls 4
/* sys_spcall subcalls */
#undef SYS_sigpending
#define SYS_spcall 99
extern int sys_sigpending(), sys_sigfillset();
#define SYS_spcall_subcall 370 + SGI_KLUDGE
/* 0 is unused */
#define SYS_sigpending (SYS_spcall_subcall + 1)
#define SYS_sigfillset (SYS_spcall_subcall + 2)
#define SYS_spcall_nsubcalls 3
/* sys_context subcalls */
extern int sys_getcontext(), sys_setcontext();
#ifndef MIPS
#define SYS_context_subcall 380 + SGI_KLUDGE
#define SYS_getcontext (SYS_context_subcall + 0)
#define SYS_setcontext (SYS_context_subcall + 1)
#define SYS_context_nsubcalls 2
#endif /* !MIPS */

628
svr4/syscallent.h Normal file
View File

@ -0,0 +1,628 @@
/*
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#ifdef MIPS
{ -1, 0, printargs, "SYS_-1" }, /* -1 */
#endif /* MIPS */
{ -1, 0, sys_syscall, "syscall" }, /* 0 */
{ -1, TP, sys_exit, "_exit" }, /* 1 */
{ -1, TP, sys_fork, "fork" }, /* 2 */
{ -1, 0, sys_read, "read" }, /* 3 */
{ -1, 0, sys_write, "write" }, /* 4 */
{ -1, TF, sys_open, "open" }, /* 5 */
{ -1, 0, sys_close, "close" }, /* 6 */
{ -1, TP, sys_wait, "wait" }, /* 7 */
{ -1, TF, sys_creat, "creat" }, /* 8 */
{ -1, TF, sys_link, "link" }, /* 9 */
{ -1, TF, sys_unlink, "unlink" }, /* 10 */
{ -1, TF|TP, sys_exec, "exec" }, /* 11 */
{ -1, TF, sys_chdir, "chdir" }, /* 12 */
{ -1, 0, sys_time, "time" }, /* 13 */
{ -1, TF, sys_mknod, "mknod" }, /* 14 */
{ -1, TF, sys_chmod, "chmod" }, /* 15 */
{ -1, TF, sys_chown, "chown" }, /* 16 */
{ -1, 0, sys_brk, "brk" }, /* 17 */
{ -1, TF, sys_stat, "stat" }, /* 18 */
{ -1, 0, sys_lseek, "lseek" }, /* 19 */
{ -1, 0, sys_getpid, "getpid" }, /* 20 */
{ -1, TF, sys_mount, "mount" }, /* 21 */
{ -1, TF, sys_umount, "umount" }, /* 22 */
{ -1, 0, sys_setuid, "setuid" }, /* 23 */
{ -1, 0, sys_getuid, "getuid" }, /* 24 */
{ -1, 0, sys_stime, "stime" }, /* 25 */
{ -1, 0, sys_ptrace, "ptrace" }, /* 26 */
{ -1, 0, sys_alarm, "alarm" }, /* 27 */
{ -1, 0, sys_fstat, "fstat" }, /* 28 */
{ -1, TS, sys_pause, "pause" }, /* 29 */
{ -1, TF, sys_utime, "utime" }, /* 30 */
{ -1, 0, sys_stty, "stty" }, /* 31 */
{ -1, 0, sys_gtty, "gtty" }, /* 32 */
{ -1, TF, sys_access, "access" }, /* 33 */
{ -1, 0, sys_nice, "nice" }, /* 34 */
{ -1, TF, sys_statfs, "statfs" }, /* 35 */
{ -1, 0, sys_sync, "sync" }, /* 36 */
{ -1, TS, sys_kill, "kill" }, /* 37 */
{ -1, 0, sys_fstatfs, "fstatfs" }, /* 38 */
#ifdef MIPS
{ -1, 0, sys_setpgrp, "setpgrp" }, /* 39 */
#else /* !MIPS */
{ -1, 0, sys_pgrpsys, "pgrpsys" }, /* 39 */
#endif /* !MIPS */
#ifdef MIPS
{ -1, 0, sys_syssgi, "syssgi" }, /* 40 */
#else /* !MIPS */
{ -1, 0, sys_xenix, "xenix" }, /* 40 */
#endif /* !MIPS */
{ -1, 0, sys_dup, "dup" }, /* 41 */
{ -1, 0, sys_pipe, "pipe" }, /* 42 */
{ -1, 0, sys_times, "times" }, /* 43 */
{ -1, 0, sys_profil, "profil" }, /* 44 */
{ -1, 0, sys_plock, "plock" }, /* 45 */
{ -1, 0, sys_setgid, "setgid" }, /* 46 */
{ -1, 0, sys_getgid, "getgid" }, /* 47 */
{ -1, 0, sys_sigcall, "sigcall" }, /* 48 */
{ -1, TI, sys_msgsys, "msgsys" }, /* 49 */
#ifdef SPARC
{ -1, 0, sys_syssun, "syssun" }, /* 50 */
#else /* !SPARC */
#ifdef I386
{ -1, 0, sys_sysi86, "sysi86" }, /* 50 */
#else /* !I386 */
#ifdef MIPS
{ -1, 0, sys_sysmips, "sysmips" }, /* 50 */
#else /* !MIPS */
{ -1, 0, sys_sysmachine, "sysmachine" }, /* 50 */
#endif /* !MIPS */
#endif /* !I386 */
#endif /* !SPARC */
{ -1, TF, sys_acct, "acct" }, /* 51 */
{ -1, TI, sys_shmsys, "shmsys" }, /* 52 */
{ -1, TI, sys_semsys, "semsys" }, /* 53 */
{ -1, 0, sys_ioctl, "ioctl" }, /* 54 */
{ -1, 0, sys_uadmin, "uadmin" }, /* 55 */
{ -1, 0, sys_sysmp, "sysmp" }, /* 56 */
{ -1, 0, sys_utssys, "utssys" }, /* 57 */
{ -1, 0, sys_fdsync, "fdsync" }, /* 58 */
{ -1, TF|TP, sys_execve, "execve" }, /* 59 */
{ -1, 0, sys_umask, "umask" }, /* 60 */
{ -1, TF, sys_chroot, "chroot" }, /* 61 */
{ -1, 0, sys_fcntl, "fcntl" }, /* 62 */
{ -1, 0, sys_ulimit, "ulimit" }, /* 63 */
{ -1, 0, printargs, "SYS_64" }, /* 64 */
{ -1, 0, printargs, "SYS_65" }, /* 65 */
{ -1, 0, printargs, "SYS_66" }, /* 66 */
{ -1, 0, printargs, "SYS_67" }, /* 67 */
{ -1, 0, printargs, "SYS_68" }, /* 68 */
{ -1, 0, printargs, "SYS_69" }, /* 69 */
{ -1, 0, printargs, "SYS_70" }, /* 70 */
{ -1, 0, printargs, "SYS_71" }, /* 71 */
{ -1, 0, printargs, "SYS_72" }, /* 72 */
{ -1, 0, printargs, "SYS_73" }, /* 73 */
{ -1, 0, printargs, "SYS_74" }, /* 74 */
{ -1, 0, printargs, "SYS_75" }, /* 75 */
{ -1, 0, printargs, "SYS_76" }, /* 76 */
{ -1, 0, printargs, "SYS_77" }, /* 77 */
{ -1, 0, printargs, "SYS_78" }, /* 78 */
{ -1, TF, sys_rmdir, "rmdir" }, /* 79 */
{ -1, TF, sys_mkdir, "mkdir" }, /* 80 */
{ -1, 0, sys_getdents, "getdents" }, /* 81 */
{ -1, 0, sys_sginap, "sginap" }, /* 82 */
{ -1, 0, sys_sgikopt, "sgikopt" }, /* 83 */
{ -1, 0, sys_sysfs, "sysfs" }, /* 84 */
{ -1, TN, sys_getmsg, "getmsg" }, /* 85 */
{ -1, TN, sys_putmsg, "putmsg" }, /* 86 */
{ -1, TN, sys_poll, "poll" }, /* 87 */
#ifdef MIPS
{ -1, TS, sys_sigreturn, "sigreturn" }, /* 88 */
{ -1, TN, sys_accept, "accept" }, /* 89 */
{ -1, TN, sys_bind, "bind" }, /* 90 */
{ -1, TN, sys_connect, "connect" }, /* 91 */
{ -1, 0, sys_gethostid, "gethostid" }, /* 92 */
{ -1, TN, sys_getpeername, "getpeername" }, /* 93 */
{ -1, TN, sys_getsockname, "getsockname" }, /* 94 */
{ -1, TN, sys_getsockopt, "getsockopt" }, /* 95 */
{ -1, TN, sys_listen, "listen" }, /* 96 */
{ -1, TN, sys_recv, "recv" }, /* 97 */
{ -1, TN, sys_recvfrom, "recvfrom" }, /* 98 */
{ -1, TN, sys_recvmsg, "recvmsg" }, /* 99 */
{ -1, 0, sys_select, "select" }, /* 100 */
{ -1, TN, sys_send, "send" }, /* 101 */
{ -1, TN, sys_sendmsg, "sendmsg" }, /* 102 */
{ -1, TN, sys_sendto, "sendto" }, /* 103 */
{ -1, 0, sys_sethostid, "sethostid" }, /* 104 */
{ -1, TN, sys_setsockopt, "setsockopt" }, /* 105 */
{ -1, TN, sys_shutdown, "shutdown" }, /* 106 */
{ -1, TN, sys_socket, "socket" }, /* 107 */
{ -1, 0, sys_gethostname, "gethostname" }, /* 108 */
{ -1, 0, sys_sethostname, "sethostname" }, /* 109 */
{ -1, 0, sys_getdomainname, "getdomainname" }, /* 110 */
{ -1, 0, sys_setdomainname, "setdomainname" }, /* 111 */
{ -1, TF, sys_truncate, "truncate" }, /* 112 */
{ -1, 0, sys_ftruncate, "ftruncate" }, /* 113 */
{ -1, TF, sys_rename, "rename" }, /* 114 */
{ -1, TF, sys_symlink, "symlink" }, /* 115 */
{ -1, TF, sys_readlink, "readlink" }, /* 116 */
{ -1, 0, printargs, "SYS_117" }, /* 117 */
{ -1, 0, printargs, "SYS_118" }, /* 118 */
{ -1, 0, sys_nfssvc, "nfssvc" }, /* 119 */
{ -1, 0, sys_getfh, "getfh" }, /* 120 */
{ -1, 0, sys_async_daemon, "async_daemon" }, /* 121 */
{ -1, 0, sys_exportfs, "exportfs" }, /* 122 */
{ -1, 0, sys_setregid, "setregid" }, /* 123 */
{ -1, 0, sys_setreuid, "setreuid" }, /* 124 */
{ -1, 0, sys_getitimer, "getitimer" }, /* 125 */
{ -1, 0, sys_setitimer, "setitimer" }, /* 126 */
{ -1, 0, sys_adjtime, "adjtime" }, /* 127 */
{ -1, 0, sys_BSD_getime, "BSD_getime" }, /* 128 */
{ -1, 0, sys_sproc, "sproc" }, /* 129 */
{ -1, 0, sys_prctl, "prctl" }, /* 130 */
{ -1, 0, sys_procblk, "procblk" }, /* 131 */
{ -1, 0, sys_sprocsp, "sprocsp" }, /* 132 */
{ -1, 0, printargs, "SYS_133" }, /* 133 */
{ -1, 0, sys_mmap, "mmap" }, /* 134 */
{ -1, 0, sys_munmap, "munmap" }, /* 135 */
{ -1, 0, sys_mprotect, "mprotect" }, /* 136 */
{ -1, 0, sys_msync, "msync" }, /* 137 */
{ -1, 0, sys_madvise, "madvise" }, /* 138 */
{ -1, 0, sys_pagelock, "pagelock" }, /* 139 */
{ -1, 0, sys_getpagesize, "getpagesize" }, /* 140 */
{ -1, 0, sys_quotactl, "quotactl" }, /* 141 */
{ -1, 0, printargs, "SYS_142" }, /* 142 */
{ -1, 0, sys_BSDgetpgrp, "BSDgetpgrp" }, /* 143 */
{ -1, 0, sys_BSDsetpgrp, "BSDsetpgrp" }, /* 144 */
{ -1, 0, sys_vhangup, "vhangup" }, /* 145 */
{ -1, 0, sys_fsync, "fsync" }, /* 146 */
{ -1, 0, sys_fchdir, "fchdir" }, /* 147 */
{ -1, 0, sys_getrlimit, "getrlimit" }, /* 148 */
{ -1, 0, sys_setrlimit, "setrlimit" }, /* 149 */
{ -1, 0, sys_cacheflush, "cacheflush" }, /* 150 */
{ -1, 0, sys_cachectl, "cachectl" }, /* 151 */
{ -1, 0, sys_fchown, "fchown" }, /* 152 */
{ -1, 0, sys_fchmod, "fchmod" }, /* 153 */
{ -1, 0, printargs, "SYS_154" }, /* 154 */
{ -1, TN, sys_socketpair, "socketpair" }, /* 155 */
{ -1, 0, sys_sysinfo, "sysinfo" }, /* 156 */
{ -1, 0, sys_nuname, "nuname" }, /* 157 */
{ -1, TF, sys_xstat, "xstat" }, /* 158 */
{ -1, TF, sys_lxstat, "lxstat" }, /* 159 */
{ -1, 0, sys_fxstat, "fxstat" }, /* 160 */
{ -1, TF, sys_xmknod, "xmknod" }, /* 161 */
{ -1, TS, sys_ksigaction, "sigaction" }, /* 162 */
{ -1, TS, sys_sigpending, "sigpending" }, /* 163 */
{ -1, TS, sys_sigprocmask, "sigprocmask" }, /* 164 */
{ -1, TS, sys_sigsuspend, "sigsuspend" }, /* 165 */
{ -1, TS, sys_sigpoll, "sigpoll" }, /* 166 */
{ -1, 0, sys_swapctl, "swapctl" }, /* 167 */
{ -1, 0, sys_getcontext, "getcontext" }, /* 168 */
{ -1, 0, sys_setcontext, "setcontext" }, /* 169 */
{ -1, TP, sys_waitsys, "waitid" }, /* 170 */
{ -1, TS, sys_sigstack, "sigstack" }, /* 171 */
{ -1, TS, sys_sigaltstack, "sigaltstack" }, /* 172 */
{ -1, TS, sys_sigsendset, "sigsendset" }, /* 173 */
{ -1, TF, sys_statvfs, "statvfs" }, /* 174 */
{ -1, 0, sys_fstatvfs, "fstatvfs" }, /* 175 */
{ -1, TN, sys_getpmsg, "getpmsg" }, /* 176 */
{ -1, TN, sys_putpmsg, "putpmsg" }, /* 177 */
{ -1, TF, sys_lchown, "lchown" }, /* 178 */
{ -1, 0, sys_priocntl, "priocntl" }, /* 179 */
{ -1, TS, sys_ksigqueue, "ksigqueue" }, /* 180 */
{ -1, 0, printargs, "SYS_181" }, /* 181 */
{ -1, 0, printargs, "SYS_182" }, /* 182 */
{ -1, 0, printargs, "SYS_183" }, /* 183 */
{ -1, 0, printargs, "SYS_184" }, /* 184 */
{ -1, 0, printargs, "SYS_185" }, /* 185 */
{ -1, 0, printargs, "SYS_186" }, /* 186 */
{ -1, 0, printargs, "SYS_187" }, /* 187 */
{ -1, 0, printargs, "SYS_188" }, /* 188 */
{ -1, 0, printargs, "SYS_189" }, /* 189 */
{ -1, 0, printargs, "SYS_190" }, /* 190 */
{ -1, 0, printargs, "SYS_191" }, /* 191 */
{ -1, 0, printargs, "SYS_192" }, /* 192 */
{ -1, 0, printargs, "SYS_193" }, /* 193 */
{ -1, 0, printargs, "SYS_194" }, /* 194 */
{ -1, 0, printargs, "SYS_195" }, /* 195 */
{ -1, 0, printargs, "SYS_196" }, /* 196 */
{ -1, 0, printargs, "SYS_197" }, /* 197 */
{ -1, 0, printargs, "SYS_198" }, /* 198 */
{ -1, 0, printargs, "SYS_199" }, /* 199 */
{ -1, 0, printargs, "SYS_200" }, /* 200 */
{ -1, 0, printargs, "SYS_201" }, /* 201 */
{ -1, 0, printargs, "SYS_202" }, /* 202 */
{ -1, 0, printargs, "SYS_203" }, /* 203 */
{ -1, 0, printargs, "SYS_204" }, /* 204 */
{ -1, 0, printargs, "SYS_205" }, /* 205 */
{ -1, 0, printargs, "SYS_206" }, /* 206 */
{ -1, 0, printargs, "SYS_207" }, /* 207 */
{ -1, 0, printargs, "SYS_208" }, /* 208 */
{ -1, 0, printargs, "SYS_209" }, /* 209 */
{ -1, 0, printargs, "SYS_210" }, /* 210 */
{ -1, 0, printargs, "SYS_211" }, /* 211 */
{ -1, 0, printargs, "SYS_212" }, /* 212 */
{ -1, 0, printargs, "SYS_213" }, /* 213 */
{ -1, 0, printargs, "SYS_214" }, /* 214 */
{ -1, 0, printargs, "SYS_215" }, /* 215 */
{ -1, 0, printargs, "SYS_216" }, /* 216 */
{ -1, 0, printargs, "SYS_217" }, /* 217 */
{ -1, 0, printargs, "SYS_218" }, /* 218 */
{ -1, 0, printargs, "SYS_219" }, /* 219 */
{ -1, 0, printargs, "SYS_220" }, /* 220 */
{ -1, 0, printargs, "SYS_221" }, /* 221 */
{ -1, 0, printargs, "SYS_222" }, /* 222 */
{ -1, 0, printargs, "SYS_223" }, /* 223 */
{ -1, 0, printargs, "SYS_224" }, /* 224 */
{ -1, 0, printargs, "SYS_225" }, /* 225 */
{ -1, 0, printargs, "SYS_226" }, /* 226 */
{ -1, 0, printargs, "SYS_227" }, /* 227 */
{ -1, 0, printargs, "SYS_228" }, /* 228 */
{ -1, 0, printargs, "SYS_229" }, /* 229 */
{ -1, 0, printargs, "SYS_230" }, /* 230 */
{ -1, 0, printargs, "SYS_231" }, /* 231 */
{ -1, 0, printargs, "SYS_232" }, /* 232 */
{ -1, 0, printargs, "SYS_233" }, /* 233 */
{ -1, 0, printargs, "SYS_234" }, /* 234 */
{ -1, 0, printargs, "SYS_235" }, /* 235 */
{ -1, 0, printargs, "SYS_236" }, /* 236 */
{ -1, 0, printargs, "SYS_237" }, /* 237 */
{ -1, 0, printargs, "SYS_238" }, /* 238 */
{ -1, 0, printargs, "SYS_239" }, /* 239 */
{ -1, 0, printargs, "SYS_240" }, /* 240 */
{ -1, 0, printargs, "SYS_241" }, /* 241 */
{ -1, 0, printargs, "SYS_242" }, /* 242 */
{ -1, 0, printargs, "SYS_243" }, /* 243 */
{ -1, 0, printargs, "SYS_244" }, /* 244 */
{ -1, 0, printargs, "SYS_245" }, /* 245 */
{ -1, 0, printargs, "SYS_246" }, /* 246 */
{ -1, 0, printargs, "SYS_247" }, /* 247 */
{ -1, 0, printargs, "SYS_248" }, /* 248 */
{ -1, 0, printargs, "SYS_249" }, /* 249 */
{ -1, 0, printargs, "SYS_250" }, /* 250 */
#else /* !MIPS */
{ -1, TF, sys_lstat, "lstat" }, /* 88 */
{ -1, TF, sys_symlink, "symlink" }, /* 89 */
{ -1, TF, sys_readlink, "readlink" }, /* 90 */
{ -1, 0, sys_setgroups, "setgroups" }, /* 91 */
{ -1, 0, sys_getgroups, "getgroups" }, /* 92 */
{ -1, 0, sys_fchmod, "fchmod" }, /* 93 */
{ -1, 0, sys_fchown, "fchown" }, /* 94 */
{ -1, TS, sys_sigprocmask, "sigprocmask" }, /* 95 */
{ -1, TS, sys_sigsuspend, "sigsuspend" }, /* 96 */
{ -1, TS, sys_sigaltstack, "sigaltstack" }, /* 97 */
{ -1, TS, sys_sigaction, "sigaction" }, /* 98 */
{ -1, 0, sys_spcall, "spcall" }, /* 99 */
{ -1, 0, sys_context, "context" }, /* 100 */
{ -1, 0, sys_evsys, "evsys" }, /* 101 */
{ -1, 0, sys_evtrapret, "evtrapret" }, /* 102 */
{ -1, TF, sys_statvfs, "statvfs" }, /* 103 */
{ -1, 0, sys_fstatvfs, "fstatvfs" }, /* 104 */
{ -1, 0, printargs, "SYS_105" }, /* 105 */
{ -1, 0, sys_nfssys, "nfssys" }, /* 106 */
{ -1, TP, sys_waitid, "waitid" }, /* 107 */
{ -1, 0, sys_sigsendsys, "sigsendsys" }, /* 108 */
{ -1, 0, sys_hrtsys, "hrtsys" }, /* 109 */
{ -1, 0, sys_acancel, "acancel" }, /* 110 */
{ -1, 0, sys_async, "async" }, /* 111 */
{ -1, 0, sys_priocntlsys, "priocntlsys" }, /* 112 */
{ -1, TF, sys_pathconf, "pathconf" }, /* 113 */
{ -1, 0, sys_mincore, "mincore" }, /* 114 */
{ -1, 0, sys_mmap, "mmap" }, /* 115 */
{ -1, 0, sys_mprotect, "mprotect" }, /* 116 */
{ -1, 0, sys_munmap, "munmap" }, /* 117 */
{ -1, 0, sys_fpathconf, "fpathconf" }, /* 118 */
{ -1, TP, sys_vfork, "vfork" }, /* 119 */
{ -1, 0, sys_fchdir, "fchdir" }, /* 120 */
{ -1, 0, sys_readv, "readv" }, /* 121 */
{ -1, 0, sys_writev, "writev" }, /* 122 */
{ -1, TF, sys_xstat, "xstat" }, /* 123 */
{ -1, TF, sys_lxstat, "lxstat" }, /* 124 */
{ -1, 0, sys_fxstat, "fxstat" }, /* 125 */
{ -1, TF, sys_xmknod, "xmknod" }, /* 126 */
{ -1, 0, sys_clocal, "clocal" }, /* 127 */
{ -1, 0, sys_setrlimit, "setrlimit" }, /* 128 */
{ -1, 0, sys_getrlimit, "getrlimit" }, /* 129 */
{ -1, TF, sys_lchown, "lchown" }, /* 130 */
{ -1, 0, sys_memcntl, "memcntl" }, /* 131 */
{ -1, TN, sys_getpmsg, "getpmsg" }, /* 132 */
{ -1, TN, sys_putpmsg, "putpmsg" }, /* 133 */
{ -1, TF, sys_rename, "rename" }, /* 134 */
{ -1, 0, sys_uname, "uname" }, /* 135 */
{ -1, 0, sys_setegid, "setegid" }, /* 136 */
{ -1, 0, sys_sysconfig, "sysconfig" }, /* 137 */
{ -1, 0, sys_adjtime, "adjtime" }, /* 138 */
{ -1, 0, sys_sysinfo, "sysinfo" }, /* 139 */
{ -1, 0, printargs, "SYS_140" }, /* 140 */
{ -1, 0, sys_seteuid, "seteuid" }, /* 141 */
{ -1, 0, sys_vtrace, "vtrace" }, /* 142 */
{ -1, TP, sys_fork1, "fork1" }, /* 143 */
{ -1, TS, sys_sigtimedwait, "sigtimedwait" }, /* 144 */
{ -1, 0, sys_lwp_info, "lwp_info" }, /* 145 */
{ -1, 0, sys_yield, "yield" }, /* 146 */
{ -1, 0, sys_lwp_sema_wait, "lwp_sema_wait" }, /* 147 */
{ -1, 0, sys_lwp_sema_post, "lwp_sema_post" }, /* 148 */
{ -1, 0, printargs, "SYS_149" }, /* 149 */
{ -1, 0, printargs, "SYS_150" }, /* 150 */
{ -1, 0, printargs, "SYS_151" }, /* 151 */
{ -1, 0, sys_modctl, "modctl" }, /* 152 */
{ -1, 0, sys_fchroot, "fchroot" }, /* 153 */
{ -1, TF, sys_utimes, "utimes" }, /* 154 */
{ -1, 0, sys_vhangup, "vhangup" }, /* 155 */
{ -1, 0, sys_gettimeofday, "gettimeofday" }, /* 156 */
{ -1, 0, sys_getitimer, "getitimer" }, /* 157 */
{ -1, 0, sys_setitimer, "setitimer" }, /* 158 */
{ -1, 0, sys_lwp_create, "lwp_create" }, /* 159 */
{ -1, 0, sys_lwp_exit, "lwp_exit" }, /* 160 */
{ -1, 0, sys_lwp_suspend, "lwp_suspend" }, /* 161 */
{ -1, 0, sys_lwp_continue, "lwp_continue" }, /* 162 */
{ -1, 0, sys_lwp_kill, "lwp_kill" }, /* 163 */
{ -1, 0, sys_lwp_self, "lwp_self" }, /* 164 */
{ -1, 0, sys_lwp_setprivate, "lwp_setprivate"}, /* 165 */
{ -1, 0, sys_lwp_getprivate, "lwp_getprivate"}, /* 166 */
{ -1, 0, sys_lwp_wait, "lwp_wait" }, /* 167 */
{ -1, 0, sys_lwp_mutex_unlock, "lwp_mutex_unlock"}, /* 168 */
{ -1, 0, sys_lwp_mutex_lock, "lwp_mutex_lock"}, /* 169 */
{ -1, 0, sys_lwp_cond_wait, "lwp_cond_wait"}, /* 170 */
{ -1, 0, sys_lwp_cond_signal, "lwp_cond_signal"}, /* 171 */
{ -1, 0, sys_lwp_cond_broadcast, "lwp_cond_broadcast"}, /* 172 */
{ -1, 0, sys_pread, "pread" }, /* 173 */
{ -1, 0, sys_pwrite, "pwrite" }, /* 174 */
{ -1, 0, sys_llseek, "llseek" }, /* 175 */
{ -1, 0, sys_inst_sync, "inst_sync" }, /* 176 */
{ -1, 0, printargs, "SYS_177" }, /* 177 */
{ -1, 0, printargs, "SYS_178" }, /* 178 */
{ -1, 0, printargs, "SYS_179" }, /* 179 */
{ -1, 0, printargs, "SYS_180" }, /* 180 */
{ -1, 0, printargs, "SYS_181" }, /* 181 */
{ -1, 0, printargs, "SYS_182" }, /* 182 */
{ -1, 0, printargs, "SYS_183" }, /* 183 */
{ -1, 0, printargs, "SYS_184" }, /* 184 */
{ -1, 0, printargs, "SYS_185" }, /* 185 */
{ -1, 0, sys_auditsys, "auditsys" }, /* 186 */
{ -1, 0, sys_processor_bind, "processor_bind"}, /* 187 */
{ -1, 0, sys_processor_info, "processor_info"}, /* 188 */
{ -1, 0, sys_p_online, "p_online" }, /* 189 */
{ -1, 0, sys_sigqueue, "sigqueue" }, /* 190 */
{ -1, 0, sys_clock_gettime, "clock_gettime" }, /* 191 */
{ -1, 0, sys_clock_settime, "clock_settime" }, /* 192 */
{ -1, 0, sys_clock_getres, "clock_getres" }, /* 193 */
{ -1, 0, sys_timer_create, "timer_create" }, /* 194 */
{ -1, 0, sys_timer_delete, "timer_delete" }, /* 195 */
{ -1, 0, sys_timer_settime, "timer_settime" }, /* 196 */
{ -1, 0, sys_timer_gettime, "timer_gettime" }, /* 197 */
{ -1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 198 */
{ -1, 0, sys_nanosleep, "nanosleep" }, /* 199 */
{ -1, 0, printargs, "SYS_200" }, /* 200 */
{ -1, 0, printargs, "SYS_201" }, /* 201 */
{ -1, 0, printargs, "SYS_202" }, /* 202 */
{ -1, 0, printargs, "SYS_203" }, /* 203 */
{ -1, 0, printargs, "SYS_204" }, /* 204 */
{ -1, 0, printargs, "SYS_205" }, /* 205 */
{ -1, 0, printargs, "SYS_206" }, /* 206 */
{ -1, 0, printargs, "SYS_207" }, /* 207 */
{ -1, 0, printargs, "SYS_208" }, /* 208 */
{ -1, 0, printargs, "SYS_209" }, /* 209 */
{ -1, 0, printargs, "SYS_210" }, /* 210 */
{ -1, 0, printargs, "SYS_211" }, /* 211 */
{ -1, 0, printargs, "SYS_212" }, /* 212 */
{ -1, 0, printargs, "SYS_213" }, /* 213 */
{ -1, 0, printargs, "SYS_214" }, /* 214 */
{ -1, 0, printargs, "SYS_215" }, /* 215 */
{ -1, 0, printargs, "SYS_216" }, /* 216 */
{ -1, 0, printargs, "SYS_217" }, /* 217 */
{ -1, 0, printargs, "SYS_218" }, /* 218 */
{ -1, 0, printargs, "SYS_219" }, /* 219 */
{ -1, 0, printargs, "SYS_220" }, /* 220 */
{ -1, 0, printargs, "SYS_221" }, /* 221 */
{ -1, 0, printargs, "SYS_222" }, /* 222 */
{ -1, 0, printargs, "SYS_223" }, /* 223 */
{ -1, 0, printargs, "SYS_224" }, /* 224 */
{ -1, 0, printargs, "SYS_225" }, /* 225 */
{ -1, 0, printargs, "SYS_226" }, /* 226 */
{ -1, 0, printargs, "SYS_227" }, /* 227 */
{ -1, 0, printargs, "SYS_228" }, /* 228 */
{ -1, 0, printargs, "SYS_229" }, /* 229 */
{ -1, 0, printargs, "SYS_230" }, /* 230 */
{ -1, 0, printargs, "SYS_231" }, /* 231 */
{ -1, 0, printargs, "SYS_232" }, /* 232 */
{ -1, 0, printargs, "SYS_233" }, /* 233 */
{ -1, 0, printargs, "SYS_234" }, /* 234 */
{ -1, 0, printargs, "SYS_235" }, /* 235 */
{ -1, 0, printargs, "SYS_236" }, /* 236 */
{ -1, 0, printargs, "SYS_237" }, /* 237 */
{ -1, 0, printargs, "SYS_238" }, /* 238 */
{ -1, 0, printargs, "SYS_239" }, /* 239 */
{ -1, 0, printargs, "SYS_240" }, /* 240 */
{ -1, 0, printargs, "SYS_241" }, /* 241 */
{ -1, 0, printargs, "SYS_242" }, /* 242 */
{ -1, 0, printargs, "SYS_243" }, /* 243 */
{ -1, 0, printargs, "SYS_244" }, /* 244 */
{ -1, 0, printargs, "SYS_245" }, /* 245 */
{ -1, 0, printargs, "SYS_246" }, /* 246 */
{ -1, 0, printargs, "SYS_247" }, /* 247 */
{ -1, 0, printargs, "SYS_248" }, /* 248 */
{ -1, 0, printargs, "SYS_249" }, /* 249 */
{ -1, 0, printargs, "SYS_250" }, /* 250 */
#endif /* !MIPS */
{ -1, 0, printargs, "SYS_251" }, /* 251 */
{ -1, 0, printargs, "SYS_252" }, /* 252 */
{ -1, 0, printargs, "SYS_253" }, /* 253 */
{ -1, 0, printargs, "SYS_254" }, /* 254 */
{ -1, 0, printargs, "SYS_255" }, /* 255 */
{ -1, 0, printargs, "SYS_256" }, /* 256 */
{ -1, 0, printargs, "SYS_257" }, /* 257 */
{ -1, 0, printargs, "SYS_258" }, /* 258 */
{ -1, 0, printargs, "SYS_259" }, /* 259 */
{ -1, 0, printargs, "SYS_260" }, /* 260 */
{ -1, 0, printargs, "SYS_261" }, /* 261 */
{ -1, 0, printargs, "SYS_262" }, /* 262 */
{ -1, 0, printargs, "SYS_263" }, /* 263 */
{ -1, 0, printargs, "SYS_264" }, /* 264 */
{ -1, 0, printargs, "SYS_265" }, /* 265 */
{ -1, 0, printargs, "SYS_266" }, /* 266 */
{ -1, 0, printargs, "SYS_267" }, /* 267 */
{ -1, 0, printargs, "SYS_268" }, /* 268 */
{ -1, 0, printargs, "SYS_269" }, /* 269 */
{ -1, 0, printargs, "SYS_270" }, /* 270 */
{ -1, 0, printargs, "SYS_271" }, /* 271 */
{ -1, 0, printargs, "SYS_272" }, /* 272 */
{ -1, 0, printargs, "SYS_273" }, /* 273 */
{ -1, 0, printargs, "SYS_274" }, /* 274 */
{ -1, 0, printargs, "SYS_275" }, /* 275 */
{ -1, 0, printargs, "SYS_276" }, /* 276 */
{ -1, 0, printargs, "SYS_277" }, /* 277 */
{ -1, 0, printargs, "SYS_278" }, /* 278 */
{ -1, 0, printargs, "SYS_279" }, /* 279 */
{ -1, 0, printargs, "SYS_280" }, /* 280 */
{ -1, 0, printargs, "SYS_281" }, /* 281 */
{ -1, 0, printargs, "SYS_282" }, /* 282 */
{ -1, 0, printargs, "SYS_283" }, /* 283 */
{ -1, 0, printargs, "SYS_284" }, /* 284 */
{ -1, 0, printargs, "SYS_285" }, /* 285 */
{ -1, 0, printargs, "SYS_286" }, /* 286 */
{ -1, 0, printargs, "SYS_287" }, /* 287 */
{ -1, 0, printargs, "SYS_288" }, /* 288 */
{ -1, 0, printargs, "SYS_289" }, /* 289 */
{ -1, 0, printargs, "SYS_290" }, /* 290 */
{ -1, 0, printargs, "SYS_291" }, /* 291 */
{ -1, 0, printargs, "SYS_292" }, /* 292 */
{ -1, 0, printargs, "SYS_293" }, /* 293 */
{ -1, 0, printargs, "SYS_294" }, /* 294 */
{ -1, 0, printargs, "SYS_295" }, /* 295 */
{ -1, 0, printargs, "SYS_296" }, /* 296 */
{ -1, 0, printargs, "SYS_297" }, /* 297 */
{ -1, 0, printargs, "SYS_298" }, /* 298 */
{ -1, 0, printargs, "SYS_299" }, /* 299 */
{ -1, 0, sys_getpgrp, "getpgrp" }, /* 300 */
{ -1, 0, sys_setpgrp, "setpgrp" }, /* 301 */
{ -1, 0, sys_getsid, "getsid" }, /* 302 */
{ -1, 0, sys_setsid, "setsid" }, /* 303 */
{ -1, 0, sys_getpgid, "getpgid" }, /* 304 */
{ -1, 0, sys_setpgid, "setpgid" }, /* 305 */
{ -1, 0, printargs, "SYS_306" }, /* 306 */
{ -1, 0, printargs, "SYS_307" }, /* 307 */
{ -1, 0, printargs, "SYS_308" }, /* 308 */
{ -1, 0, printargs, "SYS_309" }, /* 309 */
{ -1, TS, sys_signal, "signal" }, /* 310 */
{ -1, TS, sys_sigset, "sigset" }, /* 311 */
{ -1, TS, sys_sighold, "sighold" }, /* 312 */
{ -1, TS, sys_sigrelse, "sigrelse" }, /* 313 */
{ -1, TS, sys_sigignore, "sigignore" }, /* 314 */
{ -1, TS, sys_sigpause, "sigpause" }, /* 315 */
{ -1, 0, printargs, "SYS_316" }, /* 316 */
{ -1, 0, printargs, "SYS_317" }, /* 317 */
{ -1, 0, printargs, "SYS_318" }, /* 318 */
{ -1, 0, printargs, "SYS_319" }, /* 319 */
{ -1, TI, sys_msgget, "msgget" }, /* 320 */
{ -1, TI, sys_msgctl, "msgctl" }, /* 321 */
{ -1, TI, sys_msgrcv, "msgrcv" }, /* 322 */
{ -1, TI, sys_msgsnd, "msgsnd" }, /* 323 */
{ -1, 0, printargs, "SYS_324" }, /* 324 */
{ -1, 0, printargs, "SYS_325" }, /* 325 */
{ -1, 0, printargs, "SYS_326" }, /* 326 */
{ -1, 0, printargs, "SYS_327" }, /* 327 */
{ -1, 0, printargs, "SYS_328" }, /* 328 */
{ -1, 0, printargs, "SYS_329" }, /* 329 */
{ -1, TI, sys_shmat, "shmat" }, /* 330 */
{ -1, TI, sys_shmctl, "shmctl" }, /* 331 */
{ -1, TI, sys_shmdt, "shmdt" }, /* 332 */
{ -1, TI, sys_shmget, "shmget" }, /* 333 */
{ -1, 0, printargs, "SYS_334" }, /* 334 */
{ -1, 0, printargs, "SYS_335" }, /* 335 */
{ -1, 0, printargs, "SYS_336" }, /* 336 */
{ -1, 0, printargs, "SYS_337" }, /* 337 */
{ -1, 0, printargs, "SYS_338" }, /* 338 */
{ -1, 0, printargs, "SYS_339" }, /* 339 */
{ -1, TI, sys_semctl, "semctl" }, /* 340 */
{ -1, TI, sys_semget, "semget" }, /* 341 */
{ -1, TI, sys_semop, "semop" }, /* 342 */
{ -1, 0, printargs, "SYS_343" }, /* 343 */
{ -1, 0, printargs, "SYS_344" }, /* 344 */
{ -1, 0, printargs, "SYS_345" }, /* 345 */
{ -1, 0, printargs, "SYS_346" }, /* 346 */
{ -1, 0, printargs, "SYS_347" }, /* 347 */
{ -1, 0, printargs, "SYS_348" }, /* 348 */
{ -1, 0, printargs, "SYS_349" }, /* 349 */
{ -1, 0, sys_olduname, "olduname" }, /* 350 */
{ -1, 0, printargs, "utssys1" }, /* 351 */
{ -1, 0, sys_ustat, "ustat" }, /* 352 */
{ -1, 0, sys_fusers, "fusers" }, /* 353 */
{ -1, 0, printargs, "SYS_354" }, /* 354 */
{ -1, 0, printargs, "SYS_355" }, /* 355 */
{ -1, 0, printargs, "SYS_356" }, /* 356 */
{ -1, 0, printargs, "SYS_357" }, /* 357 */
{ -1, 0, printargs, "SYS_358" }, /* 358 */
{ -1, 0, printargs, "SYS_359" }, /* 359 */
{ -1, 0, printargs, "sysfs0" }, /* 360 */
{ -1, 0, sys_sysfs1, "sysfs1" }, /* 361 */
{ -1, 0, sys_sysfs2, "sysfs2" }, /* 362 */
{ -1, 0, sys_sysfs3, "sysfs3" }, /* 363 */
{ -1, 0, printargs, "SYS_364" }, /* 364 */
{ -1, 0, printargs, "SYS_365" }, /* 365 */
{ -1, 0, printargs, "SYS_366" }, /* 366 */
{ -1, 0, printargs, "SYS_367" }, /* 367 */
{ -1, 0, printargs, "SYS_368" }, /* 368 */
{ -1, 0, printargs, "SYS_369" }, /* 369 */
{ -1, 0, printargs, "spcall0" }, /* 370 */
{ -1, TS, sys_sigpending, "sigpending" }, /* 371 */
{ -1, TS, sys_sigfillset, "sigfillset" }, /* 372 */
{ -1, 0, printargs, "SYS_373" }, /* 373 */
{ -1, 0, printargs, "SYS_374" }, /* 374 */
{ -1, 0, printargs, "SYS_375" }, /* 375 */
{ -1, 0, printargs, "SYS_376" }, /* 376 */
{ -1, 0, printargs, "SYS_377" }, /* 377 */
{ -1, 0, printargs, "SYS_378" }, /* 378 */
{ -1, 0, printargs, "SYS_379" }, /* 379 */
{ -1, 0, sys_getcontext, "getcontext" }, /* 380 */
{ -1, 0, sys_setcontext, "setcontext" }, /* 381 */
{ -1, 0, printargs, "SYS_382" }, /* 382 */
{ -1, 0, printargs, "SYS_383" }, /* 383 */
{ -1, 0, printargs, "SYS_384" }, /* 384 */
{ -1, 0, printargs, "SYS_385" }, /* 385 */
{ -1, 0, printargs, "SYS_386" }, /* 386 */
{ -1, 0, printargs, "SYS_387" }, /* 387 */
{ -1, 0, printargs, "SYS_388" }, /* 388 */
{ -1, 0, printargs, "SYS_389" }, /* 389 */
{ -1, 0, printargs, "SYS_390" }, /* 390 */
{ -1, 0, printargs, "SYS_391" }, /* 391 */
{ -1, 0, printargs, "SYS_392" }, /* 392 */
{ -1, 0, printargs, "SYS_393" }, /* 393 */
{ -1, 0, printargs, "SYS_394" }, /* 394 */
{ -1, 0, printargs, "SYS_395" }, /* 395 */
{ -1, 0, printargs, "SYS_396" }, /* 396 */
{ -1, 0, printargs, "SYS_397" }, /* 397 */
{ -1, 0, printargs, "SYS_398" }, /* 398 */
{ -1, 0, printargs, "SYS_399" }, /* 399 */

1431
syscall.c Normal file

File diff suppressed because it is too large Load Diff

73
syscallent.sh Normal file
View File

@ -0,0 +1,73 @@
#!/bin/sh
# Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
# 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$
cat $* |
sed -n 's/^#[ ]*define[ ][ ]*SYS_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p' |
sort +1n |
awk '
BEGIN {
tabs = "\t\t\t\t\t\t\t\t"
call = -1;
}
{
while (++call < $2) {
f = "printargs"
n = "SYS_" call
s = "\t{ -1,\t0,\t"
s = s f ","
s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
s = s "\"" n "\""
s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
s = s "}, /* " call " */"
print s
}
f = "sys_" $1
n = $1
s = "\t{ -1,\t0,\t"
s = s f ","
s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
s = s "\"" n "\""
s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
s = s "}, /* " call " */"
print s
}
END {
limit = call + 100
while (++call < limit) {
f = "printargs"
n = "SYS_" call
s = "\t{ -1,\t0,\t"
s = s f ","
s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
s = s "\"" n "\""
s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
s = s "}, /* " call " */"
print s
}
}
'

886
system.c Normal file
View File

@ -0,0 +1,886 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#ifdef LINUX
#define _LINUX_SOCKET_H
#define MS_RDONLY 1 /* Mount read-only */
#define MS_NOSUID 2 /* Ignore suid and sgid bits */
#define MS_NODEV 4 /* Disallow access to device special files */
#define MS_NOEXEC 8 /* Disallow program execution */
#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef LINUX
/* Workaround for kernel namespace pollution. */
#define sys_personality kernel_sys_personality
#include <linux/personality.h>
#undef sys_personality
#endif /* __NR_personality */
#ifdef __NR_capget
#include <linux/capability.h>
#endif
static struct xlat mount_flags[] = {
{ MS_RDONLY, "MS_RDONLY" },
{ MS_NOSUID, "MS_NOSUID" },
{ MS_NODEV, "MS_NODEV" },
{ MS_NOEXEC, "MS_NOEXEC" },
#ifdef MS_SYNCHRONOUS
{ MS_SYNCHRONOUS,"MS_SYNCHRONOUS"},
#else
{ MS_SYNC, "MS_SYNC" },
#endif
{ MS_REMOUNT, "MS_REMOUNT" },
{ 0, NULL },
};
int
sys_mount(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
tprintf(", ");
printpath(tcp, tcp->u_arg[1]);
tprintf(", ");
printpath(tcp, tcp->u_arg[2]);
tprintf(", ");
printflags(mount_flags, tcp->u_arg[3]);
tprintf(", %#lx", tcp->u_arg[4]);
}
return 0;
}
static struct xlat personality_options[] = {
#ifdef PER_LINUX
{ PER_LINUX, "PER_LINUX" },
#endif
#ifdef PER_LINUX_32BIT
{ PER_LINUX_32BIT, "PER_LINUX" },
#endif
#ifdef PER_SVR4
{ PER_SVR4, "PER_SVR4" },
#endif
#ifdef PER_SVR3
{ PER_SVR3, "PER_SVR3" },
#endif
#ifdef PER_SCOSVR3
{ PER_SCOSVR3, "PER_SCOSVR3" },
#endif
#ifdef PER_WYSEV386
{ PER_WYSEV386, "PER_WYSEV386" },
#endif
#ifdef PER_ISCR4
{ PER_ISCR4, "PER_ISCR4" },
#endif
#ifdef PER_BSD
{ PER_BSD, "PER_BSD" },
#endif
#ifdef PER_XENIX
{ PER_XENIX, "PER_XENIX" },
#endif
{ 0, NULL },
};
int
sys_personality(tcp)
struct tcb *tcp;
{
if (entering(tcp))
printxval(personality_options, tcp->u_arg[0], "PER_???");
return 0;
}
#endif /* LINUX */
#ifdef SUNOS4
#include <sys/reboot.h>
#define NFSCLIENT
#define LOFS
#define RFS
#define PCFS
#include <sys/mount.h>
#include <sys/socket.h>
#include <nfs/export.h>
#include <rpc/types.h>
#include <rpc/auth.h>
/*ARGSUSED*/
int
sys_sync(tcp)
struct tcb *tcp;
{
return 0;
}
static struct xlat bootflags[] = {
{ RB_AUTOBOOT, "RB_AUTOBOOT" }, /* for system auto-booting itself */
{ RB_ASKNAME, "RB_ASKNAME" }, /* ask for file name to reboot from */
{ RB_SINGLE, "RB_SINGLE" }, /* reboot to single user only */
{ RB_NOSYNC, "RB_NOSYNC" }, /* dont sync before reboot */
{ RB_HALT, "RB_HALT" }, /* don't reboot, just halt */
{ RB_INITNAME, "RB_INITNAME" }, /* name given for /etc/init */
{ RB_NOBOOTRC, "RB_NOBOOTRC" }, /* don't run /etc/rc.boot */
{ RB_DEBUG, "RB_DEBUG" }, /* being run under debugger */
{ RB_DUMP, "RB_DUMP" }, /* dump system core */
{ RB_WRITABLE, "RB_WRITABLE" }, /* mount root read/write */
{ RB_STRING, "RB_STRING" }, /* pass boot args to prom monitor */
{ 0, NULL },
};
int
sys_reboot(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
if (!printflags(bootflags, tcp->u_arg[0]))
tprintf("RB_???");
if (tcp->u_arg[0] & RB_STRING) {
printstr(tcp, tcp->u_arg[1], -1);
}
}
return 0;
}
int
sys_sysacct(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
}
return 0;
}
int
sys_swapon(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
}
return 0;
}
int
sys_nfs_svc(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printsock(tcp, tcp->u_arg[0]);
}
return 0;
}
static struct xlat mountflags[] = {
{ M_RDONLY, "M_RDONLY" },
{ M_NOSUID, "M_NOSUID" },
{ M_NEWTYPE, "M_NEWTYPE" },
{ M_GRPID, "M_GRPID" },
#ifdef M_REMOUNT
{ M_REMOUNT, "M_REMOUNT" },
#endif
#ifdef M_NOSUB
{ M_NOSUB, "M_NOSUB" },
#endif
#ifdef M_MULTI
{ M_MULTI, "M_MULTI" },
#endif
#ifdef M_SYS5
{ M_SYS5, "M_SYS5" },
#endif
{ 0, NULL },
};
static struct xlat nfsflags[] = {
{ NFSMNT_SOFT, "NFSMNT_SOFT" },
{ NFSMNT_WSIZE, "NFSMNT_WSIZE" },
{ NFSMNT_RSIZE, "NFSMNT_RSIZE" },
{ NFSMNT_TIMEO, "NFSMNT_TIMEO" },
{ NFSMNT_RETRANS, "NFSMNT_RETRANS" },
{ NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
{ NFSMNT_INT, "NFSMNT_INT" },
{ NFSMNT_NOAC, "NFSMNT_NOAC" },
{ NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
{ NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
{ NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
{ NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
#ifdef NFSMNT_SECURE
{ NFSMNT_SECURE, "NFSMNT_SECURE" },
#endif
#ifdef NFSMNT_NOCTO
{ NFSMNT_NOCTO, "NFSMNT_NOCTO" },
#endif
#ifdef NFSMNT_POSIX
{ NFSMNT_POSIX, "NFSMNT_POSIX" },
#endif
{ 0, NULL },
};
int
sys_mount(tcp)
struct tcb *tcp;
{
char type[4];
if (entering(tcp)) {
if (!(tcp->u_arg[2] & M_NEWTYPE) || umovestr(tcp,
tcp->u_arg[0], sizeof type, type) < 0) {
tprintf("OLDTYPE:#%lx", tcp->u_arg[0]);
} else {
tprintf("\"%s\", ", type);
}
printstr(tcp, tcp->u_arg[1], -1);
tprintf(", ");
if (!printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE))
tprintf("0");
tprintf(", ");
if (strcmp(type, "4.2") == 0) {
struct ufs_args a;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
printstr(tcp, (int)a.fspec, -1);
} else if (strcmp(type, "lo") == 0) {
struct lo_args a;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
printstr(tcp, (int)a.fsdir, -1);
} else if (strcmp(type, "nfs") == 0) {
struct nfs_args a;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
tprintf("[");
printsock(tcp, (int) a.addr);
tprintf(", ");
if (!printflags(nfsflags, a.flags))
tprintf("NFSMNT_???");
tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
a.wsize, a.rsize, a.timeo, a.retrans);
if (a.flags & NFSMNT_HOSTNAME && a.hostname)
printstr(tcp, (int)a.hostname, -1);
else
tprintf("%#lx", (unsigned long) a.hostname);
tprintf(",reg-min:%u,max:%u,dir-min:%u,max:%u,",
a.acregmin, a.acregmax, a.acdirmin, a.acdirmax);
if ((a.flags & NFSMNT_SECURE) && a.netname)
printstr(tcp, (int) a.netname, -1);
else
tprintf("%#lx", (unsigned long) a.netname);
tprintf("]");
} else if (strcmp(type, "rfs") == 0) {
struct rfs_args a;
struct token t;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
tprintf("[");
printstr(tcp, (int)a.rmtfs, -1);
if (umove(tcp, (int)a.token, &t) < 0)
return 0;
tprintf(", %u, %s]", t.t_id, t.t_uname);
} else if (strcmp(type, "pcfs") == 0) {
struct pc_args a;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
printstr(tcp, (int)a.fspec, -1);
}
}
return 0;
}
int
sys_unmount(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
}
return 0;
}
int
sys_umount(tcp)
struct tcb *tcp;
{
return sys_unmount(tcp);
}
int
sys_auditsys(tcp)
struct tcb *tcp;
{
/* XXX - no information available */
return printargs(tcp);
}
static struct xlat ex_auth_flags[] = {
{ AUTH_UNIX, "AUTH_UNIX" },
{ AUTH_DES, "AUTH_DES" },
{ 0, NULL },
};
int
sys_exportfs(tcp)
struct tcb *tcp;
{
struct export e;
int i;
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
if (umove(tcp, tcp->u_arg[1], &e) < 0) {
tprintf("%#lx", tcp->u_arg[1]);
return 0;
}
tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
tprintf(", roots:[");
if (e.ex_auth == AUTH_UNIX) {
for (i=0; i<e.ex_u.exunix.rootaddrs.naddrs; i++) {
printsock(tcp,
(int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
}
tprintf("], writers:[");
for (i=0; i<e.ex_writeaddrs.naddrs; i++) {
printsock(tcp,
(int)&e.ex_writeaddrs.addrvec[i]);
}
tprintf("]");
} else {
for (i=0; i<e.ex_u.exdes.nnames; i++) {
printsock(tcp,
(int)&e.ex_u.exdes.rootnames[i]);
tprintf(", ");
}
tprintf("], window:%u", e.ex_u.exdes.window);
}
tprintf("}");
}
return 0;
}
static struct xlat sysconflimits[] = {
#ifdef _SC_ARG_MAX
{ _SC_ARG_MAX, "_SC_ARG_MAX" }, /* space for argv & envp */
#endif
#ifdef _SC_CHILD_MAX
{ _SC_CHILD_MAX, "_SC_CHILD_MAX" }, /* maximum children per process??? */
#endif
#ifdef _SC_CLK_TCK
{ _SC_CLK_TCK, "_SC_CLK_TCK" }, /* clock ticks/sec */
#endif
#ifdef _SC_NGROUPS_MAX
{ _SC_NGROUPS_MAX, "_SC_NGROUPS_MAX" }, /* number of groups if multple supp. */
#endif
#ifdef _SC_OPEN_MAX
{ _SC_OPEN_MAX, "_SC_OPEN_MAX" }, /* max open files per process */
#endif
#ifdef _SC_JOB_CONTROL
{ _SC_JOB_CONTROL, "_SC_JOB_CONTROL" }, /* do we have job control */
#endif
#ifdef _SC_SAVED_IDS
{ _SC_SAVED_IDS, "_SC_SAVED_IDS" }, /* do we have saved uid/gids */
#endif
#ifdef _SC_VERSION
{ _SC_VERSION, "_SC_VERSION" }, /* POSIX version supported */
#endif
{ 0, NULL },
};
static struct xlat pathconflimits[] = {
#ifdef _PC_LINK_MAX
{ _PC_LINK_MAX, "_PC_LINK_MAX" }, /* max links to file/dir */
#endif
#ifdef _PC_MAX_CANON
{ _PC_MAX_CANON, "_PC_MAX_CANON" }, /* max line length */
#endif
#ifdef _PC_MAX_INPUT
{ _PC_MAX_INPUT, "_PC_MAX_INPUT" }, /* max "packet" to a tty device */
#endif
#ifdef _PC_NAME_MAX
{ _PC_NAME_MAX, "_PC_NAME_MAX" }, /* max pathname component length */
#endif
#ifdef _PC_PATH_MAX
{ _PC_PATH_MAX, "_PC_PATH_MAX" }, /* max pathname length */
#endif
#ifdef _PC_PIPE_BUF
{ _PC_PIPE_BUF, "_PC_PIPE_BUF" }, /* size of a pipe */
#endif
#ifdef _PC_CHOWN_RESTRICTED
{ _PC_CHOWN_RESTRICTED, "_PC_CHOWN_RESTRICTED" }, /* can we give away files */
#endif
#ifdef _PC_NO_TRUNC
{ _PC_NO_TRUNC, "_PC_NO_TRUNC" }, /* trunc or error on >NAME_MAX */
#endif
#ifdef _PC_VDISABLE
{ _PC_VDISABLE, "_PC_VDISABLE" }, /* best char to shut off tty c_cc */
#endif
{ 0, NULL },
};
int
sys_sysconf(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
}
return 0;
}
int
sys_pathconf(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
tprintf(", ");
printxval(pathconflimits, tcp->u_arg[1], "_SC_???");
}
return 0;
}
int
sys_fpathconf(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
printxval(pathconflimits, tcp->u_arg[1], "_SC_???");
}
return 0;
}
#endif /* SUNOS4 */
#ifdef SVR4
#ifdef HAVE_SYS_SYSCONFIG_H
#include <sys/sysconfig.h>
#endif /* HAVE_SYS_SYSCONFIG_H */
#include <sys/mount.h>
#include <sys/systeminfo.h>
#include <sys/utsname.h>
static struct xlat sysconfig_options[] = {
#ifdef _CONFIG_NGROUPS
{ _CONFIG_NGROUPS, "_CONFIG_NGROUPS" },
#endif
#ifdef _CONFIG_CHILD_MAX
{ _CONFIG_CHILD_MAX, "_CONFIG_CHILD_MAX" },
#endif
#ifdef _CONFIG_OPEN_FILES
{ _CONFIG_OPEN_FILES, "_CONFIG_OPEN_FILES" },
#endif
#ifdef _CONFIG_POSIX_VER
{ _CONFIG_POSIX_VER, "_CONFIG_POSIX_VER" },
#endif
#ifdef _CONFIG_PAGESIZE
{ _CONFIG_PAGESIZE, "_CONFIG_PAGESIZE" },
#endif
#ifdef _CONFIG_CLK_TCK
{ _CONFIG_CLK_TCK, "_CONFIG_CLK_TCK" },
#endif
#ifdef _CONFIG_XOPEN_VER
{ _CONFIG_XOPEN_VER, "_CONFIG_XOPEN_VER" },
#endif
#ifdef _CONFIG_PROF_TCK
{ _CONFIG_PROF_TCK, "_CONFIG_PROF_TCK" },
#endif
#ifdef _CONFIG_NPROC_CONF
{ _CONFIG_NPROC_CONF, "_CONFIG_NPROC_CONF" },
#endif
#ifdef _CONFIG_NPROC_ONLN
{ _CONFIG_NPROC_ONLN, "_CONFIG_NPROC_ONLN" },
#endif
#ifdef _CONFIG_AIO_LISTIO_MAX
{ _CONFIG_AIO_LISTIO_MAX, "_CONFIG_AIO_LISTIO_MAX" },
#endif
#ifdef _CONFIG_AIO_MAX
{ _CONFIG_AIO_MAX, "_CONFIG_AIO_MAX" },
#endif
#ifdef _CONFIG_AIO_PRIO_DELTA_MAX
{ _CONFIG_AIO_PRIO_DELTA_MAX, "_CONFIG_AIO_PRIO_DELTA_MAX" },
#endif
#ifdef _CONFIG_CONFIG_DELAYTIMER_MAX
{ _CONFIG_DELAYTIMER_MAX, "_CONFIG_DELAYTIMER_MAX" },
#endif
#ifdef _CONFIG_MQ_OPEN_MAX
{ _CONFIG_MQ_OPEN_MAX, "_CONFIG_MQ_OPEN_MAX" },
#endif
#ifdef _CONFIG_MQ_PRIO_MAX
{ _CONFIG_MQ_PRIO_MAX, "_CONFIG_MQ_PRIO_MAX" },
#endif
#ifdef _CONFIG_RTSIG_MAX
{ _CONFIG_RTSIG_MAX, "_CONFIG_RTSIG_MAX" },
#endif
#ifdef _CONFIG_SEM_NSEMS_MAX
{ _CONFIG_SEM_NSEMS_MAX, "_CONFIG_SEM_NSEMS_MAX" },
#endif
#ifdef _CONFIG_SEM_VALUE_MAX
{ _CONFIG_SEM_VALUE_MAX, "_CONFIG_SEM_VALUE_MAX" },
#endif
#ifdef _CONFIG_SIGQUEUE_MAX
{ _CONFIG_SIGQUEUE_MAX, "_CONFIG_SIGQUEUE_MAX" },
#endif
#ifdef _CONFIG_SIGRT_MIN
{ _CONFIG_SIGRT_MIN, "_CONFIG_SIGRT_MIN" },
#endif
#ifdef _CONFIG_SIGRT_MAX
{ _CONFIG_SIGRT_MAX, "_CONFIG_SIGRT_MAX" },
#endif
#ifdef _CONFIG_TIMER_MAX
{ _CONFIG_TIMER_MAX, "_CONFIG_TIMER_MAX" },
#endif
#ifdef _CONFIG_CONFIG_PHYS_PAGES
{ _CONFIG_PHYS_PAGES, "_CONFIG_PHYS_PAGES" },
#endif
#ifdef _CONFIG_AVPHYS_PAGES
{ _CONFIG_AVPHYS_PAGES, "_CONFIG_AVPHYS_PAGES" },
#endif
{ 0, NULL },
};
int
sys_sysconfig(tcp)
struct tcb *tcp;
{
if (entering(tcp))
printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
return 0;
}
static struct xlat sysinfo_options[] = {
{ SI_SYSNAME, "SI_SYSNAME" },
{ SI_HOSTNAME, "SI_HOSTNAME" },
{ SI_RELEASE, "SI_RELEASE" },
{ SI_VERSION, "SI_VERSION" },
{ SI_MACHINE, "SI_MACHINE" },
{ SI_ARCHITECTURE, "SI_ARCHITECTURE" },
{ SI_HW_SERIAL, "SI_HW_SERIAL" },
{ SI_HW_PROVIDER, "SI_HW_PROVIDER" },
{ SI_SRPC_DOMAIN, "SI_SRPC_DOMAIN" },
#ifdef SI_SET_HOSTNAME
{ SI_SET_HOSTNAME, "SI_SET_HOSTNAME" },
#endif
#ifdef SI_SET_SRPC_DOMAIN
{ SI_SET_SRPC_DOMAIN, "SI_SET_SRPC_DOMAIN" },
#endif
#ifdef SI_SET_KERB_REALM
{ SI_SET_KERB_REALM, "SI_SET_KERB_REALM" },
#endif
#ifdef SI_KERB_REALM
{ SI_KERB_REALM, "SI_KERB_REALM" },
#endif
{ 0, NULL },
};
int
sys_sysinfo(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
tprintf(", ");
}
else {
/* Technically some calls write values. So what. */
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printpath(tcp, tcp->u_arg[1]);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
#ifdef MIPS
#include <sys/syssgi.h>
static struct xlat syssgi_options[] = {
{ SGI_SYSID, "SGI_SYSID" },
{ SGI_RDUBLK, "SGI_RDUBLK" },
{ SGI_TUNE, "SGI_TUNE" },
{ SGI_IDBG, "SGI_IDBG" },
{ SGI_INVENT, "SGI_INVENT" },
{ SGI_RDNAME, "SGI_RDNAME" },
{ SGI_SETLED, "SGI_SETLED" },
{ SGI_SETNVRAM, "SGI_SETNVRAM" },
{ SGI_GETNVRAM, "SGI_GETNVRAM" },
{ SGI_QUERY_FTIMER, "SGI_QUERY_FTIMER" },
{ SGI_QUERY_CYCLECNTR, "SGI_QUERY_CYCLECNTR" },
{ SGI_PROCSZ, "SGI_PROCSZ" },
{ SGI_SIGACTION, "SGI_SIGACTION" },
{ SGI_SIGPENDING, "SGI_SIGPENDING" },
{ SGI_SIGPROCMASK, "SGI_SIGPROCMASK" },
{ SGI_SIGSUSPEND, "SGI_SIGSUSPEND" },
{ SGI_SETSID, "SGI_SETSID" },
{ SGI_SETPGID, "SGI_SETPGID" },
{ SGI_SYSCONF, "SGI_SYSCONF" },
{ SGI_WAIT4, "SGI_WAIT4" },
{ SGI_PATHCONF, "SGI_PATHCONF" },
{ SGI_READB, "SGI_READB" },
{ SGI_WRITEB, "SGI_WRITEB" },
{ SGI_SETGROUPS, "SGI_SETGROUPS" },
{ SGI_GETGROUPS, "SGI_GETGROUPS" },
{ SGI_SETTIMEOFDAY, "SGI_SETTIMEOFDAY" },
{ SGI_SETTIMETRIM, "SGI_SETTIMETRIM" },
{ SGI_GETTIMETRIM, "SGI_GETTIMETRIM" },
{ SGI_SPROFIL, "SGI_SPROFIL" },
{ SGI_RUSAGE, "SGI_RUSAGE" },
{ SGI_SIGSTACK, "SGI_SIGSTACK" },
{ SGI_SIGSTATUS, "SGI_SIGSTATUS" },
{ SGI_NETPROC, "SGI_NETPROC" },
{ SGI_SIGALTSTACK, "SGI_SIGALTSTACK" },
{ SGI_BDFLUSHCNT, "SGI_BDFLUSHCNT" },
{ SGI_SSYNC, "SGI_SSYNC" },
{ SGI_NFSCNVT, "SGI_NFSCNVT" },
{ SGI_GETPGID, "SGI_GETPGID" },
{ SGI_GETSID, "SGI_GETSID" },
{ SGI_IOPROBE, "SGI_IOPROBE" },
{ SGI_CONFIG, "SGI_CONFIG" },
{ SGI_ELFMAP, "SGI_ELFMAP" },
{ SGI_MCONFIG, "SGI_MCONFIG" },
{ SGI_GETPLABEL, "SGI_GETPLABEL" },
{ SGI_SETPLABEL, "SGI_SETPLABEL" },
{ SGI_GETLABEL, "SGI_GETLABEL" },
{ SGI_SETLABEL, "SGI_SETLABEL" },
{ SGI_SATREAD, "SGI_SATREAD" },
{ SGI_SATWRITE, "SGI_SATWRITE" },
{ SGI_SATCTL, "SGI_SATCTL" },
{ SGI_LOADATTR, "SGI_LOADATTR" },
{ SGI_UNLOADATTR, "SGI_UNLOADATTR" },
#ifdef SGI_RECVLMSG
{ SGI_RECVLMSG, "SGI_RECVLMSG" },
#endif
{ SGI_PLANGMOUNT, "SGI_PLANGMOUNT" },
{ SGI_GETPSOACL, "SGI_GETPSOACL" },
{ SGI_SETPSOACL, "SGI_SETPSOACL" },
{ SGI_RMI_FIXECC, "SGI_RMI_FIXECC" },
{ SGI_R4K_CERRS, "SGI_R4K_CERRS" },
{ SGI_GET_EVCONF, "SGI_GET_EVCONF" },
{ SGI_MPCWAROFF, "SGI_MPCWAROFF" },
{ SGI_SET_AUTOPWRON, "SGI_SET_AUTOPWRON" },
{ SGI_SPIPE, "SGI_SPIPE" },
{ SGI_SYMTAB, "SGI_SYMTAB" },
#ifdef SGI_SET_FPDEBUG
{ SGI_SET_FPDEBUG, "SGI_SET_FPDEBUG" },
#endif
{ SGI_TOSSTSAVE, "SGI_TOSSTSAVE" },
{ SGI_FDHI, "SGI_FDHI" },
{ SGI_MINRSS, "SGI_MINRSS" },
{ 0, NULL },
};
int
sys_syssgi(tcp)
struct tcb *tcp;
{
int i;
if (entering(tcp)) {
printxval(syssgi_options, tcp->u_arg[0], "SGI_???");
switch (tcp->u_arg[0]) {
default:
for (i = 1; i < tcp->u_nargs; i++)
tprintf(", %#lx", tcp->u_arg[i]);
break;
}
}
return 0;
}
#include <sys/types.h>
#include <rpc/rpc.h>
struct cred;
struct uio;
#include <sys/fsid.h>
#include <sys/vnode.h>
#include <sys/fs/nfs.h>
#include <sys/fs/nfs_clnt.h>
static struct xlat mount_flags[] = {
{ MS_RDONLY, "MS_RDONLY" },
{ MS_FSS, "MS_FSS" },
{ MS_DATA, "MS_DATA" },
{ MS_NOSUID, "MS_NOSUID" },
{ MS_REMOUNT, "MS_REMOUNT" },
{ MS_NOTRUNC, "MS_NOTRUNC" },
{ MS_GRPID, "MS_GRPID" },
{ MS_NODEV, "MS_NODEV" },
{ MS_BEFORE, "MS_BEFORE" },
{ MS_AFTER, "MS_AFTER" },
{ 0, NULL },
};
static struct xlat nfs_flags[] = {
{ NFSMNT_SOFT, "NFSMNT_SOFT" },
{ NFSMNT_WSIZE, "NFSMNT_WSIZE" },
{ NFSMNT_RSIZE, "NFSMNT_RSIZE" },
{ NFSMNT_TIMEO, "NFSMNT_TIMEO" },
{ NFSMNT_RETRANS, "NFSMNT_RETRANS" },
{ NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
{ NFSMNT_INT, "NFSMNT_INT" },
{ NFSMNT_NOAC, "NFSMNT_NOAC" },
{ NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
{ NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
{ NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
{ NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
{ NFSMNT_PRIVATE, "NFSMNT_PRIVATE" },
{ NFSMNT_SYMTTL, "NFSMNT_SYMTTL" },
{ NFSMNT_LOOPBACK, "NFSMNT_LOOPBACK" },
{ NFSMNT_BASETYPE, "NFSMNT_BASETYPE" },
{ NFSMNT_NAMEMAX, "NFSMNT_NAMEMAX" },
{ 0, NULL },
};
int
sys_mount(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
tprintf(", ");
printpath(tcp, tcp->u_arg[1]);
tprintf(", ");
printflags(mount_flags, tcp->u_arg[2]);
if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
tprintf(", ");
tprintf("%ld", tcp->u_arg[3]);
}
if (tcp->u_arg[2] & MS_DATA) {
int nfs_type = sysfs(GETFSIND, FSID_NFS);
tprintf(", ");
if (tcp->u_arg[3] == nfs_type) {
struct nfs_args args;
if (umove(tcp, tcp->u_arg[4], &args) < 0)
tprintf("%#lx", tcp->u_arg[4]);
else {
tprintf("addr=");
printsock(tcp, (int) args.addr);
tprintf(", flags=");
if (!printflags(nfs_flags, args.flags))
tprintf("NFSMNT_???");
tprintf(", hostname=");
printstr(tcp, (int) args.hostname, -1);
tprintf(", ...}");
}
}
else
tprintf("%#lx", tcp->u_arg[4]);
tprintf(", %ld", tcp->u_arg[5]);
}
}
return 0;
}
#else /* !MIPS */
int
sys_mount(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
tprintf(", ");
printpath(tcp, tcp->u_arg[1]);
tprintf(", ...");
}
return 0;
}
#endif /* !MIPS */
#endif /* SVR4 */
#ifdef __NR_capget
int
sys_capget(tcp)
struct tcb *tcp;
{
cap_user_header_t arg0;
cap_user_data_t arg1;
if(!entering(tcp)) {
arg0 = (cap_user_header_t)tcp->u_arg[0];
arg1 = (cap_user_data_t)tcp->u_arg[1];
tprintf("{%lx, %d}, ", (unsigned long)arg0->version, arg0->pid);
tprintf("{%lx, %lx, %lx}", (unsigned long)arg1->effective,
(unsigned long)arg1->permitted, (unsigned long)arg1->inheritable);
}
return 0;
}
int
sys_capset(tcp)
struct tcb *tcp;
{
cap_user_header_t arg0;
cap_user_data_t arg1;
if(entering(tcp)) {
arg0 = (cap_user_header_t)tcp->u_arg[0];
arg1 = (cap_user_data_t)tcp->u_arg[1];
tprintf("{%lx, %d}, ", (unsigned long)arg0->version, arg0->pid);
tprintf("{%lx, %lx, %lx}", (unsigned long)arg1->effective,
(unsigned long)arg1->permitted, (unsigned long)arg1->inheritable);
}
return 0;
}
#else
int sys_capget(tcp)
struct tcb *tcp;
{
return printargs(tcp);
}
int sys_capset(tcp)
struct tcb *tcp;
{
return printargs(tcp);
}
#endif

380
term.c Normal file
View File

@ -0,0 +1,380 @@
/*
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* 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$
*/
#include "defs.h"
#ifdef __GLIBC__
#include <termio.h>
#endif /* __GLIBC__ */
#include <termios.h>
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
static struct xlat tcxonc_options[] = {
{ TCOOFF, "TCOOFF" },
{ TCOON, "TCOON" },
{ TCIOFF, "TCIOFF" },
{ TCION, "TCION" },
{ 0, NULL },
};
static struct xlat tcflsh_options[] = {
{ TCIFLUSH, "TCIFLUSH" },
{ TCOFLUSH, "TCOFLUSH" },
{ TCIOFLUSH, "TCIOFLUSH" },
{ 0, NULL },
};
static struct xlat baud_options[] = {
{ B0, "B0" },
{ B50, "B50" },
{ B75, "B75" },
{ B110, "B110" },
{ B134, "B134" },
{ B150, "B150" },
{ B200, "B200" },
{ B300, "B300" },
{ B600, "B600" },
{ B1200, "B1200" },
{ B1800, "B1800" },
{ B2400, "B2400" },
{ B4800, "B4800" },
{ B9600, "B9600" },
#ifdef B19200
{ B19200, "B19200" },
#endif
#ifdef B38400
{ B38400, "B38400" },
#endif
#ifdef EXTA
{ EXTA, "EXTA" },
#endif
#ifdef EXTB
{ EXTB, "EXTB" },
#endif
{ 0, NULL },
};
static struct xlat modem_flags[] = {
#ifdef TIOCM_LE
{ TIOCM_LE, "TIOCM_LE", },
#endif
#ifdef TIOCM_DTR
{ TIOCM_DTR, "TIOCM_DTR", },
#endif
#ifdef TIOCM_RTS
{ TIOCM_RTS, "TIOCM_RTS", },
#endif
#ifdef TIOCM_ST
{ TIOCM_ST, "TIOCM_ST", },
#endif
#ifdef TIOCM_SR
{ TIOCM_SR, "TIOCM_SR", },
#endif
#ifdef TIOCM_CTS
{ TIOCM_CTS, "TIOCM_CTS", },
#endif
#ifdef TIOCM_CAR
{ TIOCM_CAR, "TIOCM_CAR", },
#endif
#ifdef TIOCM_CD
{ TIOCM_CD, "TIOCM_CD", },
#endif
#ifdef TIOCM_RNG
{ TIOCM_RNG, "TIOCM_RNG", },
#endif
#ifdef TIOCM_RI
{ TIOCM_RI, "TIOCM_RI", },
#endif
#ifdef TIOCM_DSR
{ TIOCM_DSR, "TIOCM_DSR", },
#endif
{ 0, NULL, },
};
int
term_ioctl(tcp, code, arg)
struct tcb *tcp;
long code, arg;
{
struct termios tios;
struct termio tio;
struct winsize ws;
#ifdef TIOCGSIZE
struct ttysize ts;
#endif
int i;
if (entering(tcp))
return 0;
switch (code) {
/* ioctls with termios or termio args */
#ifdef TCGETS
case TCGETS:
if (syserror(tcp))
return 0;
case TCSETS:
case TCSETSW:
case TCSETSF:
if (!verbose(tcp) || umove(tcp, arg, &tios) < 0)
return 0;
if (abbrev(tcp)) {
tprintf(", {");
printxval(baud_options, tios.c_cflag & CBAUD, "B???");
tprintf(" %sopost %sisig %sicanon %secho ...}",
(tios.c_oflag & OPOST) ? "" : "-",
(tios.c_lflag & ISIG) ? "" : "-",
(tios.c_lflag & ICANON) ? "" : "-",
(tios.c_lflag & ECHO) ? "" : "-");
return 1;
}
tprintf(", {c_iflags=%#lx, c_oflags=%#lx, ",
(long) tios.c_iflag, (long) tios.c_oflag);
tprintf("c_cflags=%#lx, c_lflags=%#lx, ",
(long) tios.c_cflag, (long) tios.c_lflag);
#ifndef SVR4
tprintf("c_line=%u, ", tios.c_line);
#endif
if (!(tios.c_lflag & ICANON))
tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ",
tios.c_cc[VMIN], tios.c_cc[VTIME]);
tprintf("c_cc=\"");
for (i = 0; i < NCCS; i++)
tprintf("\\x%02x", tios.c_cc[i]);
tprintf("\"}");
return 1;
#endif /* TCGETS */
#ifdef TCGETA
case TCGETA:
if (syserror(tcp))
return 0;
case TCSETA:
case TCSETAW:
case TCSETAF:
if (!verbose(tcp) || umove(tcp, arg, &tio) < 0)
return 0;
if (abbrev(tcp)) {
tprintf(", {");
printxval(baud_options, tio.c_cflag & CBAUD, "B???");
tprintf(" %sopost %sisig %sicanon %secho ...}",
(tio.c_oflag & OPOST) ? "" : "-",
(tio.c_lflag & ISIG) ? "" : "-",
(tio.c_lflag & ICANON) ? "" : "-",
(tio.c_lflag & ECHO) ? "" : "-");
return 1;
}
tprintf(", {c_iflags=%#lx, c_oflags=%#lx, ",
(long) tio.c_iflag, (long) tio.c_oflag);
tprintf("c_cflags=%#lx, c_lflags=%#lx, ",
(long) tio.c_cflag, (long) tio.c_lflag);
tprintf("c_line=%u, ", tio.c_line);
#ifdef _VMIN
if (!(tio.c_lflag & ICANON))
tprintf("c_cc[_VMIN]=%d, c_cc[_VTIME]=%d, ",
tio.c_cc[_VMIN], tio.c_cc[_VTIME]);
#else /* !_VMIN */
if (!(tio.c_lflag & ICANON))
tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ",
tio.c_cc[VMIN], tio.c_cc[VTIME]);
#endif /* !_VMIN */
tprintf("c_cc=\"");
for (i = 0; i < NCC; i++)
tprintf("\\x%02x", tio.c_cc[i]);
tprintf("\"}");
return 1;
#endif /* TCGETA */
/* ioctls with winsize or ttysize args */
#ifdef TIOCGWINSZ
case TIOCGWINSZ:
if (syserror(tcp))
return 0;
case TIOCSWINSZ:
if (!verbose(tcp) || umove(tcp, arg, &ws) < 0)
return 0;
tprintf(", {ws_row=%d, ws_col=%d, ws_xpixel=%d, ws_ypixel=%d}",
ws.ws_row, ws.ws_col, ws.ws_xpixel, ws.ws_ypixel);
return 1;
#endif /* TIOCGWINSZ */
#ifdef TIOCGSIZE
case TIOCGSIZE:
if (syserror(tcp))
return 0;
case TIOCSSIZE:
if (!verbose(tcp) || umove(tcp, arg, &ts) < 0)
return 0;
tprintf(", {ts_lines=%d, ts_cols=%d}",
ts.ts_lines, ts.ts_cols);
return 1;
#endif
/* ioctls with a direct decodable arg */
case TCXONC:
tprintf(", ");
printxval(tcxonc_options, arg, "TC???");
return 1;
case TCFLSH:
tprintf(", ");
printxval(tcflsh_options, arg, "TC???");
return 1;
/* ioctls with an indirect parameter displayed as modem flags */
#ifdef TIOCMGET
case TIOCMGET:
case TIOCMBIS:
case TIOCMBIC:
case TIOCMSET:
if (umove(tcp, arg, &arg) < 0)
return 0;
tprintf(", [");
if (!printflags(modem_flags, arg))
tprintf("0");
tprintf("]");
return 1;
#endif /* TIOCMGET */
/* ioctls with an indirect parameter displayed in decimal */
case TIOCSPGRP:
case TIOCGPGRP:
#ifdef TIOCGETPGRP
case TIOCGETPGRP:
#endif
#ifdef TIOCSETPGRP
case TIOCSETPGRP:
#endif
#ifdef FIONREAD
case FIONREAD:
#endif
case TIOCOUTQ:
#ifdef FIONBIO
case FIONBIO:
#endif
#ifdef FIOASYNC
case FIOASYNC:
#endif
#ifdef FIOGETOWN
case FIOGETOWN:
#endif
#ifdef FIOSETOWN
case FIOSETOWN:
#endif
#ifdef TIOCGETD
case TIOCGETD:
#endif
#ifdef TIOCSETD
case TIOCSETD:
#endif
#ifdef TIOCPKT
case TIOCPKT:
#endif
#ifdef TIOCREMOTE
case TIOCREMOTE:
#endif
#ifdef TIOCUCNTL
case TIOCUCNTL:
#endif
#ifdef TIOCTCNTL
case TIOCTCNTL:
#endif
#ifdef TIOCSIGNAL
case TIOCSIGNAL:
#endif
#ifdef TIOCSSOFTCAR
case TIOCSSOFTCAR:
#endif
#ifdef TIOCGSOFTCAR
case TIOCGSOFTCAR:
#endif
#ifdef TIOCISPACE
case TIOCISPACE:
#endif
#ifdef TIOCISIZE
case TIOCISIZE:
#endif
#ifdef TIOCSINTR
case TIOCSINTR:
#endif
tprintf(", ");
printnum(tcp, arg, "%d");
return 1;
#if 0
/* ioctls with an indirect parameter displayed in hex */
tprintf(", ");
printnum(tcp, arg, "%#x");
return 1;
#endif
/* ioctls with an indirect parameter displayed as a char */
#ifdef TIOCSTI
case TIOCSTI:
#endif
tprintf(", ");
printstr(tcp, arg, 1);
return 1;
/* ioctls with no parameters */
#ifdef TIOCSCTTY
case TIOCSCTTY:
#endif
#ifdef TIOCNOTTY
case TIOCNOTTY:
#endif
#ifdef FIOCLEX
case FIOCLEX:
#endif
#ifdef FIONCLEX
case FIONCLEX:
#endif
#ifdef TIOCCONS
case TIOCCONS:
#endif
return 1;
/* ioctls which are unknown */
default:
return 0;
}
}

9
test/Makefile Normal file
View File

@ -0,0 +1,9 @@
#
# $Id$
#
all: fork sig
clean distclean:
rm -f fork sig *.o core

10
test/fork.c Normal file
View File

@ -0,0 +1,10 @@
main()
{
if (fork() == 0)
write(1, "child\n", 6);
else {
wait(0);
write(1, "parent\n", 7);
}
exit(0);
}

33
test/procpollable.c Normal file
View File

@ -0,0 +1,33 @@
#include <stdio.h>
#include <signal.h>
#include <sys/procfs.h>
#include <sys/stropts.h>
#include <poll.h>
main()
{
int pid;
char proc[32];
FILE *pfp;
struct pollfd pfd;
if ((pid = fork()) == 0) {
pause();
exit(0);
}
sprintf(proc, "/proc/%d", pid);
if ((pfp = fopen(proc, "r+")) == NULL)
goto fail;
if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
goto fail;
pfd.fd = fileno(pfp);
pfd.events = POLLPRI;
if (poll(&pfd, 1, 0) < 0)
goto fail;
if (!(pfd.revents & POLLPRI))
goto fail;
kill(pid, SIGKILL);
exit(0);
fail:
kill(pid, SIGKILL);
exit(1);
}

32
test/sfd.c Normal file
View File

@ -0,0 +1,32 @@
#include <fcntl.h>
#include <stdio.h>
main(int argc, char *argv[])
{
int pid = atoi(argv[1]);
int sfd;
char sname[32];
char buf[1024];
char *s;
int i;
int signal, blocked, ignore, caught;
sprintf(sname, "/proc/%d/stat", pid);
if ((sfd = open(sname, O_RDONLY)) == -1) {
perror(sname);
return 1;
}
i = read(sfd, buf, 1024);
buf[i] = '\0';
for (i = 0, s = buf; i < 30; i++) {
while (*++s != ' ') {
if (!*s)
break;
}
}
if (sscanf(s, "%d%d%d%d", &signal, &blocked, &ignore, &caught) != 4) {
fprintf(stderr, "/proc/pid/stat format error\n");
return 1;
}
printf("%8x %8x %8x %8x\n", signal, blocked, ignore, caught);
return 1;
}

16
test/sig.c Normal file
View File

@ -0,0 +1,16 @@
#include <signal.h>
main()
{
char buf[1024];
void interrupt();
signal(SIGINT, interrupt);
read(0, buf, 1024);
write(2, "qwerty\n", 7);
exit(0);
}
interrupt()
{
write(2, "xyzzy\n", 6);
}

Some files were not shown because too many files have changed in this diff Show More