diff options
| author | Josef \'Jeff\' Sipek <jeffpc@optonline.net> | 2004-10-02 19:51:31 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-02 19:51:31 -0700 |
| commit | 2866792071f8c7a8ab5cf6818835ed7243dafeae (patch) | |
| tree | c04b824664bf011f65b6951cab2d1e6b203173e0 /kernel | |
| parent | 3e6132d6fd9fa6a265b4624dd0ca15263247de99 (diff) | |
[PATCH] Add DEVPATH env variable to hotplug helper call
Add $DEVPATH to the environmental variables during /sbin/hotplug call.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@optonline.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cpu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 083521327e64..64b8ed3cc8ea 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -61,13 +61,13 @@ static inline void check_for_tasks(int cpu) * 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[40]; 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 @@ static int cpu_run_sbin_hotplug(unsigned int cpu, const char *action) 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); |
