source: trunk/package/hotplug2/patches/130-cancel_download_fix.patch @ 20680

Last change on this file since 20680 was 20680, checked in by acinonyx, 7 years ago

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

File size: 620 bytes
  • rules/command.c

    diff -x '*~' -Naur hotplug2-201/rules/command.c hotplug2-201.patched/rules/command.c
    old new  
    385385 
    386386        infp = fopen(firmware_path, "r"); 
    387387        if (infp == NULL) { 
    388                 echo_to_file(sysfs_path_loading, "0\n", 2); 
     388                echo_to_file(sysfs_path_loading, "-1\n", 2); 
    389389                return -1; 
    390390        } 
    391391        outfp = fopen(sysfs_path_data, "w"); 
    392392        if (outfp == NULL) { 
    393393                fclose(infp); 
    394                 echo_to_file(sysfs_path_loading, "0\n", 2); 
     394                echo_to_file(sysfs_path_loading, "-1\n", 2); 
    395395                return -1; 
    396396        } 
    397397 
Note: See TracBrowser for help on using the repository browser.