drivers/base/hotplug.c, fix $DEVPATH
PATCH 1/1 drivers/base/hotplug.c, fix $DEVPATH
Hotplug agents couldn't use /sys/$DEVPATH after /sys/root morphed into /sys/devices ... now they can do it again.
- Dave
drivers/base/hotplug.c renamed from drivers/base-dist/hotplug.c +4 -2
@@ -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;
Quoted 2 lines · David Brownell
Hotplug agents couldn't use
/sys/$DEVPATHafter/sys/rootmorphed into/sys/devices... now they can do it again.
It should always be "devices" from now on. Sorry about not fixing that up when I changed it...
-pat
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Greg KH
AppliedQuoted 2 lines · David Brownell
Hotplug agents couldn't use
/sys/$DEVPATHafter/sys/rootmorphed into/sys/devices... now they can do it again.
Applied, thanks.
greg k-h
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel