mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
chg: 'hf mf restore' - add finish message
chg: 'hf mfu restore' - add finish message chg: 'hf 15 restore' - add finish message, close filehandle when failing.
This commit is contained in:
parent
a185e83ffb
commit
0383d7f052
3 changed files with 9 additions and 2 deletions
|
@ -847,6 +847,8 @@ int CmdHF15Restore(const char *Cmd) {
|
|||
return 3;
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "Restoring data blocks.");
|
||||
|
||||
while (1) {
|
||||
tried = 0;
|
||||
hex[0] = 0x00;
|
||||
|
@ -877,12 +879,16 @@ int CmdHF15Restore(const char *Cmd) {
|
|||
for (tried = 0; tried < retries; tried++)
|
||||
if (!(retval = CmdHF15Write(tmpCmd)))
|
||||
break;
|
||||
if (tried >= retries)
|
||||
if (tried >= retries) {
|
||||
fclose(f);
|
||||
return retval;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
fclose(f);
|
||||
PrintAndLogEx(INFO, "Finish restore");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CmdHF15List(const char *Cmd) {
|
||||
|
|
|
@ -1055,8 +1055,8 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fdump);
|
||||
PrintAndLogEx(INFO, "Finish restore");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2223,6 +2223,7 @@ int CmdHF14AMfURestore(const char *Cmd) {
|
|||
|
||||
DropField();
|
||||
free(dump);
|
||||
PrintAndLogEx(INFO, "Finish restore");
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue