summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/syscalls.master
blob: 8e22a4048de41d1619a105adb9b42a21db0034a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
	$OpenBSD: syscalls.master,v 1.32 2002/07/06 19:14:20 nordin Exp $
;	$NetBSD: syscalls.master,v 1.17 1996/02/10 17:12:51 christos Exp $

;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93

; OpenBSD COMPAT_SVR4 system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
;	number	system call number, must be in order
;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
;		the compatibility options defined in syscalls.conf.
;
; types:
;	STD	always included
;	OBSOL	obsolete, not included in system
;	UNIMPL	unimplemented, not included in system
;	NODEF	included, but don't define the syscall number
;	NOARGS	included, but don't define the syscall args structure
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name.  Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
;	{ pseudo-proto } [alias]
; For other syscalls:
;	[comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall switch definition file only.

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>

#include <compat/svr4/svr4_types.h>
#include <compat/svr4/svr4_time.h>
#include <compat/svr4/svr4_signal.h>
#include <compat/svr4/svr4_ucontext.h>
#include <compat/svr4/svr4_syscallargs.h>
#include <compat/svr4/svr4_statvfs.h>
#include <compat/svr4/svr4_acl.h>

0	NOARGS		{ int sys_nosys(void); } syscall
1	NOARGS		{ int sys_exit(int rval); }
2	NOARGS		{ int sys_fork(void); }
3	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
4	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
5	STD		{ int svr4_sys_open(char *path, int flags, int mode); }
6	NOARGS		{ int sys_close(int fd); }
7	STD		{ int svr4_sys_wait(int *status); }
8	STD		{ int svr4_sys_creat(char *path, int mode); }
9	NOARGS		{ int sys_link(char *path, char *link); }
10	NOARGS		{ int sys_unlink(char *path); }
11	STD		{ int svr4_sys_execv(char *path, char **argp); }
12	NOARGS		{ int sys_chdir(char *path); }
13	STD		{ int svr4_sys_time(svr4_time_t *t); }
14	STD		{ int svr4_sys_mknod(char *path, int mode, int dev); }
15	NOARGS		{ int sys_chmod(char *path, int mode); }
16	NOARGS		{ int sys_chown(char *path, int uid, int gid); }
17	STD		{ int svr4_sys_break(caddr_t nsize); }
18	STD		{ int svr4_sys_stat(char *path, struct svr4_stat* ub); }
19	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, \
			    int whence); }
20	NOARGS		{ pid_t sys_getpid(void); }
21	UNIMPL		old_mount
22	UNIMPL		System V umount
23	NOARGS		{ int sys_setuid(uid_t uid); }
24	NOARGS		{ uid_t sys_getuid(void); }
25	UNIMPL		stime
26	UNIMPL		ptrace
27	STD		{ int svr4_sys_alarm(unsigned sec); }
28	STD		{ int svr4_sys_fstat(int fd, struct svr4_stat *sb); }
29	STD		{ int svr4_sys_pause(void); }
30	STD		{ int svr4_sys_utime(char *path, \
					     struct svr4_utimbuf *ubuf); }
31	UNIMPL		was stty
32	UNIMPL		was gtty
33	STD		{ int svr4_sys_access(char *path, int flags); }
34	STD		{ int svr4_sys_nice(int prio); }
35	UNIMPL		statfs
36	NOARGS		{ int sys_sync(void); }
37	STD		{ int svr4_sys_kill(int pid, int signum); }
38	UNIMPL		fstatfs
39	STD		{ int svr4_sys_pgrpsys(int cmd, int pid, int pgid); }
40	UNIMPL		xenix
41	NOARGS		{ int sys_dup(u_int fd); }
42	NOARGS		{ int sys_opipe(void); }
43	STD		{ int svr4_sys_times(struct tms *tp); }
44	UNIMPL		profil
45	UNIMPL		plock
46	NOARGS		{ int sys_setgid(gid_t gid); }
47	NOARGS		{ gid_t sys_getgid(void); }
48	STD		{ int svr4_sys_signal(int signum, svr4_sig_t handler); }
#ifdef SYSVMSG
49	STD		{ int svr4_sys_msgsys(int what, int a2, int a3, \
					      int a4, int a5); }
#else
49	UNIMPL		msgsys
#endif
50	STD		{ int svr4_sys_sysarch(int op, void *a1); }
51	UNIMPL		acct
#ifdef SYSVSHM
52	STD		{ int svr4_sys_shmsys(int what, int a2, int a3, \
					      int a4); }
#else
52	UNIMPL		shmsys
#endif
#ifdef SYSVSEM
53	STD		{ int svr4_sys_semsys(int what, int a2, int a3, \
					      int a4, int a5); }
#else
53	UNIMPL		semsys
#endif
54	STD		{ int svr4_sys_ioctl(int fd, u_long com, \
			    caddr_t data); }
55	UNIMPL		uadmin
56	UNIMPL		exch
57	STD		{ int svr4_sys_utssys(void *a1, void *a2, int sel, \
			    void *a3); }
58	NOARGS		{ int sys_fsync(int fd); }
59	STD		{ int svr4_sys_execve(char *path, char **argp, \
			    char **envp); }
60	NOARGS		{ int sys_umask(int newmask); }
61	NOARGS		{ int sys_chroot(char *path); }
62	STD		{ int svr4_sys_fcntl(int fd, int cmd, char *arg); }
63	STD		{ long svr4_sys_ulimit(int cmd, long newlimit); }
64	UNIMPL		reserved for unix/pc
65	UNIMPL		reserved for unix/pc
66	UNIMPL		reserved for unix/pc
67	UNIMPL		reserved for unix/pc
68	UNIMPL		reserved for unix/pc
69	UNIMPL		reserved for unix/pc
70	OBSOL		advfs
71	OBSOL		unadvfs
72	OBSOL		rmount
73	OBSOL		rumount
74	OBSOL		rfstart
75	OBSOL		sigret
76	STD		{ int svr4_sys_rdebug(void); }
77	OBSOL		rfstop
78	UNIMPL		rfsys
79	NOARGS		{ int sys_rmdir(char *path); }
80	NOARGS		{ int sys_mkdir(char *path, int mode); }
81	STD		{ int svr4_sys_getdents(int fd, char *buf, \
			    int nbytes); }
82	OBSOL		libattach
83	OBSOL		libdetach
84	UNIMPL		sysfs
85	STD		{ int svr4_sys_getmsg(int fd, struct svr4_strbuf *ctl, \
			    struct svr4_strbuf *dat, int *flags); }
86	STD		{ int svr4_sys_putmsg(int fd, struct svr4_strbuf *ctl, \
			    struct svr4_strbuf *dat, int flags); }
87	NOARGS		{ int sys_poll(struct pollfd *fds, u_long nfds, \
			    int timeout); }
88	STD		{ int svr4_sys_lstat(char *path, \
			    struct svr4_stat *ub); }
89	NOARGS		{ int sys_symlink(char *path, char *link); }
90	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
91	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
92	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
93	NOARGS		{ int sys_fchmod(int fd, int mode); }
94	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
95	STD		{ int svr4_sys_sigprocmask(int how, \
			    svr4_sigset_t *set, svr4_sigset_t *oset); }
96	STD		{ int svr4_sys_sigsuspend(svr4_sigset_t *ss); }
97	STD		{ int svr4_sys_sigaltstack( \
			    struct svr4_sigaltstack *nss, \
			    struct svr4_sigaltstack *oss); }
98	STD		{ int svr4_sys_sigaction(int signum, \
			    struct svr4_sigaction *nsa, \
			    struct svr4_sigaction *osa); }
99	STD		{ int svr4_sys_sigpending(int what, \
			    svr4_sigset_t *mask); }
100	STD		{ int svr4_sys_context(int func, \
			    struct svr4_ucontext *uc); }
101	UNIMPL		evsys
102	UNIMPL		evtrapret
103	STD		{ int svr4_sys_statvfs(char *path, \
			    struct svr4_statvfs *fs); }
104	STD		{ int svr4_sys_fstatvfs(int fd, \
			    struct svr4_statvfs *fs); }
105	UNIMPL
106	UNIMPL		nfssvc
107	STD		{ int svr4_sys_waitsys(int grp, int id, \
			    union svr4_siginfo *info, int options); }
108	UNIMPL		sigsendsys
109	STD		{ int svr4_sys_hrtsys(int cmd, int fun, int sub, \
			    void *rv1, void *rv2); }
110	UNIMPL		acancel
111	UNIMPL		async
112	UNIMPL		priocntlsys
113	STD		{ int svr4_sys_pathconf(char *path, int name); }
114	NOARGS		{ int sys_mincore(caddr_t addr, int len, char *vec); }
115	STD		{ int svr4_sys_mmap(svr4_caddr_t addr, \
			    svr4_size_t len, int prot, int flags, int fd, \
			    svr4_off_t pos); }
116	NOARGS		{ int sys_mprotect(caddr_t addr, int len, int prot); }
117	NOARGS		{ int sys_munmap(caddr_t addr, int len); }
118	STD		{ int svr4_sys_fpathconf(int fd, int name); }
119	NOARGS		{ int sys_vfork(void); }
120	NOARGS		{ int sys_fchdir(int fd); }
121	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, u_int iovcnt); }
122	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
			    u_int iovcnt); }
123	STD		{ int svr4_sys_xstat(int two, char *path, \
			    struct svr4_xstat *ub); }
124	STD		{ int svr4_sys_lxstat(int two, char *path, \
			    struct svr4_xstat *ub); }
125	STD		{ int svr4_sys_fxstat(int two, int fd, \
			    struct svr4_xstat *sb); }
126	STD		{ int svr4_sys_xmknod(int two, char *path, \
			    svr4_mode_t mode, svr4_dev_t dev); }
127	UNIMPL		clocal
128	STD		{ int svr4_sys_setrlimit(int which, \
			    struct ogetrlimit *rlp); }
129	STD		{ int svr4_sys_getrlimit(int which, \
			    struct ogetrlimit *rlp); }
130	NOARGS		{ int sys_lchown(char *path, int uid, int gid); }
131	STD		{ int svr4_sys_memcntl(svr4_caddr_t addr, \
			    svr4_size_t len, int cmd, svr4_caddr_t arg, \
			    int attr, int mask); }
132	UNIMPL		getpmsg
133	UNIMPL		putpmsg
134	NOARGS		{ int sys_rename(char *from, char *to); }
135	STD		{ int svr4_sys_uname(struct svr4_utsname* name, \
			    int dummy); }
136	STD		{ int svr4_sys_setegid(gid_t egid); }
137	STD		{ int svr4_sys_sysconfig(int name); }
138	NOARGS		{ int sys_adjtime(struct timeval *delta, \
			    struct timeval *olddelta); }
139	STD		{ long svr4_sys_systeminfo(int what, char *buf, \
			    long len); }
140	UNIMPL
141	NOARGS		{ int sys_seteuid(uid_t euid); }
142	UNIMPL		vtrace
143	UNIMPL		fork1
144	UNIMPL		sigtimedwait
145	UNIMPL		lwp_info
146	UNIMPL		yield
147	UNIMPL		lwp_sema_wait
148	UNIMPL		lwp_sema_post
149	UNIMPL		lwp_sema_trywait
150	UNIMPL
151	UNIMPL
152	UNIMPL		modctl
153	STD		{ int svr4_sys_fchroot(int fd); }
154	STD		{ int svr4_sys_utimes(char *path, \
					      struct timeval *tptr); }
155	STD		{ int svr4_sys_vhangup(void); }
156	STD		{ int svr4_sys_gettimeofday(struct timeval *tp); }
157	NOARGS		{ int sys_getitimer(u_int which, \
			    struct itimerval *itv); }
158	NOARGS		{ int sys_setitimer(u_int which, \
			    struct itimerval *itv, struct itimerval *oitv); }
159	UNIMPL		lwp_create
160	UNIMPL		lwp_exit
161	UNIMPL		lwp_suspend
162	UNIMPL		lwp_continue
163	UNIMPL		lwp_kill
164	UNIMPL		lwp_self
165	UNIMPL		lwp_getprivate
166	UNIMPL		lwp_setprivate
167	UNIMPL		lwp_wait
168	UNIMPL		lwp_mutex_unlock
169	UNIMPL		lwp_mutex_lock
170	UNIMPL		lwp_cond_wait
171	UNIMPL		lwp_cond_signal
172	UNIMPL		lwp_cond_broadcast
173	STD		{ ssize_t svr4_sys_pread(int fd, void *buf, \
			    size_t nbyte, svr4_off_t off); }
174	STD		{ ssize_t svr4_sys_pwrite(int fd, const void *buf, \
			    size_t nbyte, svr4_off_t off); }
175	STD		{ svr4_off64_t svr4_sys_llseek(int fd, \
			    long offset1, long offset2, int whence); }
176	UNIMPL		inst_sync
177	UNIMPL
178	UNIMPL		kaio
179	UNIMPL
180	UNIMPL
181	UNIMPL
182	UNIMPL
183	UNIMPL
184	UNIMPL		tsolsys
185	STD		{ int svr4_sys_acl(char *path, int cmd, int num, \
			    struct svr4_aclent *buf); }
186	STD		{ int svr4_sys_auditsys(int code, int a1, int a2, \
			    int a3, int a4, int a5); }
187	UNIMPL		processor_bind
188	UNIMPL		processor_info
189	UNIMPL		p_online
190	UNIMPL		sigqueue
191	NOARGS		{ int sys_clock_gettime(clockid_t clock_id, \
			    struct timespec *tp); }
192	NOARGS		{ int sys_clock_settime(clockid_t clock_id, \
			    const struct timespec *tp); }
193	NOARGS		{ int sys_clock_getres(clockid_t clock_id, \
			    struct timespec *tp); }
194	UNIMPL		timer_create
195	UNIMPL		timer_delete
196	UNIMPL		timer_settime
197	UNIMPL		timer_gettime
198	UNIMPL		timer_getoverrun
199	NOARGS		{ int sys_nanosleep(const struct timespec *rqtp, \
			    struct timespec *rmtp); }
200	STD		{ int svr4_sys_facl(int fd, int cmd, int num, \
			    struct svr4_aclent *buf); }
201	UNIMPL		door
202	NOARGS		{ int compat_43_sys_setreuid(int ruid, int euid); }
203	NOARGS		{ int compat_43_sys_setregid(int rgid, int egid); }
204	UNIMPL		install_utrap
205	UNIMPL		signotify
206	UNIMPL		schedctl
207	UNIMPL		pset
208	UNIMPL
209	UNIMPL		resolvepath
210	UNIMPL		signotifywait
211	UNIMPL		lwp_sigredirect
212	UNIMPL		lwp_alarm
213	STD		{ int svr4_sys_getdents64(int fd, \
			    struct svr4_dirent64 *dp, \
			    int nbytes); }
214 	STD		{ int svr4_sys_mmap64(svr4_caddr_t addr, \
			    svr4_size_t len, int prot, int flags, int fd, \
			    svr4_off64_t pos); }
215	STD		{ int svr4_sys_stat64(const char *path, \
			    struct svr4_stat64 *sb); }
216	STD		{ int svr4_sys_lstat64(const char *path, \
			    struct svr4_stat64 *sb); }
217	STD		{ int svr4_sys_fstat64(int fd, \
			    struct svr4_stat64 *sb); }
218	UNIMPL		statvfs64
219     STD             { int svr4_sys_fstatvfs64(int fd, \
                            struct svr4_statvfs64 *fs); }
220	UNIMPL		setrlimit64
221	UNIMPL		getrlimit64
222	STD		{ ssize_t svr4_sys_pread64(int fd, void *buf, \
			    size_t nbyte, svr4_off64_t off); }
223	STD		{ ssize_t svr4_sys_pwrite64(int fd, const void *buf, \
			    size_t nbyte, svr4_off64_t off); }
224 	STD		{ int svr4_sys_creat64(char *path, int mode); }
225	STD		{ int svr4_sys_open64(char *path, int flags, \
			    int mode); }
226	UNIMPL		rpcsys
227	UNIMPL
228	UNIMPL
229	UNIMPL
230	STD		{ int svr4_sys_socket(int domain, int type, \
			    int protocol); }
231	NOARGS		{ int sys_socketpair(int domain, int type, \
			    int protocol, int *rsv); }
232	NOARGS		{ int sys_bind(int s, const struct sockaddr *name, \
			    int namelen); }
233	NOARGS		{ int sys_listen(int s, int backlog); }
234	NOARGS		{ int compat_43_sys_accept(int s, \
			    struct sockaddr *name, int *anamelen); }
235	NOARGS		{ int sys_connect(int s, const struct sockaddr *name, \
			    int namelen); }
236	NOARGS		{ int sys_shutdown(int s, int how); }
237	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
			    int flags); }
238	NOARGS		{ ssize_t compat_43_sys_recvfrom(int s, void *buf, \
			    size_t len, int flags, struct sockaddr *from, \
			    int *fromlenaddr); }
239	NOARGS		{ ssize_t compat_43_sys_recvmsg(int s, \
			    struct msghdr *msg, int flags); }
240	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
			    int flags); }
241	NOARGS		{ ssize_t compat_43_sys_sendmsg(int s, \
			    const struct msghdr *msg, int flags); }
242	NOARGS		{ ssize_t sys_sendto(int s, const void *buf, \
			    size_t len, int flags, const struct sockaddr *to, \
			    int tolen); }
243	NOARGS		{ int compat_43_sys_getpeername(int fdes, \
			    struct sockaddr *asa, int *alen); }
244	NOARGS		{ int compat_43_sys_getsockname(int fdes, \
			    struct sockaddr *asa, int *alen); }
245	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
			    void *val, int *avalsize); }
246	NOARGS		{ int sys_setsockopt(int s, int level, int name, \
			    const void *val, int valsize); }
247	UNIMPL		sockconfig
248	UNIMPL		ntp_gettime
249	UNIMPL		ntp_adjtime