From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Thu, 21 Nov 2002 01:19:11 +0000 Subject: [patch 2.5.48] drivers/base/hotplug.c, fix $DEVPATH MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary_(ID_IgHj1YdKbuQKgpZGyinZ6g)" Message-Id: List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --Boundary_(ID_IgHj1YdKbuQKgpZGyinZ6g) Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT Hotplug agents couldn't use /sys/$DEVPATH after /sys/root morphed into /sys/devices ... now they can do it again. - Dave --Boundary_(ID_IgHj1YdKbuQKgpZGyinZ6g) Content-type: text/plain; name=core-1120.patch Content-transfer-encoding: 7BIT Content-disposition: inline; filename=core-1120.patch --- ./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; --Boundary_(ID_IgHj1YdKbuQKgpZGyinZ6g)-- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel