130-cancel_download_fix.patch 465 B

123456789101112131415161718
  1. --- a/rules/command.c
  2. +++ b/rules/command.c
  3. @@ -385,13 +385,13 @@ RULES_COMMAND_F(cmd_firmware) {
  4. infp = fopen(firmware_path, "r");
  5. if (infp == NULL) {
  6. - echo_to_file(sysfs_path_loading, "0\n", 2);
  7. + echo_to_file(sysfs_path_loading, "-1\n", 2);
  8. return -1;
  9. }
  10. outfp = fopen(sysfs_path_data, "w");
  11. if (outfp == NULL) {
  12. fclose(infp);
  13. - echo_to_file(sysfs_path_loading, "0\n", 2);
  14. + echo_to_file(sysfs_path_loading, "-1\n", 2);
  15. return -1;
  16. }