update miniroot scripts
[unix-history] / usr / src / sys / pmax / ultrix / ultrix_sysent.c
CommitLineData
2966ca0e
KM
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1992 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department and Ralph Campbell.
9 *
10 * %sccs.include.redist.c%
11 *
12 * from: Utah $Hdr: hpux_sysent.c 1.1 90/07/09$
13 *
ef2387cd 14 * @(#)ultrix_sysent.c 7.6 (Berkeley) %G%
2966ca0e
KM
15 */
16
17/*
18 * System call switch table.
19 */
20
5548a02f
KB
21#include <sys/param.h>
22#include <sys/systm.h>
2966ca0e
KM
23
24int nosys(),notimp();
25
26int rexit();
27int fork();
28int read();
29int write();
30int open();
31int close();
32int ocreat();
33int link();
34int unlink();
2966ca0e
KM
35int chdir();
36int mknod();
37int chmod();
38int chown();
39int obreak();
40int lseek();
41int getpid();
42int getuid();
43int ptrace();
44int saccess();
45int sync();
46int kill();
99b1e299
RC
47int ostat();
48int olstat();
2966ca0e
KM
49int dup();
50int pipe();
51int profil();
52int ultrixtobsd();
53int getgid();
54int ioctl();
55int reboot();
56int symlink();
57int readlink();
58int execve();
59int umask();
60int chroot();
99b1e299 61int ofstat();
ef2387cd 62int ogetpagesize();
2966ca0e
KM
63int vfork();
64int sbrk();
65int sstk();
66int getgroups();
67int setgroups();
68int ultrixgetpgrp();
69int ultrixsetpgrp();
70int setitimer();
71int ultrixwait3();
72int getitimer();
ef2387cd
RC
73int ogethostname();
74int osethostname();
2966ca0e
KM
75int getdtablesize();
76int dup2();
77int fcntl();
78int select();
79int fsync();
80int setpriority();
81int socket();
82int connect();
83int oaccept();
84int getpriority();
85int osend();
86int orecv();
0b7c38d2 87int sigreturn();
2966ca0e
KM
88int bind();
89int setsockopt();
90int listen();
91int ultrixsigvec();
92int osigblock();
93int osigsetmask();
94int sigsuspend();
99b1e299 95int osigstack();
2966ca0e
KM
96int orecvmsg();
97int osendmsg();
98int gettimeofday();
99int getrusage();
100int getsockopt();
101int readv();
102int writev();
103int settimeofday();
104int fchown();
105int fchmod();
106int orecvfrom();
107int osetreuid();
108int osetregid();
109int rename();
110int truncate();
111int ftruncate();
112int flock();
113int sendto();
114int shutdown();
115int socketpair();
116int mkdir();
117int rmdir();
118int utimes();
2966ca0e
KM
119int adjtime();
120int ogetpeername();
ef2387cd
RC
121int ogethostid();
122int osethostid();
2966ca0e
KM
123int getrlimit();
124int setrlimit();
125int okillpg();
126int ogetsockname();
dce716e4
RC
127int ogetdirentries();
128int ultrixgetdomainname();
129int ultrixsetdomainname();
2966ca0e
KM
130int ultrixgetsysinfo();
131
132/*
133 * Reserved/unimplemented system calls in the range 0-150 inclusive
134 * are reserved for use in future Berkeley releases.
135 * Additional system calls implemented in vendor and other
136 * redistributions should be placed in the reserved range at the end
137 * of the current calls.
138 */
139struct sysent ultrixsysent[] = {
140 0, nosys, /* 0 = out of range */
141 1, rexit, /* 1 = exit */
142 0, fork, /* 2 = fork */
143 3, read, /* 3 = read */
144 3, write, /* 4 = write */
145 3, open, /* 5 = open */
146 1, close, /* 6 = close */
147 0, nosys, /* 7 = old wait */
148 2, ocreat, /* 8 = creat */
149 2, link, /* 9 = link */
150 1, unlink, /* 10 = unlink */
151 0, nosys, /* 11 = old execv */
152 1, chdir, /* 12 = chdir */
153 0, nosys, /* 13 = old time */
154 3, mknod, /* 14 = mknod */
155 2, chmod, /* 15 = chmod */
156 3, chown, /* 16 = chown */
157 1, obreak, /* 17 = old break */
158 0, nosys, /* 18 = old stat */
159 3, lseek, /* 19 = lseek */
160 0, getpid, /* 20 = getpid */
161 3, notimp, /* 21 = mount */
162 1, notimp, /* 22 = umount */
163 0, nosys, /* 23 = old setuid */
164 0, getuid, /* 24 = getuid */
165 0, nosys, /* 25 = old stime */
166 4, ptrace, /* 26 = ptrace */
167 0, nosys, /* 27 = old alarm */
168 0, nosys, /* 28 = old fstat */
169 0, nosys, /* 29 = old pause */
170 0, nosys, /* 30 = old utime */
171 0, nosys, /* 31 = old stty */
172 0, nosys, /* 32 = old gtty */
173 2, saccess, /* 33 = access */
174 0, nosys, /* 34 = old nice */
175 0, nosys, /* 35 = old ftime */
176 0, sync, /* 36 = sync */
177 2, kill, /* 37 = kill */
99b1e299 178 2, ostat, /* 38 = stat */
2966ca0e 179 0, nosys, /* 39 = old setpgrp */
99b1e299 180 2, olstat, /* 40 = lstat */
2966ca0e
KM
181 1, dup, /* 41 = dup */
182 1, pipe, /* 42 = pipe */
183 0, nosys, /* 43 = old times */
184 4, profil, /* 44 = profil */
185 0, ultrixtobsd, /* 45 = unused */
186 0, nosys, /* 46 = old setgid */
187 0, getgid, /* 47 = getgid */
188 0, nosys, /* 48 = old sigsys */
189 0, nosys, /* 49 = reserved for USG */
190 0, nosys, /* 50 = reserved for USG */
191 1, notimp, /* 51 = acct */
192 0, nosys, /* 52 = old set phys addr */
193 0, nosys, /* 53 = old lock in core */
194 3, ioctl, /* 54 = ioctl */
195 1, reboot, /* 55 = reboot */
196 0, nosys, /* 56 = old mpxchan */
197 2, symlink, /* 57 = symlink */
198 3, readlink, /* 58 = readlink */
199 3, execve, /* 59 = execve */
200 1, umask, /* 60 = umask */
201 1, chroot, /* 61 = chroot */
99b1e299 202 2, ofstat, /* 62 = fstat */
2966ca0e 203 0, nosys, /* 63 = unused */
ef2387cd 204 0, ogetpagesize, /* 64 = getpagesize */
2966ca0e
KM
205 0, notimp, /* 65 = mremap */
206 0, vfork, /* 66 = vfork */
207 0, nosys, /* 67 = old vread */
208 0, nosys, /* 68 = old vwrite */
209 1, sbrk, /* 69 = sbrk */
210 1, sstk, /* 70 = sstk */
211 0, nosys, /* 71 = mmap */
212 0, nosys, /* 72 = old vadvise */
213 0, notimp, /* 73 = munmap */
214 0, notimp, /* 74 = mprotect */
215 0, notimp, /* 75 = madvise */
216 0, notimp, /* 76 = vhangup */
217 0, nosys, /* 77 = old vlimit */
218 0, nosys, /* 78 = mincore */
219 2, getgroups, /* 79 = getgroups */
220 2, setgroups, /* 80 = setgroups */
221 1, ultrixgetpgrp, /* 81 = getpgrp */
222 2, ultrixsetpgrp, /* 82 = setpgrp */
223 3, setitimer, /* 83 = setitimer */
224 3, ultrixwait3, /* 84 = wait3 */
225 1, notimp, /* 85 = swapon */
226 2, getitimer, /* 86 = getitimer */
ef2387cd
RC
227 2, ogethostname, /* 87 = gethostname */
228 2, osethostname, /* 88 = sethostname */
2966ca0e
KM
229 0, getdtablesize, /* 89 = getdtablesize */
230 2, dup2, /* 90 = dup2 */
231 0, notimp, /* 91 = getdopt */
232 3, fcntl, /* 92 = fcntl */
233 5, select, /* 93 = select */
234 0, notimp, /* 94 = setdopt */
235 1, fsync, /* 95 = fsync */
236 3, setpriority, /* 96 = setpriority */
237 3, socket, /* 97 = socket */
238 3, connect, /* 98 = connect */
239 3, oaccept, /* 99 = accept */
240 2, getpriority, /* 100 = getpriority */
241 4, osend, /* 101 = send */
242 4, orecv, /* 102 = recv */
0b7c38d2 243 1, sigreturn, /* 103 = sigreturn */
2966ca0e
KM
244 3, bind, /* 104 = bind */
245 5, setsockopt, /* 105 = setsockopt */
246 2, listen, /* 106 = listen */
247 0, nosys, /* 107 = old vtimes */
248 4, ultrixsigvec, /* 108 = sigvec */
249 1, osigblock, /* 109 = sigblock */
250 1, osigsetmask, /* 110 = sigsetmask */
251 1, sigsuspend, /* 111 = sigpause */
99b1e299 252 2, osigstack, /* 112 = sigstack */
2966ca0e
KM
253 3, orecvmsg, /* 113 = recvmsg */
254 3, osendmsg, /* 114 = sendmsg */
255 0, nosys, /* 115 = old vtrace */
256 2, gettimeofday, /* 116 = gettimeofday */
257 2, getrusage, /* 117 = getrusage */
258 5, getsockopt, /* 118 = getsockopt */
259 0, nosys, /* 119 = old resuba */
260 3, readv, /* 120 = readv */
261 3, writev, /* 121 = writev */
262 2, settimeofday, /* 122 = settimeofday */
263 3, fchown, /* 123 = fchown */
264 2, fchmod, /* 124 = fchmod */
265 6, orecvfrom, /* 125 = recvfrom */
266 2, osetreuid, /* 126 = setreuid */
267 2, osetregid, /* 127 = setregid */
268 2, rename, /* 128 = rename */
269 2, truncate, /* 129 = truncate */
270 2, ftruncate, /* 130 = ftruncate */
271 2, flock, /* 131 = flock */
272 0, nosys, /* 132 = nosys */
273 6, sendto, /* 133 = sendto */
274 2, shutdown, /* 134 = shutdown */
275 5, socketpair, /* 135 = socketpair */
276 2, mkdir, /* 136 = mkdir */
277 1, rmdir, /* 137 = rmdir */
278 2, utimes, /* 138 = utimes */
0b7c38d2 279 1, sigreturn, /* 139 = internal (4.2 sigreturn) */
2966ca0e
KM
280 2, adjtime, /* 140 = adjtime */
281 3, ogetpeername, /* 141 = getpeername */
ef2387cd
RC
282 2, ogethostid, /* 142 = gethostid */
283 2, osethostid, /* 143 = sethostid */
2966ca0e
KM
284 2, getrlimit, /* 144 = getrlimit */
285 2, setrlimit, /* 145 = setrlimit */
286 2, okillpg, /* 146 = killpg */
287 0, nosys, /* 147 = nosys */
288 0, notimp, /* 148 = setquota */
289 0, notimp, /* 149 = quota */
ef2387cd 290 3, ogetsockname, /* 150 = getsockname */
2966ca0e
KM
291 /*
292 * ULTRIX specific syscalls
293 */
294 0, notimp, /* 151 = sysmips */
295 0, notimp, /* 152 = cacheflush */
296 0, notimp, /* 153 = cachectl */
297 0, notimp, /* 154 = debug */
298 0, nosys, /* 155 = nosys */
299 0, nosys, /* 156 = nosys */
300 0, nosys, /* 157 = nosys */
301 0, notimp, /* 158 = nfs_svc */
dce716e4 302 4, ogetdirentries, /* 159 = getdirentries */
2966ca0e
KM
303 0, nosys, /* 160 = nosys */
304 0, nosys, /* 161 = nosys */
305 0, nosys, /* 162 = nosys */
306 0, notimp, /* 163 = nfs_biod */
307 0, notimp, /* 164 = nfs_getfh */
dce716e4
RC
308 0, ultrixgetdomainname, /* 165 = getdomainname */
309 0, ultrixsetdomainname, /* 166 = setdomainname */
2966ca0e
KM
310 0, nosys, /* 167 = nosys */
311 0, nosys, /* 168 = nosys */
312 0, notimp, /* 169 = exportfs */
313 0, nosys, /* 170 = nosys */
314 0, nosys, /* 171 = nosys */
315 0, notimp, /* 172 = msgctl */
316 0, notimp, /* 173 = msgget */
317 0, notimp, /* 174 = msgrcv */
318 0, notimp, /* 175 = msgsnd */
319 0, notimp, /* 176 = semctl */
320 0, notimp, /* 177 = semget */
321 0, notimp, /* 178 = semop */
322 0, notimp, /* 179 = uname */
323 0, notimp, /* 180 = shmsys */
324 0, notimp, /* 181 = plock */
325 0, notimp, /* 182 = lockf */
326 0, notimp, /* 183 = ustat */
327 0, notimp, /* 184 = getmnt */
328 0, notimp, /* 185 = mount */
329 0, notimp, /* 186 = umount */
330 0, notimp, /* 187 = sigpending */
331 0, nosys, /* 188 = nosys */
332 0, nosys, /* 189 = nosys */
333 0, nosys, /* 190 = nosys */
334 0, nosys, /* 191 = nosys */
335 0, nosys, /* 192 = nosys */
336 0, nosys, /* 193 = nosys */
337 0, nosys, /* 194 = nosys */
338 0, nosys, /* 195 = nosys */
339 0, nosys, /* 196 = nosys */
340 0, nosys, /* 197 = nosys */
341 0, nosys, /* 198 = nosys */
342 0, nosys, /* 199 = nosys */
343 0, nosys, /* 200 = nosys */
344 0, nosys, /* 201 = nosys */
345 0, nosys, /* 202 = nosys */
346 0, nosys, /* 203 = nosys */
347 0, nosys, /* 204 = nosys */
348 0, nosys, /* 205 = nosys */
349 0, nosys, /* 206 = nosys */
350 0, nosys, /* 207 = nosys */
351 0, nosys, /* 208 = nosys */
352 0, nosys, /* 209 = nosys */
353 0, nosys, /* 210 = nosys */
354 0, nosys, /* 211 = nosys */
355 0, nosys, /* 212 = nosys */
356 0, nosys, /* 213 = nosys */
357 0, nosys, /* 214 = nosys */
358 0, nosys, /* 215 = nosys */
359 0, nosys, /* 216 = nosys */
360 0, nosys, /* 217 = nosys */
361 0, nosys, /* 218 = nosys */
362 0, nosys, /* 219 = nosys */
363 0, nosys, /* 220 = nosys */
364 0, nosys, /* 221 = nosys */
365 0, nosys, /* 222 = nosys */
366 0, nosys, /* 223 = nosys */
367 0, nosys, /* 224 = nosys */
368 0, nosys, /* 225 = nosys */
369 0, nosys, /* 226 = nosys */
370 0, nosys, /* 227 = nosys */
371 0, nosys, /* 228 = nosys */
372 0, nosys, /* 229 = nosys */
373 0, nosys, /* 230 = nosys */
374 0, nosys, /* 231 = nosys */
375 0, nosys, /* 232 = nosys */
376 0, notimp, /* 233 = nosys */
377 0, notimp, /* 234 = nosys */
378 0, notimp, /* 235 = nosys */
379 0, nosys, /* 236 = nosys */
380 0, notimp, /* 237 = nosys */
381 0, notimp, /* 238 = nosys */
382 0, nosys, /* 239 = nosys */
383 0, nosys, /* 240 = nosys */
384 0, nosys, /* 241 = nosys */
385 0, nosys, /* 242 = nosys */
386 0, nosys, /* 243 = nosys */
387 0, nosys, /* 244 = nosys */
388 0, nosys, /* 245 = nosys */
389 0, nosys, /* 246 = nosys */
390 0, nosys, /* 247 = nosys */
391 0, nosys, /* 248 = nosys */
392 0, nosys, /* 249 = nosys */
393 0, nosys, /* 250 = nosys */
394 0, nosys, /* 251 = nosys */
395 0, nosys, /* 252 = nosys */
396 0, nosys, /* 253 = nosys */
397 0, nosys, /* 254 = nosys */
398 0, nosys, /* 255 = nosys */
399 0, ultrixgetsysinfo, /* 256 = getsysinfo */
400 0, notimp, /* 257 = setsysinfo */
401};
402int ultrixnsysent = sizeof(ultrixsysent) / sizeof (ultrixsysent[0]);