Commit bad9a5ae authored by Peter Chubb's avatar Peter Chubb Committed by Linus Torvalds

[PATCH] standalone sys_ni.c for not-implemented syscalls

Sticking the not-implemented syscall stuff in sys.c is a pain because the
cond_syscall()s explode when certain prototypes are in scope.  And we need
those prototypes' header files for the C code in sys.c.

Fix all that up by moving all the sys_ni_syscall code into its own .c file.
Signed-off-by: default avatarPeter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2fdb873a
......@@ -7,7 +7,7 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
sysctl.o capability.o ptrace.o timer.o user.o \
signal.o sys.o kmod.o workqueue.o pid.o \
rcupdate.o intermodule.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o
kthread.o wait.o kfifo.o sys_ni.o
obj-$(CONFIG_FUTEX) += futex.o
obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
......
......@@ -5,7 +5,6 @@
*/
#include <linux/config.h>
#include <linux/compat.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/utsname.h>
......@@ -25,10 +24,8 @@
#include <linux/dcookies.h>
#include <linux/suspend.h>
/* Don't include this - it breaks ia64's cond_syscall() implementation */
#if 0
#include <linux/compat.h>
#include <linux/syscalls.h>
#endif
#include <asm/uaccess.h>
#include <asm/io.h>
......@@ -218,82 +215,6 @@ int unregister_reboot_notifier(struct notifier_block * nb)
}
EXPORT_SYMBOL(unregister_reboot_notifier);
asmlinkage long sys_ni_syscall(void)
{
return -ENOSYS;
}
cond_syscall(sys_nfsservctl)
cond_syscall(sys_quotactl)
cond_syscall(sys_acct)
cond_syscall(sys_lookup_dcookie)
cond_syscall(sys_swapon)
cond_syscall(sys_swapoff)
cond_syscall(sys_init_module)
cond_syscall(sys_delete_module)
cond_syscall(sys_socketpair)
cond_syscall(sys_bind)
cond_syscall(sys_listen)
cond_syscall(sys_accept)
cond_syscall(sys_connect)
cond_syscall(sys_getsockname)
cond_syscall(sys_getpeername)
cond_syscall(sys_sendto)
cond_syscall(sys_send)
cond_syscall(sys_recvfrom)
cond_syscall(sys_recv)
cond_syscall(sys_socket)
cond_syscall(sys_setsockopt)
cond_syscall(sys_getsockopt)
cond_syscall(sys_shutdown)
cond_syscall(sys_sendmsg)
cond_syscall(sys_recvmsg)
cond_syscall(sys_socketcall)
cond_syscall(sys_futex)
cond_syscall(compat_sys_futex)
cond_syscall(sys_epoll_create)
cond_syscall(sys_epoll_ctl)
cond_syscall(sys_epoll_wait)
cond_syscall(sys_semget)
cond_syscall(sys_semop)
cond_syscall(sys_semtimedop)
cond_syscall(sys_semctl)
cond_syscall(sys_msgget)
cond_syscall(sys_msgsnd)
cond_syscall(sys_msgrcv)
cond_syscall(sys_msgctl)
cond_syscall(sys_shmget)
cond_syscall(sys_shmdt)
cond_syscall(sys_shmctl)
cond_syscall(sys_mq_open)
cond_syscall(sys_mq_unlink)
cond_syscall(sys_mq_timedsend)
cond_syscall(sys_mq_timedreceive)
cond_syscall(sys_mq_notify)
cond_syscall(sys_mq_getsetattr)
cond_syscall(compat_sys_mq_open)
cond_syscall(compat_sys_mq_timedsend)
cond_syscall(compat_sys_mq_timedreceive)
cond_syscall(compat_sys_mq_notify)
cond_syscall(compat_sys_mq_getsetattr)
cond_syscall(sys_mbind)
cond_syscall(sys_get_mempolicy)
cond_syscall(sys_set_mempolicy)
cond_syscall(compat_mbind)
cond_syscall(compat_get_mempolicy)
cond_syscall(compat_set_mempolicy)
cond_syscall(sys_add_key)
cond_syscall(sys_request_key)
cond_syscall(sys_keyctl)
cond_syscall(compat_sys_keyctl)
cond_syscall(compat_sys_socketcall)
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read)
cond_syscall(sys_pciconfig_write)
cond_syscall(sys_pciconfig_iobase)
static int set_one_prio(struct task_struct *p, int niceval, int error)
{
int no_nice;
......
#include <linux/linkage.h>
#include <linux/errno.h>
#include <asm/unistd.h>
/*
* Non-implemented system calls get redirected here.
*/
asmlinkage long sys_ni_syscall(void)
{
return -ENOSYS;
}
cond_syscall(sys_nfsservctl)
cond_syscall(sys_quotactl)
cond_syscall(sys_acct)
cond_syscall(sys_lookup_dcookie)
cond_syscall(sys_swapon)
cond_syscall(sys_swapoff)
cond_syscall(sys_init_module)
cond_syscall(sys_delete_module)
cond_syscall(sys_socketpair)
cond_syscall(sys_bind)
cond_syscall(sys_listen)
cond_syscall(sys_accept)
cond_syscall(sys_connect)
cond_syscall(sys_getsockname)
cond_syscall(sys_getpeername)
cond_syscall(sys_sendto)
cond_syscall(sys_send)
cond_syscall(sys_recvfrom)
cond_syscall(sys_recv)
cond_syscall(sys_socket)
cond_syscall(sys_setsockopt)
cond_syscall(sys_getsockopt)
cond_syscall(sys_shutdown)
cond_syscall(sys_sendmsg)
cond_syscall(sys_recvmsg)
cond_syscall(sys_socketcall)
cond_syscall(sys_futex)
cond_syscall(compat_sys_futex)
cond_syscall(sys_epoll_create)
cond_syscall(sys_epoll_ctl)
cond_syscall(sys_epoll_wait)
cond_syscall(sys_semget)
cond_syscall(sys_semop)
cond_syscall(sys_semtimedop)
cond_syscall(sys_semctl)
cond_syscall(sys_msgget)
cond_syscall(sys_msgsnd)
cond_syscall(sys_msgrcv)
cond_syscall(sys_msgctl)
cond_syscall(sys_shmget)
cond_syscall(sys_shmdt)
cond_syscall(sys_shmctl)
cond_syscall(sys_mq_open)
cond_syscall(sys_mq_unlink)
cond_syscall(sys_mq_timedsend)
cond_syscall(sys_mq_timedreceive)
cond_syscall(sys_mq_notify)
cond_syscall(sys_mq_getsetattr)
cond_syscall(compat_sys_mq_open)
cond_syscall(compat_sys_mq_timedsend)
cond_syscall(compat_sys_mq_timedreceive)
cond_syscall(compat_sys_mq_notify)
cond_syscall(compat_sys_mq_getsetattr)
cond_syscall(sys_mbind)
cond_syscall(sys_get_mempolicy)
cond_syscall(sys_set_mempolicy)
cond_syscall(compat_mbind)
cond_syscall(compat_get_mempolicy)
cond_syscall(compat_set_mempolicy)
cond_syscall(sys_add_key)
cond_syscall(sys_request_key)
cond_syscall(sys_keyctl)
cond_syscall(compat_sys_keyctl)
cond_syscall(compat_sys_socketcall)
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read)
cond_syscall(sys_pciconfig_write)
cond_syscall(sys_pciconfig_iobase)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment