mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
refactor: remove positive error codes
This commit is contained in:
parent
28076af96d
commit
970c2d0999
3 changed files with 2 additions and 11 deletions
|
@ -283,7 +283,7 @@ static int CmdQuit(const char *Cmd) {
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
return PM3_SQUIT;
|
return PM3_EFATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CmdRev(const char *Cmd) {
|
static int CmdRev(const char *Cmd) {
|
||||||
|
|
|
@ -574,11 +574,6 @@ check_script:
|
||||||
// exit or quit
|
// exit or quit
|
||||||
if (mainret == PM3_EFATAL)
|
if (mainret == PM3_EFATAL)
|
||||||
break;
|
break;
|
||||||
if (mainret == PM3_SQUIT) {
|
|
||||||
// Normal quit, map to 0
|
|
||||||
mainret = PM3_SUCCESS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
free(cmd);
|
free(cmd);
|
||||||
cmd = NULL;
|
cmd = NULL;
|
||||||
|
|
|
@ -794,11 +794,7 @@ typedef struct {
|
||||||
#define FLAG_ANSI 0x08
|
#define FLAG_ANSI 0x08
|
||||||
|
|
||||||
// Error codes Usages:
|
// Error codes Usages:
|
||||||
|
// NOTE: Positive values should be reserved for commands in case they need to return multiple statuses and error codes simultaneously.
|
||||||
// Success, regular quit
|
|
||||||
#define PM3_SQUIT 2
|
|
||||||
// Success, transfer nonces pm3: Sending nonces back to client
|
|
||||||
#define PM3_SNONCES 1
|
|
||||||
// Success (no error)
|
// Success (no error)
|
||||||
#define PM3_SUCCESS 0
|
#define PM3_SUCCESS 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue