[package] hotplug2: Fix event blocking when there are no available children (#6958...
[openwrt/svn-archive/archive.git] / package / hotplug2 / patches / 120-sysfs_path_fix.patch
1 diff -x '*~' -Naur hotplug2-201/rules/command.c hotplug2-201.patched/rules/command.c
2 --- hotplug2-201/rules/command.c 2009-12-09 20:44:13.000000000 +0200
3 +++ hotplug2-201.patched/rules/command.c 2010-03-31 17:24:09.000000000 +0300
4 @@ -374,9 +374,9 @@
5 if (firmware == NULL)
6 return -1;
7
8 - if (snprintf(sysfs_path_loading, PATH_MAX, "/sysfs%s/loading", devpath) >= PATH_MAX)
9 + if (snprintf(sysfs_path_loading, PATH_MAX, "/sys%s/loading", devpath) >= PATH_MAX)
10 return -1;
11 - if (snprintf(sysfs_path_data, PATH_MAX, "/sysfs%s/data", devpath) >= PATH_MAX)
12 + if (snprintf(sysfs_path_data, PATH_MAX, "/sys%s/data", devpath) >= PATH_MAX)
13 return -1;
14 if (snprintf(firmware_path, PATH_MAX, "%s/%s", argv[0], firmware) >= PATH_MAX)
15 return -1;