* [PATCH 2.6] Add DEVPATH env variable to hotplug helper call
@ 2004-09-24 17:24 Josef 'Jeff' Sipek
0 siblings, 0 replies; only message in thread
From: Josef 'Jeff' Sipek @ 2004-09-24 17:24 UTC (permalink / raw)
To: linux-kernel; +Cc: rusty, akpm, torvalds
Add $DEVPATH to the environmental variables during /sbin/hotplug call.
Josef 'Jeff' Sipek.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@optonline.net>
diff -Nru a/kernel/cpu.c b/kernel/cpu.c
--- a/kernel/cpu.c 2004-09-24 13:08:57 -04:00
+++ b/kernel/cpu.c 2004-09-24 13:08:57 -04:00
@@ -61,13 +61,13 @@
* cpu' with certain environment variables set. */
static int cpu_run_sbin_hotplug(unsigned int cpu, const char *action)
{
- char *argv[3], *envp[5], cpu_str[12], action_str[32];
+ char *argv[3], *envp[6], cpu_str[12], action_str[32], devpath_str[38];
int i;
sprintf(cpu_str, "CPU=%d", cpu);
sprintf(action_str, "ACTION=%s", action);
- /* FIXME: Add DEVPATH. --RR */
-
+ sprintf(devpath_str, "DEVPATH=devices/system/cpu/cpu%d", cpu);
+
i = 0;
argv[i++] = hotplug_path;
argv[i++] = "cpu";
@@ -79,6 +79,7 @@
envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
envp[i++] = cpu_str;
envp[i++] = action_str;
+ envp[i++] = devpath_str;
envp[i] = NULL;
return call_usermodehelper(argv[0], argv, envp, 0);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-24 17:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 17:24 [PATCH 2.6] Add DEVPATH env variable to hotplug helper call Josef 'Jeff' Sipek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®