chg: 'hf 15 restore' - fail message added
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user