1 /* This file contains the table used to map system call numbers onto the
2 * routines that perform them.
8 #include <minix/callnr.h>
13 #include "scratchpad.h"
17 int (*call_vec
[])(void) = {
18 no_sys
, /* 0 = unused */
19 no_sys
, /* 1 = (exit) */
20 no_sys
, /* 2 = (fork) */
21 do_read
, /* 3 = read */
22 do_write
, /* 4 = write */
23 do_open
, /* 5 = open */
24 do_close
, /* 6 = close */
25 no_sys
, /* 7 = wait */
26 do_creat
, /* 8 = creat */
27 do_link
, /* 9 = link */
28 do_unlink
, /* 10 = unlink */
29 no_sys
, /* 11 = waitpid */
30 do_chdir
, /* 12 = chdir */
31 no_sys
, /* 13 = time */
32 do_mknod
, /* 14 = mknod */
33 do_chmod
, /* 15 = chmod */
34 do_chown
, /* 16 = chown */
35 no_sys
, /* 17 = break */
36 do_stat
, /* 18 = stat (prev)*/
37 do_lseek
, /* 19 = lseek */
38 no_sys
, /* 20 = getpid */
39 do_mount
, /* 21 = mount */
40 do_umount
, /* 22 = umount */
41 no_sys
, /* 23 = (setuid) */
42 no_sys
, /* 24 = getuid */
43 no_sys
, /* 25 = (stime) */
44 no_sys
, /* 26 = ptrace */
45 no_sys
, /* 27 = alarm */
46 do_fstat
, /* 28 = fstat (prev)*/
47 no_sys
, /* 29 = pause */
48 do_utime
, /* 30 = utime */
49 no_sys
, /* 31 = (stty) */
50 no_sys
, /* 32 = (gtty) */
51 do_access
, /* 33 = access */
52 no_sys
, /* 34 = (nice) */
53 no_sys
, /* 35 = (ftime) */
54 do_sync
, /* 36 = sync */
55 no_sys
, /* 37 = kill */
56 do_rename
, /* 38 = rename */
57 do_mkdir
, /* 39 = mkdir */
58 do_unlink
, /* 40 = rmdir */
59 do_dup
, /* 41 = dup */
60 do_pipe
, /* 42 = pipe */
61 no_sys
, /* 43 = times */
62 no_sys
, /* 44 = (prof) */
63 do_slink
, /* 45 = symlink */
64 no_sys
, /* 46 = (setgid)*/
65 no_sys
, /* 47 = getgid */
66 no_sys
, /* 48 = (signal)*/
67 do_rdlink
, /* 49 = readlink*/
68 do_lstat
, /* 50 = lstat (prev)*/
69 do_stat
, /* 51 = stat */
70 do_fstat
, /* 52 = fstat */
71 do_lstat
, /* 53 = lstat */
72 do_ioctl
, /* 54 = ioctl */
73 do_fcntl
, /* 55 = fcntl */
74 no_sys
, /* 56 = (mpx) */
75 do_fsready
, /* 57 = FS proc ready */
76 no_sys
, /* 58 = unused */
77 no_sys
, /* 59 = (execve)*/
78 do_umask
, /* 60 = umask */
79 do_chroot
, /* 61 = chroot */
80 no_sys
, /* 62 = (setsid)*/
81 no_sys
, /* 63 = (getpgrp)*/
82 no_sys
, /* 64 = (itimer)*/
83 do_stat
, /* 65 = stat - badly numbered, being phased out */
84 do_fstat
, /* 66 = fstat - badly numbered, being phased out */
85 do_lstat
, /* 67 = lstat - badly numbered, being phased out */
86 no_sys
, /* 68 = unused */
87 no_sys
, /* 69 = unused */
88 no_sys
, /* 70 = unused */
89 no_sys
, /* 71 = (sigaction) */
90 no_sys
, /* 72 = (sigsuspend) */
91 no_sys
, /* 73 = (sigpending) */
92 no_sys
, /* 74 = (sigprocmask) */
93 no_sys
, /* 75 = (sigreturn) */
94 no_sys
, /* 76 = (reboot) */
95 do_svrctl
, /* 77 = svrctl */
96 no_sys
, /* 78 = (sysuname) */
97 no_sys
, /* 79 = unused */
98 do_getdents
, /* 80 = getdents */
99 do_llseek
, /* 81 = llseek */
100 do_fstatfs
, /* 82 = fstatfs */
101 do_statvfs
, /* 83 = fstatvfs */
102 do_fstatvfs
, /* 84 = statvfs */
103 do_select
, /* 85 = select */
104 do_fchdir
, /* 86 = fchdir */
105 do_fsync
, /* 87 = fsync */
106 no_sys
, /* 88 = (getpriority) */
107 no_sys
, /* 89 = (setpriority) */
108 no_sys
, /* 90 = (gettimeofday) */
109 no_sys
, /* 91 = (seteuid) */
110 no_sys
, /* 92 = (setegid) */
111 do_truncate
, /* 93 = truncate */
112 do_ftruncate
, /* 94 = truncate */
113 do_chmod
, /* 95 = fchmod */
114 do_chown
, /* 96 = fchown */
115 no_sys
, /* 97 = unused */
116 no_sys
, /* 98 = (sprofile) */
117 no_sys
, /* 99 = (cprofile) */
118 no_sys
, /* 100 = (newexec) */
119 no_sys
, /* 101 = (srv_fork) */
120 no_sys
, /* 102 = (exec_restart) */
121 no_sys
, /* 103 = unused */
122 no_sys
, /* 104 = (getprocnr) */
123 no_sys
, /* 105 = unused */
124 no_sys
, /* 106 = unused */
125 no_sys
, /* 107 = (getepinfo) */
126 no_sys
, /* 108 = unused */
127 no_sys
, /* 109 = unused */
128 no_sys
, /* 110 = unused */
129 no_sys
, /* 111 = (srv_kill) */
130 do_gcov_flush
, /* 112 = gcov_flush */
131 no_sys
, /* 113 = (getsid) */
133 /* This should not fail with "array size is negative": */
134 extern int dummy
[sizeof(call_vec
) == NCALLS
* sizeof(call_vec
[0]) ? 1 : -1];
136 int (*pfs_call_vec
[])(void) = {
139 do_check_perms
, /* 1 */
140 do_verify_fd
, /* 2 */
142 do_copy_filp
, /* 4 */