All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: linux-hotplug@vger.kernel.org
Subject: [patch 2.5.48] drivers/base/hotplug.c, fix $DEVPATH
Date: Thu, 21 Nov 2002 01:19:11 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-103784139117770@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 123 bytes --]

Hotplug agents couldn't use /sys/$DEVPATH after /sys/root
morphed into /sys/devices ... now they can do it again.

- Dave


[-- Attachment #2: core-1120.patch --]
[-- Type: text/plain, Size: 883 bytes --]

--- ./drivers/base-dist/hotplug.c	Tue Nov 19 18:24:36 2002
+++ ./drivers/base/hotplug.c	Wed Nov 20 09:15:05 2002
@@ -35,6 +35,8 @@
 #define BUFFER_SIZE	1024	/* should be enough memory for the env */
 #define NUM_ENVP	32	/* number of env pointers */
 
+static char prefix [] = "devices";	/* /sys/devices/... */
+
 static int do_hotplug (struct device *dev, char *argv1, const char *action,
 			int (* hotplug) (struct device *, char **, int, char *, int))
 {
@@ -72,7 +74,7 @@
 	}
 
 	dev_length = get_devpath_length (dev);
-	dev_length += strlen("root");
+	dev_length += strlen(prefix);
 	dev_path = kmalloc (dev_length, GFP_KERNEL);
 	if (!dev_path) {
 		kfree (buffer);
@@ -80,7 +82,7 @@
 		return -ENOMEM;
 	}
 	memset (dev_path, 0x00, dev_length);
-	strcpy (dev_path, "root");
+	strcpy (dev_path, prefix);
 	fill_devpath (dev, dev_path, dev_length);
 
 	argv [0] = hotplug_path;

             reply	other threads:[~2002-11-21  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21  1:19 David Brownell [this message]
2002-11-21  1:19 ` [patch 2.5.48] drivers/base/hotplug.c, fix $DEVPATH Patrick Mochel
2002-11-24  7:08 ` 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=marc-linux-hotplug-103784139117770@msgid-missing \
    --to=david-b@pacbell.net \
    --cc=linux-hotplug@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.