1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-23 21:37:10 +02:00

[package] hotplug2: Cancel firmware loading on file openning errors

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20680 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
acinonyx 2010-04-03 18:09:09 +00:00
parent faa5c35209
commit 244cbc3b69

View File

@ -0,0 +1,19 @@
diff -x '*~' -Naur hotplug2-201/rules/command.c hotplug2-201.patched/rules/command.c
--- hotplug2-201/rules/command.c 2010-03-31 17:14:44.000000000 +0300
+++ hotplug2-201.patched/rules/command.c 2010-03-31 17:14:51.000000000 +0300
@@ -385,13 +385,13 @@
infp = fopen(firmware_path, "r");
if (infp == NULL) {
- echo_to_file(sysfs_path_loading, "0\n", 2);
+ echo_to_file(sysfs_path_loading, "-1\n", 2);
return -1;
}
outfp = fopen(sysfs_path_data, "w");
if (outfp == NULL) {
fclose(infp);
- echo_to_file(sysfs_path_loading, "0\n", 2);
+ echo_to_file(sysfs_path_loading, "-1\n", 2);
return -1;
}