chg: 'hf 15 restore' - fail message added

This commit is contained in:
iceman1001 2019-04-03 15:42:42 +02:00
parent 0383d7f052
commit c03e425550

View file

@ -876,11 +876,14 @@ int CmdHF15Restore(const char *Cmd) {
snprintf(tmpCmd, sizeof(tmpCmd), "%s u %u %s", newCmdPrefix, i, hex); snprintf(tmpCmd, sizeof(tmpCmd), "%s u %u %s", newCmdPrefix, i, hex);
PrintAndLogEx(DEBUG, "Command to be sent| %s", tmpCmd); PrintAndLogEx(DEBUG, "Command to be sent| %s", tmpCmd);
for (tried = 0; tried < retries; tried++) for (tried = 0; tried < retries; tried++) {
if (!(retval = CmdHF15Write(tmpCmd))) if (!(retval = CmdHF15Write(tmpCmd))) {
break; break;
}
}
if (tried >= retries) { if (tried >= retries) {
fclose(f); fclose(f);
PrintAndLogEx(FAILED, "Restore failed. Too many retries.");
return retval; return retval;
} }