linux_dummy.c revision 14331
19313Ssos/*- 29313Ssos * Copyright (c) 1994-1995 S�ren Schmidt 39313Ssos * All rights reserved. 49313Ssos * 59313Ssos * Redistribution and use in source and binary forms, with or without 69313Ssos * modification, are permitted provided that the following conditions 79313Ssos * are met: 89313Ssos * 1. Redistributions of source code must retain the above copyright 99313Ssos * notice, this list of conditions and the following disclaimer 109313Ssos * in this position and unchanged. 119313Ssos * 2. Redistributions in binary form must reproduce the above copyright 129313Ssos * notice, this list of conditions and the following disclaimer in the 139313Ssos * documentation and/or other materials provided with the distribution. 149313Ssos * 3. The name of the author may not be used to endorse or promote products 159313Ssos * derived from this software withough specific prior written permission 169313Ssos * 179313Ssos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 189313Ssos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 199313Ssos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 209313Ssos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 219313Ssos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 229313Ssos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 239313Ssos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 249313Ssos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 259313Ssos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 269313Ssos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 279313Ssos * 2814331Speter * $Id: linux_dummy.c,v 1.2 1995/11/22 07:43:44 bde Exp $ 299313Ssos */ 309313Ssos 319313Ssos#include <sys/param.h> 3212458Sbde#include <sys/sysproto.h> 339313Ssos#include <sys/systm.h> 349313Ssos#include <sys/proc.h> 359313Ssos#include <sys/resourcevar.h> 369313Ssos 3714331Speter#include <i386/linux/linux.h> 3814331Speter#include <i386/linux/linux_proto.h> 3912458Sbde 409313Ssosint 4114331Speterlinux_setup(struct proc *p, struct linux_setup_args *args, int *retval) 429313Ssos{ 439313Ssos printf("Linux-emul(%d): setup() not supported\n", p->p_pid); 449313Ssos return ENOSYS; 459313Ssos} 469313Ssos 479313Ssosint 4814331Speterlinux_break(struct proc *p, struct linux_break_args *args, int *retval) 499313Ssos{ 509313Ssos printf("Linux-emul(%d): break() not supported\n", p->p_pid); 519313Ssos return ENOSYS; 529313Ssos} 539313Ssos 549313Ssosint 5514331Speterlinux_stat(struct proc *p, struct linux_stat_args *args, int *retval) 569313Ssos{ 579313Ssos printf("Linux-emul(%d): stat() not supported\n", p->p_pid); 589313Ssos return ENOSYS; 599313Ssos} 609313Ssos 619313Ssosint 6214331Speterlinux_fstat(struct proc *p, struct linux_fstat_args *args, int *retval) 639313Ssos{ 649313Ssos printf("Linux-emul(%d): fstat() not supported\n", p->p_pid); 659313Ssos return ENOSYS; 669313Ssos} 679313Ssos 689313Ssosint 6914331Speterlinux_mount(struct proc *p, struct linux_mount_args *args, int *retval) 709313Ssos{ 719313Ssos printf("Linux-emul(%d): mount() not supported\n", p->p_pid); 729313Ssos return ENOSYS; 739313Ssos} 749313Ssos 759313Ssosint 7614331Speterlinux_umount(struct proc *p, struct linux_umount_args *args, int *retval) 779313Ssos{ 789313Ssos printf("Linux-emul(%d): umount() not supported\n", p->p_pid); 799313Ssos return ENOSYS; 809313Ssos} 819313Ssos 829313Ssosint 8314331Speterlinux_stime(struct proc *p, struct linux_stime_args *args, int *retval) 849313Ssos{ 859313Ssos printf("Linux-emul(%d): stime() not supported\n", p->p_pid); 869313Ssos return ENOSYS; 879313Ssos} 889313Ssos 899313Ssosint 9014331Speterlinux_ptrace(struct proc *p, struct linux_ptrace_args *args, int *retval) 919313Ssos{ 929313Ssos printf("Linux-emul(%d): ptrace() not supported\n", p->p_pid); 939313Ssos return ENOSYS; 949313Ssos} 959313Ssos 969313Ssosint 9714331Speterlinux_stty(struct proc *p, struct linux_stty_args *args, int *retval) 989313Ssos{ 999313Ssos printf("Linux-emul(%d): stty() not supported\n", p->p_pid); 1009313Ssos return ENOSYS; 1019313Ssos} 1029313Ssos 1039313Ssosint 10414331Speterlinux_gtty(struct proc *p, struct linux_gtty_args *args, int *retval) 1059313Ssos{ 1069313Ssos printf("Linux-emul(%d): gtty() not supported\n", p->p_pid); 1079313Ssos return ENOSYS; 1089313Ssos} 1099313Ssos 1109313Ssosint 11114331Speterlinux_nice(struct proc *p, struct linux_nice_args *args, int *retval) 1129313Ssos{ 1139313Ssos printf("Linux-emul(%d): nice() not supported\n", p->p_pid); 1149313Ssos return ENOSYS; 1159313Ssos} 1169313Ssos 1179313Ssosint 11814331Speterlinux_ftime(struct proc *p, struct linux_ftime_args *args, int *retval) 1199313Ssos{ 1209313Ssos printf("Linux-emul(%d): ftime() not supported\n", p->p_pid); 1219313Ssos return ENOSYS; 1229313Ssos} 1239313Ssos 1249313Ssosint 12514331Speterlinux_prof(struct proc *p, struct linux_prof_args *args, int *retval) 1269313Ssos{ 1279313Ssos printf("Linux-emul(%d): prof() not supported\n", p->p_pid); 1289313Ssos return ENOSYS; 1299313Ssos} 1309313Ssos 1319313Ssosint 13214331Speterlinux_phys(struct proc *p, struct linux_phys_args *args, int *retval) 1339313Ssos{ 1349313Ssos printf("Linux-emul(%d): phys() not supported\n", p->p_pid); 1359313Ssos return ENOSYS; 1369313Ssos} 1379313Ssos 1389313Ssosint 13914331Speterlinux_lock(struct proc *p, struct linux_lock_args *args, int *retval) 1409313Ssos{ 1419313Ssos printf("Linux-emul(%d): lock() not supported\n", p->p_pid); 1429313Ssos return ENOSYS; 1439313Ssos} 1449313Ssos 1459313Ssosint 14614331Speterlinux_mpx(struct proc *p, struct linux_mpx_args *args, int *retval) 1479313Ssos{ 1489313Ssos printf("Linux-emul(%d): mpx() not supported\n", p->p_pid); 1499313Ssos return ENOSYS; 1509313Ssos} 1519313Ssos 1529313Ssosint 15314331Speterlinux_ulimit(struct proc *p, struct linux_ulimit_args *args, int *retval) 1549313Ssos{ 1559313Ssos printf("Linux-emul(%d): ulimit() not supported\n", p->p_pid); 1569313Ssos return ENOSYS; 1579313Ssos} 1589313Ssos 1599313Ssosint 16014331Speterlinux_olduname(struct proc *p, struct linux_olduname_args *args, int *retval) 1619313Ssos{ 1629313Ssos printf("Linux-emul(%d): olduname() not supported\n", p->p_pid); 1639313Ssos return ENOSYS; 1649313Ssos} 1659313Ssos 1669313Ssosint 16714331Speterlinux_ustat(struct proc *p, struct linux_ustat_args *args, int *retval) 1689313Ssos{ 1699313Ssos printf("Linux-emul(%d): ustat() not supported\n", p->p_pid); 1709313Ssos return ENOSYS; 1719313Ssos} 1729313Ssos 1739313Ssosint 17414331Speterlinux_ioperm(struct proc *p, struct linux_ioperm_args *args, int *retval) 1759313Ssos{ 1769313Ssos printf("Linux-emul(%d): ioperm() not supported\n", p->p_pid); 1779313Ssos return 0; /* EINVAL SOS XXX */ 1789313Ssos} 1799313Ssos 1809313Ssosint 18114331Speterlinux_ksyslog(struct proc *p, struct linux_ksyslog_args *args, int *retval) 1829313Ssos{ 18314331Speter printf("Linux-emul(%d): ksyslog(%x) not supported\n", 18414331Speter p->p_pid, args->what); 18514331Speter return ENOSYS; /* EPERM - Peter - it's a root-only thing */ 1869313Ssos} 1879313Ssos 1889313Ssosint 18914331Speterlinux_iopl(struct proc *p, struct linux_iopl_args *args, int *retval) 1909313Ssos{ 1919313Ssos printf("Linux-emul(%d): iopl() not supported\n", p->p_pid); 1929313Ssos return ENOSYS; 1939313Ssos} 1949313Ssos 1959313Ssosint 19614331Speterlinux_vhangup(struct proc *p, struct linux_vhangup_args *args, int *retval) 1979313Ssos{ 1989313Ssos printf("Linux-emul(%d): vhangup() not supported\n", p->p_pid); 1999313Ssos return ENOSYS; 2009313Ssos} 2019313Ssos 2029313Ssosint 20314331Speterlinux_idle(struct proc *p, struct linux_idle_args *args, int *retval) 2049313Ssos{ 2059313Ssos printf("Linux-emul(%d): idle() not supported\n", p->p_pid); 2069313Ssos return ENOSYS; 2079313Ssos} 2089313Ssos 2099313Ssosint 21014331Speterlinux_vm86(struct proc *p, struct linux_vm86_args *args, int *retval) 2119313Ssos{ 2129313Ssos printf("Linux-emul(%d): vm86() not supported\n", p->p_pid); 2139313Ssos return ENOSYS; 2149313Ssos} 2159313Ssos 2169313Ssosint 21714331Speterlinux_swapoff(struct proc *p, struct linux_swapoff_args *args, int *retval) 2189313Ssos{ 2199313Ssos printf("Linux-emul(%d): swapoff() not supported\n", p->p_pid); 2209313Ssos return ENOSYS; 2219313Ssos} 2229313Ssos 2239313Ssosint 22414331Speterlinux_sysinfo(struct proc *p, struct linux_sysinfo_args *args, int *retval) 2259313Ssos{ 2269313Ssos printf("Linux-emul(%d): sysinfo() not supported\n", p->p_pid); 2279313Ssos return ENOSYS; 2289313Ssos} 2299313Ssos 2309313Ssosint 23114331Speterlinux_clone(struct proc *p, struct linux_clone_args *args, int *retval) 2329313Ssos{ 2339313Ssos printf("Linux-emul(%d): clone() not supported\n", p->p_pid); 2349313Ssos return ENOSYS; 2359313Ssos} 2369313Ssos 2379313Ssosint 23814331Speterlinux_uname(struct proc *p, struct linux_uname_args *args, int *retval) 2399313Ssos{ 2409313Ssos printf("Linux-emul(%d): uname() not supported\n", p->p_pid); 2419313Ssos return ENOSYS; 2429313Ssos} 2439313Ssos 2449313Ssosint 24514331Speterlinux_modify_ldt(struct proc *p, struct linux_modify_ldt_args *args, int *retval) 2469313Ssos{ 2479313Ssos printf("Linux-emul(%d): modify_ldt() not supported\n", p->p_pid); 2489313Ssos return ENOSYS; 2499313Ssos} 2509313Ssos 2519313Ssosint 25214331Speterlinux_adjtimex(struct proc *p, struct linux_adjtimex_args *args, int *retval) 2539313Ssos{ 2549313Ssos printf("Linux-emul(%d): adjtimex() not supported\n", p->p_pid); 2559313Ssos return ENOSYS; 2569313Ssos} 2579313Ssos 2589313Ssosint 25914331Speterlinux_create_module(struct proc *p, struct linux_create_module_args *args, int *retval) 2609313Ssos{ 2619313Ssos printf("Linux-emul(%d): create_module() not supported\n", p->p_pid); 2629313Ssos return ENOSYS; 2639313Ssos} 2649313Ssos 2659313Ssosint 26614331Speterlinux_init_module(struct proc *p, struct linux_init_module_args *args, int *retval) 2679313Ssos{ 2689313Ssos printf("Linux-emul(%d): init_module() not supported\n", p->p_pid); 2699313Ssos return ENOSYS; 2709313Ssos} 2719313Ssos 2729313Ssosint 27314331Speterlinux_delete_module(struct proc *p, struct linux_delete_module_args *args, int *retval) 2749313Ssos{ 2759313Ssos printf("Linux-emul(%d): delete_module() not supported\n", p->p_pid); 2769313Ssos return ENOSYS; 2779313Ssos} 2789313Ssos 2799313Ssosint 28014331Speterlinux_get_kernel_syms(struct proc *p, struct linux_get_kernel_syms_args *args, int *retval) 2819313Ssos{ 2829313Ssos printf("Linux-emul(%d): get_kernel_syms() not supported\n", p->p_pid); 2839313Ssos return ENOSYS; 2849313Ssos} 2859313Ssos 2869313Ssosint 28714331Speterlinux_quotactl(struct proc *p, struct linux_quotactl_args *args, int *retval) 2889313Ssos{ 2899313Ssos printf("Linux-emul(%d): quotactl() not supported\n", p->p_pid); 2909313Ssos return ENOSYS; 2919313Ssos} 2929313Ssos 2939313Ssosint 29414331Speterlinux_bdflush(struct proc *p, struct linux_bdflush_args *args, int *retval) 2959313Ssos{ 2969313Ssos printf("Linux-emul(%d): bdflush() not supported\n", p->p_pid); 2979313Ssos return ENOSYS; 2989313Ssos} 299