Subject: New-style sys/compat/ultrix/syscalls.master
To: None <dean@fsa.ca>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 11/22/1994 03:49:57
This is a first pass at new-style syscalls.master and syscalls.conf
for Ultrix emulation on NetBSD. There's no ioctl() support and it
depends on a couple of changes to sys/compat/ultrix/ultrix_misc.c
(deleting the old sun_getrlimit()/sun_setrlimit(), use
compat_43_{set,get}rlimit instead), and sys/kern/kern_xxx.c (adding
COMPAT_ULTRIX to the #ifdef around compat_09_{get,set}domainname).

The Ultrix syscall names are bogus, but I didn't invent them. I've simply
kept them consistent with the existing names in ultrix_misc.c, which
have ``sun_'' prefixes. 

If someone wants to crrect the attribution of obsolete syscall
numbers, that'd be fine by me.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  ./src/sys/compat/ultrix/syscalls.master
#   ./src/sys/compat/ultrix/syscalls.conf
# Wrapped by jonathan@Reno.Stanford.EDU on Tue Nov 22 03:47:35 1994
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f './src/sys/compat/ultrix/syscalls.master' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'./src/sys/compat/ultrix/syscalls.master'\"
else
echo shar: Extracting \"'./src/sys/compat/ultrix/syscalls.master'\" \(12286 characters\)
sed "s/^X//" >'./src/sys/compat/ultrix/syscalls.master' <<'END_OF_FILE'
X	$NetBSD: syscalls.master,v 1.4.2.1 1994/08/01 18:00:39 cgd Exp $
X;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
X; System call name/number master file (or rather, slave, from SunOS).
X; Processed to created sun_sysent.c, sun_syscalls.c and sun_syscall.h.
X
X; Columns: number type nargs name altname/comments
X;	number	system call number, must be in order
X;	type	one of STD, OBSOL, UNIMPL, COMPAT
X;	nargs	number of arguments
X;	name	name of syscall routine
X;	altname	name of system call if different
X;		for UNIMPL/OBSOL, name continues with comments
X
X; types:
X;	STD	always included
X;	COMPAT	included on COMPAT #ifdef
X;	LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
X;	OBSOL	obsolete, not included in system, only specifies name
X;	UNIMPL	not implemented, placeholder only
X
X; The compat options are defined in the syscalls.conf file, and the
X; compat option name is prefixed to the syscall name.  Other than
X; that, they're like NODEF (for 'compat' options), or STD (for
X; 'libcompat' options).
X;
X; The type-dependent arguments are as follows:
X; For STD, NODEF, NOARGS, and compat syscalls:
X;	{ pseudo-proto } [alias]
X; For other syscalls:
X;	[comment]
X;
X; #ifdef's, etc. may be included, and are copied to the output files.
X; #include's are copied to the syscall switch definition file only.
X
X#include <sys/param.h>
X#include <sys/systm.h>
X#include <sys/signal.h>
X#include <sys/mount.h>
X#include <sys/syscallargs.h>
X#include <compat/ultrix/ultrix_syscallargs.h>
X
X
X0	NOARGS		{ int  nosys(void); } syscall
X1	NOARGS		{ int exit(int rval); }
X2	NOARGS		{ int fork(void); }
X3	NOARGS		{ int read(int fd, char *buf, u_int nbyte); }
X4	NOARGS		{ int write(int fd, char *buf, u_int nbyte); }
X5	STD		{ int sun_open(char *path, int flags, int mode); }
X6	NOARGS		{ int close(int fd); }
X7	UNIMPL	0 old_wait
X8	STD		{ int sun_creat(char *path, int mode); }
X9	NOARGS		{ int link(char *path, char *link); }
X10	NOARGS		{ int unlink(char *path); }
X11	STD		{ int sun_execv(char *path, char **argp); }
X12	NOARGS		{ int chdir(char *path); }
X13	OBSOL		sun_time
X14	STD		{ int sun_mknod(char *path, int mode, int dev); }
X15	NOARGS		{ int chmod(char *path, int mode); }
X16	NOARGS		{ int chown(char *path, int uid, int gid); }
X17	NOARGS		{ int obreak(char *nsize); } break
X18	OBSOL		sun_stat
X19	NOARGS		{ long compat_43_lseek(int fd, long offset, int whence); }
X20	NOARGS		{ pid_t getpid(void); }
X21	OBSOL		ultrix_mount
X22	OBSOL		sun_or_sysV_unmount
X23	NOARGS		{ int setuid(uid_t uid); }
X24	NOARGS		{ uid_t getuid(void); }
X25	OBSOL		v7 stime
X26	OBSOL		v7 ptrace
X27	OBSOL		v7 alarm
X28	OBSOL		v7 fstat
X29	OBSOL		v7 pause
X30	OBSOL		v7 utime
X31	OBSOL		v7 stty
X32	OBSOL		v7 gtty
X33	NOARGS		{ int access(char *path, int flags); }
X34	OBSOL		v7 nice
X35	OBSOL		v7 ftime
X36	NOARGS		{ int sync(void); }
X37	NOARGS		{ int kill(int pidd int signum); }
X38	NOARGS		{ int compat_43_stat(char *path, struct ostat *ub); }
X39	OBSOL		v7 setpgrp
X40	NOARGS		{ int compat_43_lstat(char *path, struct ostat *ub); }
X41	NOARGS		{ int dup(u_int fd); }
X42	NOARGS		{ int pipe(void); }
X43	OBSOL		v7 times
X44	NOARGS		{ int profil(caddr_t samples, u_int size, \
X			    u_int offset, u_int scale); }
X45	UNIMPL	0 nosys
X46	OBSOL		v7 setgid
X47	NOARGS		{ gid_t getgid(void); }
X48	UNIMPL		sun_ssig
X49	UNIMPL		reserved for USG
X50	UNIMPL		reserved for USG
X51	NOARGS		{ int acct(char *path); }
X52	UNIMPL	0 nosys
X53	UNIMPL	0 syslock
X54	UNIMPL		{ int sunos_ioctl(int fd, u_long com, caddr_t data); }
X
X55	NOARGS		{ int reboot(int opt); }
X56	UNIMPL		7thedition  mpxchan
X57	NOARGS		{ int symlink(char *path, char *link); }
X58	NOARGS		{ int readlink(char *path, char *buf, int count); }
X59	NOARGS		{ int execve(char *path, char **argp, char **envp); }
X60	NOARGS		{ int umask(int newmask); }
X61	NOARGS		{ int chroot(char *path); }
X62	NOARGS		{ int compat_43_fstat(int fd, struct ostat *sb); }
X63	UNIMPL		nosys
X64	NOARGS		{ int compat_43_getpagesize(void); }
X65	UNIMPL		mremap
X66	NOARGS		{ int vfork(void); }
X67	OBSOL		vread
X68	OBSOL		vwrite
X69	NOARGS		{ int sbrk(int incr); }
X70	NOARGS		{ int sstk(int incr); }
X71	STD		{ int sun_mmap(caddr_t addr, int len, int prot, \
X			    u_int flags, int fd, long pos); }
X72	NOARGS		{ int ovadvise(int anom); } vadvise
X73	NOARGS		{ int munmap(caddr_t addr, int len); }
X74	NOARGS		{ int mprotect(caddr_t addr, int len, int prot); }
X75	NOARGS		{ int madvise(caddr_t addr, int len, int behav); }
X76	STD		{ int sun_vhangup(void); }
X77	UNIMPL		old vlimit
X78	NOARGS		{ int mincore(caddr_t addr, int len, char *vec); }
X79	NOARGS		{ int getgroups(u_int gidsetsize, gid_t *gidset); }
X80	NOARGS		{ int setgroups(u_int gidsetsize, gid_t *gidset); }
X81	NOARGS		{ int getpgrp(void); }
X82	STD		{ int sun_setpgid(int pid, int pgid); }
X83	NOARGS		{ int setitimer(u_int which, struct itimerval *itv, \
X			    struct itimerval *oitv); }
X84	STD		{ int sun_wait3(int *status, int options, \
X			    struct rusage *rusage);}
X85	NOARGS		{ int swapon(char *name); }
X86	NOARGS		{ int getitimer(u_int which, struct itimerval *itv); }
X87	NOARGS		{ int compat_43_gethostname(char *hostname, u_int len); }
X88	NOARGS		{ int compat_43_sethostname(char *hostname, u_int len); }
X89	NOARGS		{ int compat_43_getdtablesize(void); }
X90	NOARGS		{ int dup2(u_int from, u_int to); }
X91	UNIMPL		getdopt
X92	NOARGS		{ int fcntl(int fd, int cmd, void *arg); }
X93	NOARGS		{ int select(u_int nd, fd_set *in, fd_set *ou, \
X			    fd_set *ex, struct timeval *tv); }
X94	UNIMPL		setdopt
X95	NOARGS		{ int fsync(int fd); }
X96	NOARGS		{ int setpriority(int which, int who, int prio); }
X97	NOARGS		{ int socket(int domain, int type, int protocol); }
X98	NOARGS		{ int connect(int s, caddr_t name, int namelen); }
X99	NOARGS		{ int compat_43_accept(int s, caddr_t name, int *anamelen); }
X100	NOARGS		{ int getpriority(int which, int who); }
X101	NOARGS		{ int compat_43_send(int s, caddr_t buf, int len, int flags); }
X102	NOARGS		{ int compat_43_recv(int s, caddr_t buf, int len, int flags); }
X103	UNIMPL		/*XXX*/	 sigreturn
X104	NOARGS		{ int bind(int s, caddr_t name, int namelen); }
X105	STD		{ int sun_setsockopt(int s, int level, int name, \
X			    caddr_t val, int valsize); }
X106	NOARGS		{ int listen(int s, int backlog); }
X107	UNIMPL		vtimes
X108	NOARGS		{ int compat_43_sigvec(int signum, struct sigvec *nsv, \
X			    struct sigvec *osv); }
X109	NOARGS		{ int compat_43_sigblock(int mask); }
X110	NOARGS		{ int compat_43_sigsetmask(int mask); }
X111	NOARGS		{ int sigsuspend(int mask); }
X112	NOARGS		{ int compat_43_sigstack(struct sigstack *nss, \
X			    struct sigstack *oss); }
X113	NOARGS		{ int compat_43_recvmsg(int s, struct omsghdr *msg, int flags); }
X114	NOARGS		{ int compat_43_sendmsg(int s, caddr_t msg, int flags); }
X115	OBSOL		vtrace
X116	NOARGS		{ int gettimeofday(struct timeval *tp, \
X			    struct timezone *tzp); }
X117	NOARGS		{ int getrusage(int who, struct rusage *rusage); }
X118	NOARGS		{ int getsockopt(int s, int level, int name, \
X			    caddr_t val, int *avalsize); }
X119	UNIMPL		resuba
X120	NOARGS		{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
X121	NOARGS		{ int writev(int fd, struct iovec *iovp, \
X			    u_int iovcnt); }
X122	NOARGS		{ int settimeofday(struct timeval *tv, \
X			    struct timezone *tzp); }
X123	NOARGS		{ int fchown(int fd, int uid, int gid); }
X124	NOARGS		{ int fchmod(int fd, int mode); }
X125	NOARGS		{ int compat_43_recvfrom(int s, caddr_t buf, size_t len, \
X			    int flags, caddr_t from, int *fromlenaddr); }
X126	NOARGS		{ int compat_43_setreuid(int ruid, int euid); }
X127	NOARGS		{ int compat_43_setregid(int rgid, int egid); }
X128	NOARGS		{ int rename(char *from, char *to); }
X129	NOARGS		{ int compat_43_truncate(char *path, long length); }
X130	NOARGS		{ int compat_43_ftruncate(int fd, long length); }
X131	NOARGS		{ int flock(int fd, int how); }
X132	UNIMPL		nosys
X133	NOARGS		{ int sendto(int s, caddr_t buf, size_t len, \
X			    int flags, caddr_t to, int tolen); }
X134	NOARGS		{ int shutdown(int s, int how); }
X135	NOARGS		{ int socketpair(int domain, int type, int protocol, \
X			    int *rsv); }
X136	NOARGS		{ int mkdir(char *path, int mode); }
X137	NOARGS		{ int rmdir(char *path); }
X138	NOARGS		{ int utimes(char *path, struct timeval *tptr); }
X139	NOARGS		{ int sigreturn(struct sigcontext *sigcntxp); }
X140	NOARGS		{ int adjtime(struct timeval *delta, \
X			    struct timeval *olddelta); }
X141	NOARGS		{ int compat_43_getpeername(int fdes, caddr_t asa, int *alen); }
X142	NOARGS		{ int compat_43_gethostid(void); }
X143	UNIMPL		old sethostid
X144	NOARGS		{ int compat_43_getrlimit(u_int which, struct orlimit *rlp); }
X145	NOARGS		{ int compat_43_setrlimit(u_int which, struct orlimit *rlp); }
X146	NOARGS		{ int compat_43_killpg(int pgid, int signum); }
X147	UNIMPL		nosys
X148	UNIMPL		setquota
X149	UNIMPL	 	quota /* needs to be nullop to boot on Ultrix root partition*/
X150	NOARGS		{ int compat_43_getsockname(int fdes, caddr_t asa, int *alen); }
X151	UNIMPL		sysmips /* 4 args */
X152	UNIMPL		cacheflush /* 4 args */
X153	UNIMPL		cachectl /* 3 args */
X154	UNIMPL		nosys
X155	UNIMPL		atomic_op
X156	UNIMPL		nosys
X157	UNIMPL		nosys
X#ifdef NFSSERVER
X158	STD		{ int sun_nfssvc(int fd); }
X#else
X158	UNIMPL
X#endif
X159	NOARGS		{ int getdirentries(int fd, char *buf, u_int count, \
X			    long *basep); }
X160	STD		{ int sun_statfs(char *path, struct sunos_statfs *buf); }
X161	STD		{ int sun_fstatfs(int fd, struct sunos_statfs *buf); }
X162	STD		{ int sun_unmount(char *path, int flags); }
X#ifdef NFSCLIENT
X163	NOARGS		{ int async_daemon(void); }
X164	NOARGS		{ int getfh(char *fname, fhandle_t *fhp); }
X#else
X163	UNIMPL		async_daemon
X164	UNIMPL		getfh
X#endif
X165	NOARGS		{ int compat_09_getdomainname(char *domainname, int len); }
X166	NOARGS		{ int compat_09_setdomainname(char *domainname, int len); }
X167	UNIMPL  0 nosys
X168	STD		{ int sun_quotactl(int cmd, char *special, int uid, \
X			    caddr_t addr); }
X169	STD		{ int sun_exportfs(char *path, char *ex); }
X170	UNIMPL		 ultrix_mount/*implemented by jonathan@DSG.Stanford.EDU*/
X171	UNIMPL	4 hdwconf
X#ifdef SYSVMSG
X172	UNIMPL	0 msgctl
X173	UNIMPL	0 msgget
X174	UNIMPL	0 msgrcv
X175	UNIMPL	0 msgsnd
X#else
X172	UNIMPL	0 msgctl
X173	UNIMPL	0 msgget
X174	UNIMPL	0 msgrcv
X175	UNIMPL	0 msgsnd
X#endif
X#ifdef SYSVSEM
X176	UNIMPL	0 semctl
X177	UNIMPL	0 semget
X178	UNIMPL	0 semop
X#else
X176	UNIMPL	0 semctl
X177	UNIMPL	0 semget
X178	UNIMPL	0 semop
X#endif
X179	STD		{ int sun_uname(struct sunos_utsname *name); }
X#ifdef SYSVSHM
X180	NOARGS		{ int shmsys(int which, int a2, int a3, int a4); }
X#else
X180	UNIMPL		shmsys
X#endif
X181	UNIMPL	0 plock
X182	UNIMPL	0 lockf
X183	STD		{ int sun_ustat(int dev, struct sunos_ustat *buf); }
X184	UNIMPL	ult_getmnt /*implemented by jonathan@DSG.Stanford.EDU*/
X185	UNIMPL	 notdef
X186	UNIMPL	 notdef
X187	STD		{ int sun_sigpending(int *mask); }
X188	NOARGS		{ int setsid(void); }
X189	STD		{ int ultrix_waitpid(); }
X190	UNIMPL		nosys
X191	UNIMPL		nosys
X192	UNIMPL		nosys
X193	UNIMPL		nosys
X194	UNIMPL		nosys
X195	UNIMPL		nosys
X196	UNIMPL		nosys
X197	UNIMPL		nosys
X198	UNIMPL		nosys
X199	UNIMPL		nosys
X200	UNIMPL		nosys
X201	UNIMPL		nosys
X202	UNIMPL		nosys
X203	UNIMPL		nosys
X204	UNIMPL		nosys
X205	UNIMPL		nosys
X206	UNIMPL		nosys
X207	UNIMPL		nosys
X208	UNIMPL		nosys
X209	UNIMPL		nosys
X210	UNIMPL		nosys
X211	UNIMPL		nosys
X212	UNIMPL		nosys
X213	UNIMPL		nosys
X214	UNIMPL		nosys
X215	UNIMPL		nosys
X216	UNIMPL		nosys
X217	UNIMPL		nosys
X218	UNIMPL		nosys
X219	UNIMPL		nosys
X220	UNIMPL		nosys
X221	UNIMPL		nosys
X222	UNIMPL		nosys
X223	UNIMPL		nosys
X224	UNIMPL		nosys
X225	UNIMPL		nosys
X226	UNIMPL		nosys
X227	UNIMPL		nosys
X228	UNIMPL		nosys
X229	UNIMPL		nosys
X230	UNIMPL		nosys
X231	UNIMPL		nosys
X232	UNIMPL		nosys
X233	UNIMPL	1 utc_gettime
X234	UNIMPL	2 utc_adjtime
X235	UNIMPL		nosys
X236	UNIMPL		nosys
X237	UNIMPL		nosys
X238	UNIMPL		nosys
X239	UNIMPL		nosys
X240	UNIMPL		nosys
X241	UNIMPL		nosys
X242	UNIMPL		nosys
X243	UNIMPL		nosys
X244	UNIMPL		nosys
X245	UNIMPL		nosys
X246	UNIMPL		nosys
X247	UNIMPL		nosys
X248	UNIMPL		nosys
X249	UNIMPL		nosys
X250	UNIMPL		nosys
X251	UNIMPL		nosys
X252     UNIMPL  	audctl /*Make no-op for installation on Ultrix rootpartition?*/
X253	UNIMPL		audgen /*Make no-op for installation on Ultrix rootpartition?*/
X254	UNIMPL		startcpu
X255	UNIMPL		stopcpu
X256	STD		{ int ultrix_getsysinfo(unsigned op, char *buffer, \
X				unsigned nbytes, int *start, char *arg); }
X257	STD		{ int ultrix_setsysinfo(unsigned op, char *buffer, \
X				unsigned nbytes, unsigned arg, unsigned flag); }
X
END_OF_FILE
if test 12286 -ne `wc -c <'./src/sys/compat/ultrix/syscalls.master'`; then
    echo shar: \"'./src/sys/compat/ultrix/syscalls.master'\" unpacked with wrong size!
fi
# end of './src/sys/compat/ultrix/syscalls.master'
fi
if test -f './src/sys/compat/ultrix/syscalls.conf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'./src/sys/compat/ultrix/syscalls.conf'\"
else
echo shar: Extracting \"'./src/sys/compat/ultrix/syscalls.conf'\" \(323 characters\)
sed "s/^X//" >'./src/sys/compat/ultrix/syscalls.conf' <<'END_OF_FILE'
X#	$NetBSD: syscalls.conf,v 1.2 1994/10/26 02:57:10 cgd Exp $
X
Xsysnames="ultrix_syscalls.c"
Xsysnumhdr="ultrix_syscall.h"
Xsyssw="ultrix_sysent.c"
Xsysarghdr="ultrix_syscallargs.h"
Xcompatopts="compat_43 compat_09 compat_10"
Xlibcompatopts=""
X
Xswitchname="ultrix_sysent"
Xnamesname="ultrix_syscallnames"
Xconstprefix="ULTRIX_SYS_"
END_OF_FILE
if test 323 -ne `wc -c <'./src/sys/compat/ultrix/syscalls.conf'`; then
    echo shar: \"'./src/sys/compat/ultrix/syscalls.conf'\" unpacked with wrong size!
fi
# end of './src/sys/compat/ultrix/syscalls.conf'
fi
echo shar: End of shell archive.
exit 0