lkml.org 
[lkml]   [2008]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC 02/11] remove CONFIG_KMOD from core kernel code
Always compile request_module when the kernel allows modules.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/linux/kmod.h | 2 +-
kernel/exec_domain.c | 2 +-
kernel/kmod.c | 2 +-
kernel/sysctl.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)

--- everything.orig/include/linux/kmod.h 2008-07-08 17:32:06.000000000 +0200
+++ everything/include/linux/kmod.h 2008-07-08 17:34:37.000000000 +0200
@@ -25,7 +25,7 @@

#define KMOD_PATH_LEN 256

-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
/* modprobe exit status on success, -ve on error. Return value
* usually useless though. */
extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
--- everything.orig/kernel/exec_domain.c 2008-07-08 17:32:06.000000000 +0200
+++ everything/kernel/exec_domain.c 2008-07-08 17:34:37.000000000 +0200
@@ -65,7 +65,7 @@ lookup_exec_domain(u_long personality)
goto out;
}

-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
read_unlock(&exec_domains_lock);
request_module("personality-%ld", pers);
read_lock(&exec_domains_lock);
--- everything.orig/kernel/kmod.c 2008-07-08 17:32:06.000000000 +0200
+++ everything/kernel/kmod.c 2008-07-08 17:34:37.000000000 +0200
@@ -42,7 +42,7 @@ extern int max_threads;

static struct workqueue_struct *khelper_wq;

-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES

/*
modprobe_path is set via /proc/sys.
--- everything.orig/kernel/sysctl.c 2008-07-08 17:32:06.000000000 +0200
+++ everything/kernel/sysctl.c 2008-07-08 17:34:37.000000000 +0200
@@ -106,7 +106,7 @@ static int min_percpu_pagelist_fract = 8

static int ngroups_max = NGROUPS_MAX;

-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
extern char modprobe_path[];
#endif
#ifdef CONFIG_CHR_DEV_SG
@@ -455,7 +455,7 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
{
.ctl_name = KERN_MODPROBE,
.procname = "modprobe",
--



\
 
 \ /
  Last update: 2008-07-08 19:09    [W:0.096 / U:2.528 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site