1 /** $MirOS: src/sys/compat/linux/linux_dummy.c,v 1.2 2005/12/28 22:24:54 tg Exp $ */
2 /* $OpenBSD: linux_dummy.c,v 1.16 2004/10/27 13:23:38 niklas Exp $ */
3
4 /*-
5 * Copyright (c) 1994-1995 S�ren Schmidt
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer
13 * in this position and unchanged.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $FreeBSD: src/sys/i386/linux/linux_dummy.c,v 1.21 2000/01/29 12:45:35 peter Exp $
32 */
33
34 #include <sys/param.h>
35 #include <sys/systm.h>
36 #include <sys/proc.h>
37
38 #include <compat/linux/linux_types.h>
39 #include <compat/linux/linux_signal.h>
40 #include <compat/linux/linux_syscallargs.h>
41
42 #define DUMMY(s) \
43 int \
44 linux_sys_ ## s(p, v, retval) \
45 struct proc *p; \
46 void *v; \
47 register_t *retval; \
48 { \
49 return (unsupported_msg(p, #s)); \
50 }
51
52 static int
unsupported_msg(struct proc * p,const char * fname)53 unsupported_msg(struct proc *p, const char *fname)
54 {
55 printf("linux: syscall %s is obsolete or not implemented (pid=%ld)\n",
56 fname, (long)p->p_pid);
57 return (ENOSYS);
58 }
59
60 DUMMY(ostat); /* #18 */
61 DUMMY(ofstat); /* #28 */
62 DUMMY(stty); /* #31 */
63 DUMMY(gtty); /* #32 */
64 DUMMY(ftime); /* #35 */
65 DUMMY(prof); /* #44 */
66 DUMMY(phys); /* #52 */
67 DUMMY(lock); /* #53 */
68 DUMMY(mpx); /* #56 */
69 DUMMY(ulimit); /* #58 */
70 DUMMY(ustat); /* #62 */
71 #ifndef __i386__
72 DUMMY(ioperm); /* #101 */
73 #endif
74 DUMMY(klog); /* #103 */
75 #ifndef __i386__
76 DUMMY(iopl); /* #110 */
77 #endif
78 DUMMY(vhangup); /* #111 */
79 DUMMY(idle); /* #112 */
80 DUMMY(vm86old); /* #113 */
81 DUMMY(swapoff); /* #115 */
82 #ifndef __i386__
83 DUMMY(modify_ldt); /* #123 */
84 #endif
85 DUMMY(adjtimex); /* #124 */
86 DUMMY(create_module); /* #127 */
87 DUMMY(init_module); /* #128 */
88 DUMMY(delete_module); /* #129 */
89 DUMMY(get_kernel_syms); /* #130 */
90 DUMMY(quotactl); /* #131 */
91 DUMMY(bdflush); /* #134 */
92 DUMMY(sysfs); /* #135 */
93 DUMMY(afs_syscall); /* #137 */
94 DUMMY(mlockall); /* #152 */
95 DUMMY(munlockall); /* #153 */
96 DUMMY(sched_rr_get_interval); /* #161 */
97 DUMMY(vm86); /* #166 */
98 DUMMY(query_module); /* #167 */
99 DUMMY(nfsservctl); /* #169 */
100 DUMMY(prctl); /* #172 */
101 DUMMY(rt_sigtimedwait); /* #177 */
102 DUMMY(rt_queueinfo); /* #178 */
103 DUMMY(capget); /* #184 */
104 DUMMY(capset); /* #185 */
105 DUMMY(sendfile); /* #187 */
106 DUMMY(getpmsg); /* #188 */
107 DUMMY(putpmsg); /* #189 */
108 DUMMY(lchown); /* #198 */
109 DUMMY(fchown); /* #207 */
110 DUMMY(chown); /* #212 */
111 DUMMY(setfsgid); /* #216 */
112 DUMMY(pivot_root); /* #217 */
113 DUMMY(mincore); /* #218 */
114 DUMMY(fadvise64); /* #250 */
115
116 #define DUMMY_XATTR(s) \
117 int \
118 linux_sys_ ## s ## xattr(p, v, retval) \
119 struct proc *p; \
120 void *v; \
121 register_t *retval; \
122 { \
123 return (ENOATTR); \
124 }
125 DUMMY_XATTR(set);
126 DUMMY_XATTR(lset);
127 DUMMY_XATTR(fset);
128 DUMMY_XATTR(get);
129 DUMMY_XATTR(lget);
130 DUMMY_XATTR(fget);
131 DUMMY_XATTR(list);
132 DUMMY_XATTR(llist);
133 DUMMY_XATTR(flist);
134 DUMMY_XATTR(remove);
135 DUMMY_XATTR(lremove);
136 DUMMY_XATTR(fremove);
137