mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Josef 'Jeff' Sipek" <jeffpc@optonline.net>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, torvalds@osdl.org, trivial@rustcorp.com.au,
	rusty@rustcorp.com.au
Subject: [PATCH 2.6][resend] Add DEVPATH env variable to hotplug helper call
Date: Sun, 03 Oct 2004 06:08:57 -0400	[thread overview]
Message-ID: <20041003100857.GB5804@optonline.net> (raw)

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);


             reply	other threads:[~2004-10-03 10:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-03 10:08 Josef 'Jeff' Sipek [this message]
2004-10-03 23:20 ` Andrew Morton
2004-10-04 17:22   ` Keshavamurthy Anil S
2004-10-04 19:37     ` Andrew Morton
2004-10-04 19:43       ` Keshavamurthy Anil S
2004-10-05  8:25         ` Keshavamurthy Anil S
2004-10-05 17:18           ` Andrew Morton
2004-10-05 17:27             ` Keshavamurthy Anil S
2004-10-05 17:47               ` Andrew Morton
2004-10-05 18:01                 ` Keshavamurthy Anil S
2004-10-05 18:23                   ` Andrew Morton
2004-10-05 19:02                     ` Keshavamurthy Anil S

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=20041003100857.GB5804@optonline.net \
    --to=jeffpc@optonline.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    --cc=trivial@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®