summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorjasoni <jasoni@cvs.openbsd.org>2000-07-07 02:13:41 +0000
committerjasoni <jasoni@cvs.openbsd.org>2000-07-07 02:13:41 +0000
commit6b18df8e8395ca79e8c818348032f9342483529a (patch)
tree23d616639c30fc012ac99f12553a101e2fa23afe /sys/compat/linux
parentc804d479e765ebdf814cd5a969ca8b2c6e370dbe (diff)
Change all UNIMPL and OBSOL syscalls to STD.
Add these syscalls to linux_dummy.c where they return ENOSYS and display a friendler message which tells you what unimplemented syscall has been called.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/files.linux3
-rw-r--r--sys/compat/linux/linux_dummy.c122
-rw-r--r--sys/compat/linux/syscalls.master113
3 files changed, 184 insertions, 54 deletions
diff --git a/sys/compat/linux/files.linux b/sys/compat/linux/files.linux
index 06fd0a59d0f..49e7d6acf8a 100644
--- a/sys/compat/linux/files.linux
+++ b/sys/compat/linux/files.linux
@@ -1,4 +1,4 @@
-# $OpenBSD: files.linux,v 1.9 2000/06/07 13:35:01 niklas Exp $
+# $OpenBSD: files.linux,v 1.10 2000/07/07 02:13:40 jasoni Exp $
# $NetBSD: files.linux,v 1.4 1996/03/08 04:55:59 mycroft Exp $
#
# Config.new file description for machine-independent Linux compat code.
@@ -22,3 +22,4 @@ file compat/linux/linux_socket.c compat_linux
file compat/linux/linux_syscalls.c compat_linux & syscall_debug
file compat/linux/linux_sysent.c compat_linux
file compat/linux/linux_termios.c compat_linux
+file compat/linux/linux_dummy.c compat_linux
diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c
new file mode 100644
index 00000000000..89413f2028b
--- /dev/null
+++ b/sys/compat/linux/linux_dummy.c
@@ -0,0 +1,122 @@
+/* $OpenBSD: linux_dummy.c,v 1.1 2000/07/07 02:13:40 jasoni Exp $ */
+
+/*-
+ * Copyright (c) 1994-1995 Søren Schmidt
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in this position and unchanged.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: src/sys/i386/linux/linux_dummy.c,v 1.21 2000/01/29 12:45:35 peter Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/proc.h>
+
+#include <compat/linux/linux_types.h>
+#include <compat/linux/linux_signal.h>
+#include <compat/linux/linux_syscallargs.h>
+
+#define DUMMY(s) \
+int \
+linux_sys_ ## s(p, v, retval) \
+ struct proc *p; \
+ void *v; \
+ register_t *retval; \
+{ \
+ return (unsupported_msg(p, #s)); \
+}
+
+static int
+unsupported_msg(struct proc *p, const char *fname)
+{
+ printf("linux: syscall %s is obsolete or not implemented (pid=%ld)\n",
+ fname, (long)p->p_pid);
+ return (ENOSYS);
+}
+
+DUMMY(ostat); /* #18 */
+DUMMY(ptrace); /* #26 */
+DUMMY(ofstat); /* #28 */
+DUMMY(stty); /* #31 */
+DUMMY(gtty); /* #32 */
+DUMMY(ftime); /* #35 */
+DUMMY(prof); /* #44 */
+DUMMY(phys); /* #52 */
+DUMMY(lock); /* #53 */
+DUMMY(mpx); /* #56 */
+DUMMY(ulimit); /* #58 */
+DUMMY(ustat); /* #62 */
+#ifndef __i386__
+DUMMY(ioperm); /* #101 */
+#endif
+DUMMY(klog); /* #103 */
+#ifndef __i386__
+DUMMY(iopl); /* #110 */
+#endif
+DUMMY(vhangup); /* #111 */
+DUMMY(idle); /* #112 */
+DUMMY(vm86old); /* #113 */
+DUMMY(swapoff); /* #115 */
+DUMMY(sysinfo); /* #116 */
+DUMMY(clone); /* #120 */
+#ifndef __i386__
+DUMMY(modify_ldt); /* #123 */
+#endif
+DUMMY(adjtimex); /* #124 */
+DUMMY(create_module); /* #127 */
+DUMMY(init_module); /* #128 */
+DUMMY(delete_module); /* #129 */
+DUMMY(get_kernel_syms); /* #130 */
+DUMMY(quotactl); /* #131 */
+DUMMY(bdflush); /* #134 */
+DUMMY(sysfs); /* #135 */
+DUMMY(afs_syscall); /* #137 */
+DUMMY(mlockall); /* #152 */
+DUMMY(munlockall); /* #153 */
+DUMMY(sched_setparam); /* #154 */
+DUMMY(sched_getparam); /* #155 */
+DUMMY(sched_setscheduler); /* #156 */
+DUMMY(sched_getscheduler); /* #157 */
+DUMMY(sched_yield); /* #158 */
+DUMMY(sched_get_priority_max); /* #159 */
+DUMMY(sched_get_priority_min); /* #160 */
+DUMMY(sched_rr_get_interval); /* #161 */
+DUMMY(vm86); /* #166 */
+DUMMY(query_module); /* #167 */
+DUMMY(nfsservctl); /* #169 */
+DUMMY(prctl); /* #172 */
+DUMMY(rt_sigtimedwait); /* #177 */
+DUMMY(rt_queueinfo); /* #178 */
+DUMMY(capget); /* #184 */
+DUMMY(capset); /* #185 */
+DUMMY(sendfile); /* #187 */
+DUMMY(getpmsg); /* #188 */
+DUMMY(putpmsg); /* #189 */
+DUMMY(mmap2); /* #192 */
+DUMMY(truncate64); /* #193 */
+DUMMY(ftruncate64); /* #194 */
+DUMMY(stat64); /* #195 */
+DUMMY(lstat64); /* #196 */
+DUMMY(fstat64); /* #197 */
diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master
index abfeca5e091..1999b6d5255 100644
--- a/sys/compat/linux/syscalls.master
+++ b/sys/compat/linux/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.24 2000/06/07 14:11:38 niklas Exp $
+ $OpenBSD: syscalls.master,v 1.25 2000/07/07 02:13:40 jasoni Exp $
; $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -64,7 +64,7 @@
15 STD { int linux_sys_chmod(char *path, int mode); }
16 STD { int linux_sys_lchown(char *path, int uid, int gid); }
17 STD { int linux_sys_break(char *nsize); }
-18 OBSOL ostat
+18 STD { int linux_sys_ostat(void); }
19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
int whence); }
20 NOARGS { pid_t sys_getpid(void); }
@@ -74,17 +74,17 @@
23 NOARGS { int sys_setuid(uid_t uid); }
24 NOARGS { uid_t sys_getuid(void); }
25 STD { int linux_sys_stime(linux_time_t *t); }
-26 UNIMPL ptrace
+26 STD { int linux_sys_ptrace(void); }
27 STD { int linux_sys_alarm(unsigned int secs); }
-28 OBSOL ofstat
+28 STD { int linux_sys_ofstat(void); }
29 STD { int linux_sys_pause(void); }
30 STD { int linux_sys_utime(char *path, \
struct linux_utimbuf *times); }
-31 UNIMPL stty
-32 UNIMPL gtty
+31 STD { int linux_sys_stty(void); }
+32 STD { int linux_sys_gtty(void); }
33 STD { int linux_sys_access(char *path, int flags); }
34 STD { int linux_sys_nice(int incr); }
-35 UNIMPL ftime
+35 STD { int linux_sys_ftime(void); }
36 NOARGS { int sys_sync(void); }
37 STD { int linux_sys_kill(int pid, int signum); }
38 STD { int linux_sys_rename(char *from, char *to); }
@@ -93,7 +93,7 @@
41 NOARGS { int sys_dup(u_int fd); }
42 STD { int linux_sys_pipe(int *pfds); }
43 STD { int linux_sys_times(struct times *tms); }
-44 UNIMPL prof
+44 STD { int linux_sys_prof(void); }
45 STD { int linux_sys_brk(char *nsize); }
46 NOARGS { int sys_setgid(gid_t gid); }
47 NOARGS { gid_t sys_getgid(void); }
@@ -102,18 +102,18 @@
49 NOARGS { uid_t sys_geteuid(void); }
50 NOARGS { gid_t sys_getegid(void); }
51 NOARGS { int sys_acct(char *path); }
-52 UNIMPL phys
-53 UNIMPL lock
+52 STD { int linux_sys_phys(void); }
+53 STD { int linux_sys_lock(void); }
54 STD { int linux_sys_ioctl(int fd, u_long com, \
caddr_t data); }
55 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); }
-56 UNIMPL mpx
+56 STD { int linux_sys_mpx(void); }
57 NOARGS { int sys_setpgid(int pid, int pgid); }
-58 UNIMPL ulimit
+58 STD { int linux_sys_ulimit(void); }
59 STD { int linux_sys_oldolduname(struct linux_oldold_utsname *up); }
60 NOARGS { int sys_umask(int newmask); }
61 NOARGS { int sys_chroot(char *path); }
-62 UNIMPL ustat
+62 STD { int linux_sys_ustat(void); }
63 NOARGS { int sys_dup2(u_int from, u_int to); }
64 NOARGS { pid_t sys_getppid(void); }
65 NOARGS { int sys_getpgrp(void); }
@@ -170,10 +170,10 @@
101 STD { int linux_sys_ioperm(unsigned int lo, \
unsigned int hi, int val); }
#else
-101 UNIMPL ioperm
+101 STD { int linux_sys_ioperm(void); }
#endif
102 STD { int linux_sys_socketcall(int what, void *args); }
-103 UNIMPL klog
+103 STD { int linux_sys_klog(void); }
104 NOARGS { int sys_setitimer(u_int which, \
struct itimerval *itv, struct itimerval *oitv); }
105 NOARGS { int sys_getitimer(u_int which, \
@@ -187,20 +187,20 @@
#ifdef __i386__
110 STD { int linux_sys_iopl(int level); }
#else
-110 UNIMPL iopl
+110 STD { int linux_sys_iopl(void); }
#endif
-111 UNIMPL vhangup
-112 UNIMPL idle
-113 UNIMPL vm86
+111 STD { int linux_sys_vhangup(void); }
+112 STD { int linux_sys_idle(void); }
+113 STD { int linux_sys_vm86old(void); }
114 STD { int linux_sys_wait4(int pid, int *status, \
int options, struct rusage *rusage); }
-115 UNIMPL swapoff
-116 UNIMPL sysinfo
+115 STD { int linux_sys_swapoff(void); }
+116 STD { int linux_sys_sysinfo(void); }
117 STD { int linux_sys_ipc(int what, int a1, int a2, int a3, \
caddr_t ptr); }
118 NOARGS { int sys_fsync(int fd); }
119 STD { int linux_sys_sigreturn(struct linux_sigcontext *scp); }
-120 UNIMPL clone
+120 STD { int linux_sys_clone(void); }
121 NOARGS { int compat_09_sys_setdomainname(char *name, \
int len); }
122 STD { int linux_sys_uname(struct linux_utsname *up); }
@@ -208,23 +208,23 @@
123 STD { int linux_sys_modify_ldt(int func, void *ptr, \
size_t bytecount); }
#else
-123 UNIMPL modify_ldt
+123 STD { int linux_sys_modify_ldt(void); }
#endif
-124 UNIMPL adjtimex
+124 STD { int linux_sys_adjtimex(void); }
125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); }
126 STD { int linux_sys_sigprocmask(int how, \
linux_old_sigset_t *set, linux_old_sigset_t *oset); }
-127 UNIMPL create_module
-128 UNIMPL init_module
-129 UNIMPL delete_module
-130 UNIMPL get_kernel_syms
-131 UNIMPL quotactl
+127 STD { int linux_sys_create_module(void); }
+128 STD { int linux_sys_init_module(void); }
+129 STD { int linux_sys_delete_module(void); }
+130 STD { int linux_sys_get_kernel_syms(void); }
+131 STD { int linux_sys_quotactl(void); }
132 STD { int linux_sys_getpgid(int pid); }
133 NOARGS { int sys_fchdir(int fd); }
-134 UNIMPL bdflush
-135 UNIMPL sysfs
+134 STD { int linux_sys_bdflush(void); }
+135 STD { int linux_sys_sysfs(void); }
136 STD { int linux_sys_personality(int per); }
-137 UNIMPL afs_syscall
+137 STD { int linux_sys_afs_syscall(void); }
138 STD { int linux_sys_setfsuid(uid_t uid); }
139 NOARGS { int linux_sys_getfsuid(void); }
140 STD { int linux_sys_llseek(int fd, u_int32_t ohigh, \
@@ -245,16 +245,16 @@
149 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); }
150 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
151 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
-152 UNIMPL mlockall
-153 UNIMPL munlockall
-154 UNIMPL sched_setparam
-155 UNIMPL sched_getparam
-156 UNIMPL sched_setscheduler
-157 UNIMPL sched_getscheduler
-158 UNIMPL sched_yield
-159 UNIMPL sched_get_priority_max
-160 UNIMPL sched_get_priority_min
-161 UNIMPL sched_rr_get_interval
+152 STD { int linux_sys_mlockall(void); }
+153 STD { int linux_sys_munlockall(void); }
+154 STD { int linux_sys_sched_setparam(void); }
+155 STD { int linux_sys_sched_getparam(void); }
+156 STD { int linux_sys_sched_setscheduler(void); }
+157 STD { int linux_sys_sched_getscheduler(void); }
+158 STD { int linux_sys_sched_yield(void); }
+159 STD { int linux_sys_sched_get_priority_max(void); }
+160 STD { int linux_sys_sched_get_priority_min(void); }
+161 STD { int linux_sys_sched_rr_get_interval(void); }
162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
struct timespec *rmtp); }
163 STD { int linux_sys_mremap(void *old_address, size_t old_size, \
@@ -263,16 +263,16 @@
uid_t suid); }
165 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
uid_t *suid); }
-166 UNIMPL vm86
-167 UNIMPL query_module
+166 STD { int linux_sys_vm86(void); }
+167 STD { int linux_sys_query_module(void); }
168 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
int timeout); }
-169 UNIMPL nfsservctl
+169 STD { int linux_sys_nfsservctl(void); }
170 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
gid_t sgid); }
171 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
gid_t *sgid); }
-172 UNIMPL prctl
+172 STD { int linux_sys_prctl(void); }
173 STD { int linux_sys_rt_sigreturn( \
struct linux_rt_sigframe *sfp); }
174 STD { int linux_sys_rt_sigaction(int signum, \
@@ -284,8 +284,8 @@
linux_sigset_t *oset, size_t sigsetsize); }
176 STD { int linux_sys_rt_sigpending(linux_sigset_t *set, \
size_t sigsetsize); }
-177 UNIMPL rt_sigtimedwait
-178 UNIMPL rt_queueinfo
+177 STD { int linux_sys_rt_sigtimedwait(void); }
+178 STD { int linux_sys_rt_queueinfo(void); }
179 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
size_t sigsetsize); }
180 STD { int linux_sys_pread(int fd, char *buf, \
@@ -294,14 +294,21 @@
size_t nbyte, linux_off_t offset); }
182 STD { int linux_sys_chown(char *path, int uid, int gid); }
183 STD { int linux_sys_getcwd(char *bufp, size_t length); }
-184 UNIMPL capget
-185 UNIMPL capset
+184 STD { int linux_sys_capget(void); }
+185 STD { int linux_sys_capset(void); }
186 STD { int linux_sys_sigaltstack( \
const struct linux_sigaltstack *nss, \
struct linux_sigaltstack *oss); }
-187 UNIMPL sendfile
-188 UNIMPL getpmsg
-189 UNIMPL putpmsg
+187 STD { int linux_sys_sendfile(void); }
+188 STD { int linux_sys_getpmsg(void); }
+189 STD { int linux_sys_putpmsg(void); }
190 STD { int sys_vfork(void); }
191 STD { int linux_sys_ugetrlimit(u_int which, \
struct linux_rlimit *rlp); }
+192 STD { int linux_sys_mmap2(void); }
+193 STD { int linux_sys_truncate64(void); }
+194 STD { int linux_sys_ftruncate64(void); }
+195 STD { int linux_sys_stat64(void); }
+196 STD { int linux_sys_lstat64(void); }
+197 STD { int linux_sys_fstat64(void); }
+