Commit 5e1dcb06 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by David S. Miller

[NET]: Optimize handling of CONFIG_NET=n.

parent 486874ac
......@@ -209,6 +209,23 @@ 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_setsockopt)
cond_syscall(sys_getsockopt)
cond_syscall(sys_shutdown)
cond_syscall(sys_sendmsg)
cond_syscall(sys_recvmsg)
cond_syscall(sys_socketcall)
static int set_one_prio(struct task_struct *p, int niceval, int error)
{
......
......@@ -5,7 +5,9 @@
# Rewritten to use lists instead of if-statements.
#
obj-y := socket.o core/
obj-y := nonet.o
obj-$(CONFIG_NET) := socket.o core/
obj-$(CONFIG_COMPAT) += compat.o
......
/*
* net/nonet.c
*
* Dummy functions to allow us to configure network support entirely
* out of the kernel.
*
* Distributed under the terms of the GNU GPL version 2.
* Copyright (c) Matthew Wilcox 2003
*/
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
void __init sock_init(void)
{
printk(KERN_INFO "Linux NoNET1.0 for Linux 2.6\n");
}
static int sock_no_open(struct inode *irrelevant, struct file *dontcare)
{
return -ENXIO;
}
struct file_operations bad_sock_fops = {
.open = sock_no_open,
};
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