diff options
author | Andrew Morton <akpm@osdl.org> | 2004-06-12 16:41:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2004-06-12 16:41:17 -0700 |
commit | 942f5de49374d5470074d8e6c2dd86e02a7a12f1 (patch) | |
tree | 6230e65b22826a7149cc91774c7d649aa154741a /kernel | |
parent | 7f94e2a677d0630019883a132d60b55036ebc31c (diff) | |
download | history-942f5de49374d5470074d8e6c2dd86e02a7a12f1.tar.gz |
[PATCH] fix modprobe_path and hotplug_path sizes and sysctl
From: Andy Whitcroft <apw@shadowen.org>
Both modprobe_path and hotplug_path are arbitrarily sized at 256 bytes and
that size is also expressed directly in the sysctl code. It seems
reasonable to define a standard length and use that for consitancy. This
patch introduces the constant KMOD_PATH_LEN and uses that.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kmod.c | 4 | ||||
-rw-r--r-- | kernel/sysctl.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 160aa3d958ad2b..ea62192b7597af 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -47,7 +47,7 @@ static struct workqueue_struct *khelper_wq; /* modprobe_path is set via /proc/sys. */ -char modprobe_path[256] = "/sbin/modprobe"; +char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe"; /** * request_module - try to load a kernel module @@ -132,7 +132,7 @@ EXPORT_SYMBOL(request_module); events. the command is expected to load drivers when necessary, and may perform additional system setup. */ -char hotplug_path[256] = "/sbin/hotplug"; +char hotplug_path[KMOD_PATH_LEN] = "/sbin/hotplug"; EXPORT_SYMBOL(hotplug_path); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 2b3fe7fed27172..ae990887f338fb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -392,7 +392,7 @@ static ctl_table kern_table[] = { .ctl_name = KERN_MODPROBE, .procname = "modprobe", .data = &modprobe_path, - .maxlen = 256, + .maxlen = KMOD_PATH_LEN, .mode = 0644, .proc_handler = &proc_dostring, .strategy = &sysctl_string, @@ -403,7 +403,7 @@ static ctl_table kern_table[] = { .ctl_name = KERN_HOTPLUG, .procname = "hotplug", .data = &hotplug_path, - .maxlen = 256, + .maxlen = KMOD_PATH_LEN, .mode = 0644, .proc_handler = &proc_dostring, .strategy = &sysctl_string, |