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