linux_dummy.c revision 293546
1/*- 2 * Copyright (c) 1994-1995 S��ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer 10 * in this position and unchanged. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> 30__FBSDID("$FreeBSD: stable/10/sys/i386/linux/linux_dummy.c 293546 2016-01-09 16:44:17Z dchagin $"); 31 32#include "opt_compat.h" 33#include "opt_kdtrace.h" 34 35#include <sys/param.h> 36#include <sys/kernel.h> 37#include <sys/sdt.h> 38#include <sys/systm.h> 39#include <sys/proc.h> 40 41#include <i386/linux/linux.h> 42#include <i386/linux/linux_proto.h> 43#include <compat/linux/linux_dtrace.h> 44#include <compat/linux/linux_util.h> 45 46/* DTrace init */ 47LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 48 49DUMMY(stime); 50DUMMY(fstat); 51DUMMY(olduname); 52DUMMY(syslog); 53DUMMY(uname); 54DUMMY(vhangup); 55DUMMY(vm86old); 56DUMMY(swapoff); 57DUMMY(adjtimex); 58DUMMY(create_module); 59DUMMY(init_module); 60DUMMY(delete_module); 61DUMMY(get_kernel_syms); 62DUMMY(quotactl); 63DUMMY(bdflush); 64DUMMY(sysfs); 65DUMMY(vm86); 66DUMMY(query_module); 67DUMMY(nfsservctl); 68DUMMY(sendfile); /* different semantics */ 69DUMMY(setfsuid); 70DUMMY(setfsgid); 71DUMMY(pivot_root); 72DUMMY(mincore); 73DUMMY(lookup_dcookie); 74DUMMY(remap_file_pages); 75DUMMY(fstatfs64); 76DUMMY(mbind); 77DUMMY(get_mempolicy); 78DUMMY(set_mempolicy); 79DUMMY(kexec_load); 80/* linux 2.6.11: */ 81DUMMY(add_key); 82DUMMY(request_key); 83DUMMY(keyctl); 84/* linux 2.6.13: */ 85DUMMY(ioprio_set); 86DUMMY(ioprio_get); 87DUMMY(inotify_init); 88DUMMY(inotify_add_watch); 89DUMMY(inotify_rm_watch); 90/* linux 2.6.16: */ 91DUMMY(migrate_pages); 92DUMMY(ppoll); 93DUMMY(unshare); 94/* linux 2.6.17: */ 95DUMMY(splice); 96DUMMY(sync_file_range); 97DUMMY(tee); 98DUMMY(vmsplice); 99/* linux 2.6.18: */ 100DUMMY(move_pages); 101/* linux 2.6.19: */ 102DUMMY(getcpu); 103DUMMY(epoll_pwait); 104/* linux 2.6.22: */ 105DUMMY(utimensat); 106DUMMY(signalfd); 107DUMMY(timerfd_create); 108DUMMY(eventfd); 109/* linux 2.6.23: */ 110DUMMY(fallocate); 111/* linux 2.6.25: */ 112DUMMY(timerfd_settime); 113DUMMY(timerfd_gettime); 114/* linux 2.6.27: */ 115DUMMY(signalfd4); 116DUMMY(eventfd2); 117DUMMY(inotify_init1); 118/* linux 2.6.30: */ 119DUMMY(preadv); 120DUMMY(pwritev); 121/* linux 2.6.31 */ 122DUMMY(rt_tsigqueueinfo); 123DUMMY(perf_event_open); 124/* linux 2.6.33: */ 125DUMMY(recvmmsg); 126DUMMY(fanotify_init); 127DUMMY(fanotify_mark); 128/* later: */ 129DUMMY(name_to_handle_at); 130DUMMY(open_by_handle_at); 131DUMMY(clock_adjtime); 132DUMMY(syncfs); 133DUMMY(sendmmsg); 134DUMMY(setns); 135DUMMY(process_vm_readv); 136DUMMY(process_vm_writev); 137 138#define DUMMY_XATTR(s) \ 139int \ 140linux_ ## s ## xattr( \ 141 struct thread *td, struct linux_ ## s ## xattr_args *arg) \ 142{ \ 143 \ 144 return (ENOATTR); \ 145} 146DUMMY_XATTR(set); 147DUMMY_XATTR(lset); 148DUMMY_XATTR(fset); 149DUMMY_XATTR(get); 150DUMMY_XATTR(lget); 151DUMMY_XATTR(fget); 152DUMMY_XATTR(list); 153DUMMY_XATTR(llist); 154DUMMY_XATTR(flist); 155DUMMY_XATTR(remove); 156DUMMY_XATTR(lremove); 157DUMMY_XATTR(fremove); 158