diff --git a/sys/alpha/linux/syscalls.master b/sys/alpha/linux/syscalls.master index 250ede35efb..d9dff459f23 100644 --- a/sys/alpha/linux/syscalls.master +++ b/sys/alpha/linux/syscalls.master @@ -31,9 +31,13 @@ #include #include #include +#include #include #include +; Isn't pretty, but there seems to be no other way to trap nosys +#define nosys linux_nosys + ; #ifdef's, etc. may be included, and are copied to the output files. 0 UNIMPL diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 07ce1d1bf05..78b361e2ba4 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -25,9 +25,13 @@ #include #include #include +#include #include #include +; Isn't pretty, but there seems to be no other way to trap nosys +#define nosys linux_nosys + ; #ifdef's, etc. may be included, and are copied to the output files. 0 UNIMPL setup diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 40762cbab99..7bbeaff0c99 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -74,6 +74,8 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include + #ifdef COMPAT_LINUX32 #include #include @@ -1392,3 +1394,10 @@ linux_getsid(struct thread *td, struct linux_getsid_args *args) bsd.pid = args->pid; return getsid(td, &bsd); } + +int +linux_nosys(struct thread *td, struct nosys_args *ignore) +{ + + return (ENOSYS); +} diff --git a/sys/compat/linux/linux_sysproto.h b/sys/compat/linux/linux_sysproto.h new file mode 100644 index 00000000000..69f1577dc45 --- /dev/null +++ b/sys/compat/linux/linux_sysproto.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2005 Travis Poppe + * 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 without 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$ + */ + +#ifndef LINUX_SYSPROTO +#define LINUX_SYSPROTO + +int linux_nosys(struct thread *, struct nosys_args *); + +#endif diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index ae9e52af683..4d05eaa77a2 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -25,9 +25,13 @@ #include #include #include +#include #include #include +; Isn't pretty, but there seems to be no other way to trap nosys +#define nosys linux_nosys + ; #ifdef's, etc. may be included, and are copied to the output files. 0 UNIMPL setup