]> git.saurik.com Git - apple/xnu.git/blob - bsd/kern/init_sysent.c
58cfb48ecc970c5dd222ab32694eb29dd570ef74
[apple/xnu.git] / bsd / kern / init_sysent.c
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /* Copyright (c) 1995-1999 Apple Computer, Inc. All Rights Reserved */
23 /*
24 * HISTORY
25 * 12-Feb-00 Clark Warner (warner_c) at Apple
26 * Added copyfile system call
27 * 26-Jul-99 Earsh Nandkeshwar (earsh) at Apple
28 * Changed getdirentryattr to getdirentriesattr
29 * 22-Jan-98 Clark Warner (warner_c) at Apple
30 * Created new system calls for supporting HFS/HFS Plus file system semantics
31 *
32 * 04-Jun-95 Mac Gillon (mgillon) at NeXT
33 * Created new version based on NS3.3 and 4.4BSD
34 *
35 */
36
37
38 #include <sys/param.h>
39 #include <sys/systm.h>
40 #include <sys/signal.h>
41 #include <sys/mount.h>
42
43 /* serial or parallel system call */
44 #define syss(fn,no) {no, 0, KERNEL_FUNNEL, fn}
45 #define sysp(fn,no) {no, 1, KERNEL_FUNNEL, fn}
46 #define sysnets(fn,no) {no, 0, NETWORK_FUNNEL, fn}
47 #define sysnetp(fn,no) {no, 1, NETWORK_FUNNEL, fn}
48 /*
49 * definitions
50 */
51 int nosys();
52 int exit();
53 int fork();
54 int read();
55 int write();
56 int open();
57 int close();
58 int wait4();
59 int link();
60 int unlink();
61 int chdir();
62 int fchdir();
63 int mknod();
64 int chmod();
65 int chown();
66 int obreak();
67 int getfsstat();
68 #if COMPAT_GETFSSTAT
69 int ogetfsstat();
70 #endif
71 int getpid();
72 int mount();
73 int unmount();
74 int setuid();
75 int getuid();
76 int geteuid();
77 int ptrace();
78 int recvmsg();
79 int sendmsg();
80 int recvfrom();
81 int accept();
82 int getpeername();
83 int getsockname();
84 int access();
85 int chflags();
86 int fchflags();
87 int sync();
88 int kill();
89 int getppid();
90 int dup();
91 int pipe();
92 int getegid();
93 int profil();
94 int load_shared_file();
95 int reset_shared_file();
96 #if KTRACE
97 int ktrace();
98 #else
99 #endif
100 int sigaction();
101 int getgid();
102 int sigprocmask();
103 int getlogin();
104 int setlogin();
105 int acct();
106 int sigpending();
107 int sigaltstack();
108 int ioctl();
109 int reboot();
110 int revoke();
111 int symlink();
112 int readlink();
113 int execve();
114 int umask();
115 int chroot();
116 int msync();
117 int vfork();
118 int sbrk();
119 int sstk();
120 int ovadvise();
121 int munmap();
122 int mprotect();
123 int madvise();
124 int mincore();
125 int getgroups();
126 int setgroups();
127 int getpgrp();
128 int setpgid();
129 int setitimer();
130 int swapon();
131 int getitimer();
132 int getdtablesize();
133 int dup2();
134 int fcntl();
135 int select();
136 int fsync();
137 int setpriority();
138 int socket();
139 int connect();
140 int getpriority();
141 int sigreturn();
142 int bind();
143 int setsockopt();
144 int listen();
145 int sigsuspend();
146 #if TRACE
147 int vtrace();
148 #else
149 #endif
150 int gettimeofday();
151 int getrusage();
152 int getsockopt();
153 int readv();
154 int writev();
155 int settimeofday();
156 int fchown();
157 int fchmod();
158 int rename();
159 int flock();
160 int mkfifo();
161 int sendto();
162 int shutdown();
163 int socketpair();
164 int mkdir();
165 int rmdir();
166 int utimes();
167 int adjtime();
168 int setsid();
169 int quotactl();
170 int nfssvc();
171 int statfs();
172 int fstatfs();
173 int getfh();
174 int setgid();
175 int setegid();
176 int seteuid();
177 #if LFS
178 int lfs_bmapv();
179 int lfs_markv();
180 int lfs_segclean();
181 int lfs_segwait();
182 #else
183 #endif
184 int stat();
185 int fstat();
186 int lstat();
187 int pathconf();
188 int fpathconf();
189 int getrlimit();
190 int setrlimit();
191 int getdirentries();
192 int mmap();
193 int nosys();
194 int lseek();
195 int truncate();
196 int ftruncate();
197 int __sysctl();
198 int undelete();
199 int setprivexec();
200 int add_profil();
201 #ifdef NOTEVER
202 int table();
203 #endif /* NOTEVER */
204
205 int kdebug_trace();
206
207 int mlock();
208 int munlock();
209 int minherit();
210 int mlockall();
211 int munlockall();
212 #if COMPAT_43
213 #define compat(name,n) syss(__CONCAT(o,name),n)
214 #define compatp(name,n) sysp(__CONCAT(o,name),n)
215 #define comaptnet(name,n) sysnets(__CONCAT(o,name),n)
216 #define comaptnetp(name,n) sysnetp(__CONCAT(o,name),n)
217
218 int ocreat();
219 int olseek();
220 int ostat();
221 int olstat();
222 #if KTRACE
223 #else
224 #endif
225 int ofstat();
226 int ogetkerninfo();
227 int osmmap();
228 int ogetpagesize();
229 int ommap();
230 int owait();
231 int ogethostname();
232 int osethostname();
233 int oaccept();
234 int osend();
235 int orecv();
236 int osigvec();
237 int osigblock();
238 int osigsetmask();
239 int osigstack();
240 int orecvmsg();
241 int osendmsg();
242 #if TRACE
243 #else
244 #endif
245 int orecvfrom();
246 int osetreuid();
247 int osetregid();
248 int otruncate();
249 int oftruncate();
250 int ogetpeername();
251 int ogethostid();
252 int osethostid();
253 int ogetrlimit();
254 int osetrlimit();
255 int okillpg();
256 int oquota();
257 int ogetsockname();
258 int ogetdomainname();
259 int osetdomainname();
260 int owait3();
261 #if NFS
262 #else
263 #endif
264 int ogetdirentries();
265 #if NFS
266 #else
267 #endif
268 #if LFS
269 #else
270 #endif
271
272 #if NETAT
273 int ATsocket();
274 int ATgetmsg();
275 int ATputmsg();
276 int ATPsndreq();
277 int ATPsndrsp();
278 int ATPgetreq();
279 int ATPgetrsp();
280 #endif /* NETAT */
281
282 /* Calls for supporting HFS Semantics */
283
284 int mkcomplex();
285 int statv();
286 int lstatv();
287 int fstatv();
288 int getattrlist();
289 int setattrlist();
290 int getdirentriesattr();
291 int exchangedata();
292 int checkuseraccess();
293 int searchfs();
294 int delete();
295 int copyfile();
296
297 /* end of HFS calls */
298
299 #else /* COMPAT_43 */
300 #define compat(n, name) syss(nosys,0)
301 #define compatp(n, name) sysp(nosys,0)
302 #define comaptnet(n, name) sysnets(nosys,0)
303 #define comaptnetp(n, name) sysnetp(nosys,0)
304 #endif /* COMPAT_43 */
305
306 int watchevent();
307 int waitevent();
308 int modwatch();
309 int fsctl();
310 int semsys();
311 int msgsys();
312 int shmsys();
313 int semctl();
314 int semget();
315 int semop();
316 int semconfig();
317 int msgctl();
318 int msgget();
319 int msgsnd();
320 int msgrcv();
321 int shmat();
322 int shmctl();
323 int shmdt();
324 int shmget();
325 int shm_open();
326 int shm_unlink();
327 int sem_open();
328 int sem_close();
329 int sem_unlink();
330 int sem_wait();
331 int sem_trywait();
332 int sem_post();
333 int sem_getvalue();
334 int sem_init();
335 int sem_destroy();
336 /*
337 * System call switch table.
338 */
339
340
341 struct sysent sysent[] = {
342 syss(nosys,0), /* 0 = indir */
343 syss(exit,1), /* 1 = exit */
344 syss(fork,0), /* 2 = fork */
345 sysp(read,3), /* 3 = read */
346 sysp(write,3), /* 4 = write */
347 syss(open,3), /* 5 = open */
348 syss(close,1), /* 6 = close */
349 syss(wait4, 4), /* 7 = wait4 */
350 compat(creat,2), /* 8 = old creat */
351 syss(link,2), /* 9 = link */
352 syss(unlink,1), /* 10 = unlink */
353 syss(nosys, 0), /* 11 was obsolete execv */
354 syss(chdir,1), /* 12 = chdir */
355 syss(fchdir,1), /* 13 = fchdir */
356 syss(mknod,3), /* 14 = mknod */
357 syss(chmod,2), /* 15 = chmod */
358 syss(chown,3), /* 16 = chown; now 3 args */
359 syss(obreak,1), /* 17 = old break */
360 #if COMPAT_GETFSSTAT
361 syss(ogetfsstat, 3), /* 18 = ogetfsstat */
362 #else
363 syss(getfsstat, 3), /* 18 = getfsstat */
364 #endif
365 compat(lseek,3), /* 19 = old lseek */
366 sysp(getpid,0), /* 20 = getpid */
367 syss(nosys, 0), /* 21 was obsolete mount */
368 syss(nosys, 0), /* 22 was obsolete umount */
369 syss(setuid,1), /* 23 = setuid */
370 sysp(getuid,0), /* 24 = getuid */
371 sysp(geteuid,0), /* 25 = geteuid */
372 syss(ptrace,4), /* 26 = ptrace */
373 sysnets(recvmsg,3), /* 27 = recvmsg */
374 sysnets(sendmsg,3), /* 28 = sendmsg */
375 sysnets(recvfrom,6), /* 29 = recvfrom */
376 sysnets(accept,3), /* 30 = accept */
377 sysnets(getpeername,3), /* 31 = getpeername */
378 sysnets(getsockname,3), /* 32 = getsockname */
379 syss(access,2), /* 33 = access */
380 syss(chflags,2), /* 34 = chflags */
381 syss(fchflags,2), /* 35 = fchflags */
382 syss(sync,0), /* 36 = sync */
383 syss(kill,2), /* 37 = kill */
384 compat(stat,2), /* 38 = old stat */
385 sysp(getppid,0), /* 39 = getppid */
386 compat(lstat,2), /* 40 = old lstat */
387 syss(dup,2), /* 41 = dup */
388 syss(pipe,0), /* 42 = pipe */
389 sysp(getegid,0), /* 43 = getegid */
390 syss(profil,4), /* 44 = profil */
391 #if KTRACE
392 syss(ktrace,4), /* 45 = ktrace */
393 #else
394 syss(nosys,0), /* 45 = nosys */
395 #endif
396 syss(sigaction,3), /* 46 = sigaction */
397 sysp(getgid,0), /* 47 = getgid */
398 syss(sigprocmask,2), /* 48 = sigprocmask */
399 syss(getlogin,2), /* 49 = getlogin */
400 syss(setlogin,1), /* 50 = setlogin */
401 syss(acct,1), /* 51 = turn acct off/on */
402 syss(sigpending,0), /* 52 = sigpending */
403 syss(sigaltstack,2), /* 53 = sigaltstack */
404 syss(ioctl,3), /* 54 = ioctl */
405 syss(reboot,2), /* 55 = reboot */
406 syss(revoke,1), /* 56 = revoke */
407 syss(symlink,2), /* 57 = symlink */
408 syss(readlink,3), /* 58 = readlink */
409 syss(execve,3), /* 59 = execve */
410 syss(umask,1), /* 60 = umask */
411 syss(chroot,1), /* 61 = chroot */
412 compat(fstat,2), /* 62 = old fstat */
413 syss(nosys,0), /* 63 = used internally, reserved */
414 compat(getpagesize,0), /* 64 = old getpagesize */
415 syss(msync,3), /* 65 = msync */
416 syss(vfork,0), /* 66 = vfork */
417 syss(nosys,0), /* 67 was obsolete vread */
418 syss(nosys,0), /* 68 was obsolete vwrite */
419 syss(sbrk,1), /* 69 = sbrk */
420 syss(sstk,1), /* 70 = sstk */
421 compat(smmap,6), /* 71 = old mmap */
422 syss(ovadvise,1), /* 72 = old vadvise */
423 syss(munmap,2), /* 73 = munmap */
424 syss(mprotect,3), /* 74 = mprotect */
425 syss(madvise,3), /* 75 = madvise */
426 syss(nosys,0), /* 76 was obsolete vhangup */
427 syss(nosys,0), /* 77 was obsolete vlimit */
428 syss(mincore,3), /* 78 = mincore */
429 sysp(getgroups,2), /* 79 = getgroups */
430 sysp(setgroups,2), /* 80 = setgroups */
431 sysp(getpgrp,0), /* 81 = getpgrp */
432 sysp(setpgid,2), /* 82 = setpgid */
433 syss(setitimer,3), /* 83 = setitimer */
434 compat(wait,0), /* 84 = old wait */
435 syss(swapon,1), /* 85 = swapon */
436 syss(getitimer,2), /* 86 = getitimer */
437 compat(gethostname,2), /* 87 = old gethostname */
438 compat(sethostname,2), /* 88 = old sethostname */
439 sysp(getdtablesize, 0), /* 89 getdtablesize */
440 syss(dup2,2), /* 90 = dup2 */
441 syss(nosys,0), /* 91 was obsolete getdopt */
442 syss(fcntl,3), /* 92 = fcntl */
443 syss(select,5), /* 93 = select */
444 syss(nosys,0), /* 94 was obsolete setdopt */
445 syss(fsync,1), /* 95 = fsync */
446 sysp(setpriority,3), /* 96 = setpriority */
447 sysnets(socket,3), /* 97 = socket */
448 sysnets(connect,3), /* 98 = connect */
449 comaptnet(accept,3), /* 99 = accept */
450 sysp(getpriority,2), /* 100 = getpriority */
451 comaptnet(send,4), /* 101 = old send */
452 comaptnet(recv,4), /* 102 = old recv */
453 syss(sigreturn,1), /* 103 = sigreturn */
454 sysnets(bind,3), /* 104 = bind */
455 sysnets(setsockopt,5), /* 105 = setsockopt */
456 sysnets(listen,2), /* 106 = listen */
457 syss(nosys,0), /* 107 was vtimes */
458 compat(sigvec,3), /* 108 = sigvec */
459 compat(sigblock,1), /* 109 = sigblock */
460 compat(sigsetmask,1), /* 110 = sigsetmask */
461 syss(sigsuspend,1), /* 111 = sigpause */
462 compat(sigstack,2), /* 112 = sigstack */
463 comaptnet(recvmsg,3), /* 113 = recvmsg */
464 comaptnet(sendmsg,3), /* 114 = sendmsg */
465 syss(nosys,0), /* 115 = old vtrace */
466 syss(gettimeofday,2), /* 116 = gettimeofday */
467 sysp(getrusage,2), /* 117 = getrusage */
468 sysnets(getsockopt,5), /* 118 = getsockopt */
469 syss(nosys,0), /* 119 = old resuba */
470 sysp(readv,3), /* 120 = readv */
471 sysp(writev,3), /* 121 = writev */
472 syss(settimeofday,2), /* 122 = settimeofday */
473 syss(fchown,3), /* 123 = fchown */
474 syss(fchmod,2), /* 124 = fchmod */
475 comaptnet(recvfrom,6), /* 125 = recvfrom */
476 compat(setreuid,2), /* 126 = setreuid */
477 compat(setregid,2), /* 127 = setregid */
478 syss(rename,2), /* 128 = rename */
479 compat(truncate,2), /* 129 = old truncate */
480 compat(ftruncate,2), /* 130 = ftruncate */
481 syss(flock,2), /* 131 = flock */
482 syss(mkfifo,2), /* 132 = nosys */
483 sysnets(sendto,6), /* 133 = sendto */
484 sysnets(shutdown,2), /* 134 = shutdown */
485 sysnets(socketpair,5), /* 135 = socketpair */
486 syss(mkdir,2), /* 136 = mkdir */
487 syss(rmdir,1), /* 137 = rmdir */
488 syss(utimes,2), /* 138 = utimes */
489 syss(nosys,0), /* 139 = used internally */
490 syss(adjtime,2), /* 140 = adjtime */
491 comaptnet(getpeername,3),/* 141 = getpeername */
492 compat(gethostid,0), /* 142 = old gethostid */
493 sysp(nosys,0), /* 143 = old sethostid */
494 compat(getrlimit,2), /* 144 = old getrlimit */
495 compat(setrlimit,2), /* 145 = old setrlimit */
496 compat(killpg,2), /* 146 = old killpg */
497 syss(setsid,0), /* 147 = setsid */
498 syss(nosys,0), /* 148 was setquota */
499 syss(nosys,0), /* 149 was qquota */
500 comaptnet(getsockname,3),/* 150 = getsockname */
501 /*
502 * Syscalls 151-183 inclusive are reserved for vendor-specific
503 * system calls. (This includes various calls added for compatibity
504 * with other Unix variants.)
505 */
506 syss(nosys,0), /* 151 was m68k specific machparam */
507 sysp(setprivexec,1),/* 152 = setprivexec */
508 syss(nosys,0), /* 153 */
509 syss(nosys,0), /* 154 */
510 syss(nfssvc,2), /* 155 = nfs_svc */
511 compat(getdirentries,4), /* 156 = old getdirentries */
512 syss(statfs, 2), /* 157 = statfs */
513 syss(fstatfs, 2), /* 158 = fstatfs */
514 syss(unmount, 2), /* 159 = unmount */
515 syss(nosys,0), /* 160 was async_daemon */
516 syss(getfh,2), /* 161 = get file handle */
517 /*?????*/
518 compat(getdomainname,2), /* 162 = getdomainname */
519 compat(setdomainname,2), /* 163 = setdomainname */
520 syss(nosys,0), /* 164 */
521 #if QUOTA
522 syss(quotactl, 4), /* 165 = quotactl */
523 #else QUOTA
524 syss(nosys, 0), /* 165 = not configured */
525 #endif /* QUOTA */
526 syss(nosys,0), /* 166 was exportfs */
527 syss(mount, 4), /* 167 = mount */
528 syss(nosys,0), /* 168 was ustat */
529 syss(nosys,0), /* 169 = nosys */
530 syss(nosys,0), /* 170 was table */
531 compat(wait3,3), /* 171 = old wait3 */
532 syss(nosys,0), /* 172 was rpause */
533 syss(nosys,0), /* 173 = nosys */
534 syss(nosys,0), /* 174 was getdents */
535 syss(nosys,0), /* 175 was gc_control */
536 syss(add_profil,4), /* 176 = add_profil */
537 syss(nosys,0), /* 177 */
538 syss(nosys,0), /* 178 */
539 syss(nosys,0), /* 179 */
540 syss(kdebug_trace,0), /* 180 */
541 syss(setgid,1), /* 181 */
542 syss(setegid,1), /* 182 */
543 syss(seteuid,1), /* 183 */
544 #if LFS
545 syss(lfs_bmapv,3), /* 184 = lfs_bmapv */
546 syss(lfs_markv,3), /* 185 = lfs_markv */
547 syss(lfs_segclean,2), /* 186 = lfs_segclean */
548 syss(lfs_segwait,2), /* 187 = lfs_segwait */
549 #else
550 syss(nosys,0), /* 184 = nosys */
551 syss(nosys,0), /* 185 = nosys */
552 syss(nosys,0), /* 186 = nosys */
553 syss(nosys,0), /* 187 = nosys */
554 #endif
555 syss(stat,2), /* 188 = stat */
556 syss(fstat,2), /* 189 = fstat */
557 syss(lstat,2), /* 190 = lstat */
558 syss(pathconf,2), /* 191 = pathconf */
559 syss(fpathconf,2), /* 192 = fpathconf */
560 #if COMPAT_GETFSSTAT
561 syss(getfsstat,0), /* 193 = getfsstat */
562 #else
563 syss(nosys,0), /* 193 is unused */
564 #endif
565 syss(getrlimit,2), /* 194 = getrlimit */
566 syss(setrlimit,2), /* 195 = setrlimit */
567 syss(getdirentries,4), /* 196 = getdirentries */
568 #ifdef DOUBLE_ALIGN_PARAMS
569 syss(mmap,8), /* 197 = mmap */
570 #else
571 syss(mmap,7), /* 197 = mmap */
572 #endif
573 syss(nosys,0), /* 198 = __syscall */
574 syss(lseek,5), /* 199 = lseek */
575 syss(truncate,4), /* 200 = truncate */
576 syss(ftruncate,4), /* 201 = ftruncate */
577 syss(__sysctl,6), /* 202 = __sysctl */
578 sysp(mlock, 2), /* 203 = mlock */
579 syss(munlock, 2), /* 204 = munlock */
580 #if NETAT
581 syss(undelete,1), /* 205 = undelete */
582 sysnets(ATsocket,1), /* 206 = AppleTalk ATsocket */
583 sysnets(ATgetmsg,4), /* 207 = AppleTalk ATgetmsg*/
584 sysnets(ATputmsg,4), /* 208 = AppleTalk ATputmsg*/
585 sysnets(ATPsndreq,4), /* 209 = AppleTalk ATPsndreq*/
586 sysnets(ATPsndrsp,4), /* 210 = AppleTalk ATPsndrsp*/
587 sysnets(ATPgetreq,3), /* 211 = AppleTalk ATPgetreq*/
588 sysnets(ATPgetrsp,2), /* 212 = AppleTalk ATPgetrsp*/
589 syss(nosys,0), /* 213 = Reserved for AT expansion */
590 syss(nosys,0), /* 214 = Reserved for AT expansion */
591 syss(nosys,0), /* 215 = Reserved for AT expansion */
592 #else
593 syss(undelete,1), /* 205 = undelete */
594
595 /* System calls 205 - 215 are reserved to allow HFS and AT to coexist */
596 /* CHW 1/22/98 */
597
598 syss(nosys,0), /* 206 = Reserved for AppleTalk */
599 syss(nosys,0), /* 207 = Reserved for AppleTalk */
600 syss(nosys,0), /* 208 = Reserved for AppleTalk */
601 syss(nosys,0), /* 209 = Reserved for AppleTalk */
602 syss(nosys,0), /* 210 = Reserved for AppleTalk */
603 syss(nosys,0), /* 211 = Reserved for AppleTalk */
604 syss(nosys,0), /* 212 = Reserved for AppleTalk */
605 syss(nosys,0), /* 213 = Reserved for AppleTalk */
606 syss(nosys,0), /* 214 = Reserved for AppleTalk */
607 syss(nosys,0), /* 215 = Reserved for AppleTalk */
608 #endif /* NETAT */
609
610 /*
611 * System Calls 216 - 230 are reserved for calls to support HFS/HFS Plus
612 * file system semantics. Currently, we only use 215-227. The rest is
613 * for future expansion in anticipation of new MacOS APIs for HFS Plus.
614 * These calls are not conditionalized becuase while they are specific
615 * to HFS semantics, they are not specific to the HFS filesystem.
616 * We expect all filesystems to recognize the call and report that it is
617 * not supported or to actually implement it.
618 */
619 syss(nosys,3), /* 216 = HFS make complex file call (multipel forks */
620 syss(nosys,2), /* 217 = HFS statv extended stat call for HFS */
621 syss(nosys,2), /* 218 = HFS lstatv extended lstat call for HFS */
622 syss(nosys,2), /* 219 = HFS fstatv extended fstat call for HFS */
623 syss(getattrlist,5), /* 220 = HFS getarrtlist get attribute list cal */
624 syss(setattrlist,5), /* 221 = HFS setattrlist set attribute list */
625 syss(getdirentriesattr,8), /* 222 = HFS getdirentriesattr get directory attributes */
626 syss(exchangedata,3), /* 223 = HFS exchangedata exchange file contents */
627 syss(checkuseraccess,6),/* 224 = HFS checkuseraccess check access to a file */
628 syss(searchfs,6), /* 225 = HFS searchfs to implement catalog searching */
629 syss(delete,1), /* 226 = private HFS delete (with Mac OS semantics) */
630 syss(copyfile,4), /* 227 = Copyfile for orignally for AFP */
631 syss(nosys,0), /* 228 */
632 syss(nosys,0), /* 229 */
633 syss(nosys,0), /* 230 */
634 sysnets(watchevent,2), /* 231 */
635 sysnets(waitevent,2), /* 232 */
636 sysnets(modwatch,2), /* 233 */
637 syss(nosys,0), /* 234 */
638 syss(nosys,0), /* 235 */
639 syss(nosys,0), /* 236 */
640 syss(nosys,0), /* 237 */
641 syss(nosys,0), /* 238 */
642 syss(nosys,0), /* 239 */
643 syss(nosys,0), /* 240 */
644 syss(nosys,0), /* 241 */
645 syss(fsctl,0), /* 242 */
646 syss(nosys,0), /* 243 */
647 syss(nosys,0), /* 244 */
648 syss(nosys,0), /* 245 */
649 syss(nosys,0), /* 246 */
650 syss(nosys,0), /* 247 */
651 syss(nosys,0), /* 248 */
652 syss(nosys,0), /* 249 */
653 syss(minherit,3), /* 250 */
654 syss(semsys,5), /* 251 = semsys */
655 syss(msgsys,6), /* 252 = msgsys */
656 syss(shmsys,4), /* 253 = shmsys */
657 syss(semctl,4), /* 254 = semctl */
658 syss(semget,3), /* 255 = semget */
659 syss(semop,3), /* 256 = semop */
660 syss(semconfig,1), /* 257 = semconfig */
661 syss(msgctl,3), /* 258 = msgctl */
662 syss(msgget,2), /* 259 = msgget */
663 syss(msgsnd,4), /* 260 = msgsnd */
664 syss(msgrcv,5), /* 261 = msgrcv */
665 syss(shmat,3), /* 262 = shmat */
666 syss(shmctl,3), /* 263 = shmctl */
667 syss(shmdt,1), /* 264 = shmdt */
668 syss(shmget,3), /* 265 = shmget */
669 syss(shm_open,3), /* 266 = shm_open */
670 syss(shm_unlink,1), /* 267 = shm_unlink */
671 syss(sem_open,4), /* 268 = sem_open */
672 syss(sem_close,1), /* 269 = sem_close */
673 syss(sem_unlink,1), /* 270 = sem_unlink */
674 syss(sem_wait,1), /* 271 = sem_wait */
675 syss(sem_trywait,1), /* 272 = sem_trywait */
676 syss(sem_post,1), /* 273 = sem_post */
677 syss(sem_getvalue,2), /* 274 = sem_getvalue */
678 syss(sem_init,3), /* 275 = sem_init */
679 syss(sem_destroy,1), /* 276 = sem_destroy */
680 syss(nosys,0), /* 277 */
681 syss(nosys,0), /* 278 */
682 syss(nosys,0), /* 279 */
683 syss(nosys,0), /* 280 */
684 syss(nosys,0), /* 281 */
685 syss(nosys,0), /* 282 */
686 syss(nosys,0), /* 283 */
687 syss(nosys,0), /* 284 */
688 syss(nosys,0), /* 285 */
689 syss(nosys,0), /* 286 */
690 syss(nosys,0), /* 287 */
691 syss(nosys,0), /* 288 */
692 syss(nosys,0), /* 289 */
693 syss(nosys,0), /* 290 */
694 syss(nosys,0), /* 291 */
695 syss(nosys,0), /* 292 */
696 syss(nosys,0), /* 293 */
697 syss(nosys,0), /* 294 */
698 syss(nosys,0), /* 295 */
699 syss(load_shared_file,7), /* 296 */
700 syss(reset_shared_file,3), /* 297 */
701 syss(nosys,0), /* 298 */
702 syss(nosys,0), /* 299 */
703 syss(nosys,0), /* 300 */
704 syss(nosys,0), /* 301 */
705 syss(nosys,0), /* 302 */
706 syss(nosys,0), /* 303 */
707 syss(nosys,0), /* 304 */
708 syss(nosys,0), /* 305 */
709 syss(nosys,0), /* 306 */
710 syss(nosys,0), /* 307 */
711 syss(nosys,0), /* 308 */
712 syss(nosys,0), /* 309 */
713 syss(nosys,0), /* 310 */
714 syss(nosys,0), /* 311 */
715 syss(nosys,0), /* 312 */
716 syss(nosys,0), /* 313 */
717 syss(nosys,0), /* 314 */
718 syss(nosys,0), /* 315 */
719 syss(nosys,0), /* 316 */
720 syss(nosys,0), /* 317 */
721 syss(nosys,0), /* 318 */
722 syss(nosys,0), /* 319 */
723 syss(nosys,0), /* 320 */
724 syss(nosys,0), /* 321 */
725 syss(nosys,0), /* 322 */
726 syss(nosys,0), /* 323 */
727 syss(mlockall,1), /* 324 */
728 syss(munlockall,1), /* 325 */
729 syss(nosys,0), /* 326 */
730 syss(nosys,0), /* 327 */
731 syss(nosys,0), /* 328 */
732 syss(nosys,0), /* 329 */
733 syss(nosys,0), /* 330 */
734 syss(nosys,0), /* 331 */
735 syss(nosys,0), /* 332 */
736 syss(nosys,0), /* 333 */
737 syss(nosys,0), /* 334 */
738 syss(nosys,0), /* 335 */
739 syss(nosys,0), /* 336 */
740 syss(nosys,0), /* 337 */
741 syss(nosys,0), /* 338 */
742 syss(nosys,0), /* 339 */
743 syss(nosys,0), /* 340 */
744 syss(nosys,0), /* 341 */
745 syss(nosys,0), /* 342 */
746 syss(nosys,0), /* 343 */
747 syss(nosys,0), /* 344 */
748 syss(nosys,0), /* 345 */
749 syss(nosys,0), /* 346 */
750 syss(nosys,0), /* 347 */
751 syss(nosys,0), /* 348 */
752 syss(nosys,0) /* 349 */
753 };
754 int nsysent = sizeof(sysent) / sizeof(sysent[0]);