From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core patches for 2.6.10-rc1
Date: Mon, 1 Nov 2004 13:57:57 -0800 [thread overview]
Message-ID: <10993462772836@kroah.com> (raw)
In-Reply-To: <10993462772266@kroah.com>
ChangeSet 1.2452, 2004/11/01 13:06:49-08:00, kay.sievers@vrfy.org
[PATCH] take me home, hotplug_path[]
Move hotplug_path[] out of kmod.[ch] to kobject_uevent.[ch] where
it belongs now. At some time in the future we should fix the remaining bad
hotplug calls (no SEQNUM, no netlink uevent):
./drivers/input/input.c (no DEVPATH on some hotplug events!)
./drivers/pnp/pnpbios/core.c
./drivers/s390/crypto/z90main.c
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/input/input.c | 2 +-
drivers/pnp/pnpbios/core.c | 2 +-
drivers/s390/crypto/z90main.c | 1 +
include/linux/kmod.h | 4 ----
include/linux/kobject_uevent.h | 5 +++++
kernel/cpu.c | 1 -
kernel/kmod.c | 23 -----------------------
kernel/sysctl.c | 2 +-
lib/kobject_uevent.c | 1 +
9 files changed, 10 insertions(+), 31 deletions(-)
diff -Nru a/drivers/input/input.c b/drivers/input/input.c
--- a/drivers/input/input.c 2004-11-01 13:35:57 -08:00
+++ b/drivers/input/input.c 2004-11-01 13:35:57 -08:00
@@ -19,7 +19,7 @@
#include <linux/major.h>
#include <linux/pm.h>
#include <linux/proc_fs.h>
-#include <linux/kmod.h>
+#include <linux/kobject_uevent.h>
#include <linux/interrupt.h>
#include <linux/poll.h>
#include <linux/device.h>
diff -Nru a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
--- a/drivers/pnp/pnpbios/core.c 2004-11-01 13:35:57 -08:00
+++ b/drivers/pnp/pnpbios/core.c 2004-11-01 13:35:57 -08:00
@@ -56,7 +56,7 @@
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/slab.h>
-#include <linux/kmod.h>
+#include <linux/kobject_uevent.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <linux/dmi.h>
diff -Nru a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c
--- a/drivers/s390/crypto/z90main.c 2004-11-01 13:35:57 -08:00
+++ b/drivers/s390/crypto/z90main.c 2004-11-01 13:35:57 -08:00
@@ -33,6 +33,7 @@
#include <linux/ioctl32.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
+#include <linux/kobject_uevent.h>
#include <linux/proc_fs.h>
#include <linux/syscalls.h>
#include <linux/version.h>
diff -Nru a/include/linux/kmod.h b/include/linux/kmod.h
--- a/include/linux/kmod.h 2004-11-01 13:35:57 -08:00
+++ b/include/linux/kmod.h 2004-11-01 13:35:57 -08:00
@@ -37,8 +37,4 @@
extern int call_usermodehelper(char *path, char *argv[], char *envp[], int wait);
extern void usermodehelper_init(void);
-#ifdef CONFIG_HOTPLUG
-extern char hotplug_path [];
-#endif
-
#endif /* __LINUX_KMOD_H__ */
diff -Nru a/include/linux/kobject_uevent.h b/include/linux/kobject_uevent.h
--- a/include/linux/kobject_uevent.h 2004-11-01 13:35:57 -08:00
+++ b/include/linux/kobject_uevent.h 2004-11-01 13:35:57 -08:00
@@ -11,6 +11,11 @@
#ifndef _KOBJECT_EVENT_H_
#define _KOBJECT_EVENT_H_
+#define HOTPLUG_PATH_LEN 256
+
+/* path to the hotplug userspace helper executed on an event */
+extern char hotplug_path[];
+
/*
* If you add an action here, you must also add the proper string to the
* lib/kobject_uevent.c file.
diff -Nru a/kernel/cpu.c b/kernel/cpu.c
--- a/kernel/cpu.c 2004-11-01 13:35:57 -08:00
+++ b/kernel/cpu.c 2004-11-01 13:35:57 -08:00
@@ -11,7 +11,6 @@
#include <linux/unistd.h>
#include <linux/cpu.h>
#include <linux/module.h>
-#include <linux/kmod.h> /* for hotplug_path */
#include <linux/kthread.h>
#include <linux/stop_machine.h>
#include <asm/semaphore.h>
diff -Nru a/kernel/kmod.c b/kernel/kmod.c
--- a/kernel/kmod.c 2004-11-01 13:35:57 -08:00
+++ b/kernel/kmod.c 2004-11-01 13:35:57 -08:00
@@ -115,29 +115,6 @@
EXPORT_SYMBOL(request_module);
#endif /* CONFIG_KMOD */
-#ifdef CONFIG_HOTPLUG
-/*
- hotplug path is set via /proc/sys
- invoked by hotplug-aware bus drivers,
- with call_usermodehelper
-
- argv [0] = hotplug_path;
- argv [1] = "usb", "scsi", "pci", "network", etc;
- ... plus optional type-specific parameters
- argv [n] = 0;
-
- envp [*] = HOME, PATH; optional type-specific parameters
-
- a hotplug bus should invoke this for device add/remove
- events. the command is expected to load drivers when
- necessary, and may perform additional system setup.
-*/
-char hotplug_path[KMOD_PATH_LEN] = "/sbin/hotplug";
-
-EXPORT_SYMBOL(hotplug_path);
-
-#endif /* CONFIG_HOTPLUG */
-
struct subprocess_info {
struct completion *complete;
char *path;
diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c
--- a/kernel/sysctl.c 2004-11-01 13:35:57 -08:00
+++ b/kernel/sysctl.c 2004-11-01 13:35:57 -08:00
@@ -394,7 +394,7 @@
.ctl_name = KERN_HOTPLUG,
.procname = "hotplug",
.data = &hotplug_path,
- .maxlen = KMOD_PATH_LEN,
+ .maxlen = HOTPLUG_PATH_LEN,
.mode = 0644,
.proc_handler = &proc_dostring,
.strategy = &sysctl_string,
diff -Nru a/lib/kobject_uevent.c b/lib/kobject_uevent.c
--- a/lib/kobject_uevent.c 2004-11-01 13:35:57 -08:00
+++ b/lib/kobject_uevent.c 2004-11-01 13:35:57 -08:00
@@ -177,6 +177,7 @@
#ifdef CONFIG_HOTPLUG
+char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
u64 hotplug_seqnum;
static spinlock_t sequence_lock = SPIN_LOCK_UNLOCKED;
next prev parent reply other threads:[~2004-11-01 23:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-01 21:54 [BK PATCH] " Greg KH
2004-11-01 21:57 ` [PATCH] " Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH
2004-11-01 21:57 ` Greg KH [this message]
2004-11-02 22:32 ` Russell King
2004-11-07 15:28 ` Russell King
2004-11-10 1:37 ` Greg KH
2004-11-10 2:57 ` Paul Mackerras
2004-11-10 8:36 ` Russell King
2004-11-10 21:36 ` Paul Mackerras
2004-11-11 0:00 ` Nigel Cunningham
2004-11-11 20:52 ` Russell King
2004-11-12 0:28 ` Greg KH
2004-11-01 23:44 ` Pozsar Balazs
-- strict thread matches above, loose matches on Subject: below --
2004-10-22 23:09 [BK PATCH] " Greg KH
2004-10-22 23:09 ` [PATCH] " Greg KH
2004-10-22 23:09 ` Greg KH
2004-10-22 23:09 ` Greg KH
2004-10-22 23:09 ` Greg KH
2004-10-22 23:09 ` Greg KH
2004-10-22 23:09 ` Greg KH
2004-10-22 23:09 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10993462772836@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome