mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-07-29 22:50:48 +00:00
refactor: remove positive error codes
This commit is contained in:
@@ -283,7 +283,7 @@ static int CmdQuit(const char *Cmd) {
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
CLIParserFree(ctx);
|
||||
return PM3_SQUIT;
|
||||
return PM3_EFATAL;
|
||||
}
|
||||
|
||||
static int CmdRev(const char *Cmd) {
|
||||
|
||||
@@ -574,11 +574,6 @@ check_script:
|
||||
// exit or quit
|
||||
if (mainret == PM3_EFATAL)
|
||||
break;
|
||||
if (mainret == PM3_SQUIT) {
|
||||
// Normal quit, map to 0
|
||||
mainret = PM3_SUCCESS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
free(cmd);
|
||||
cmd = NULL;
|
||||
|
||||
+1
-5
@@ -794,11 +794,7 @@ typedef struct {
|
||||
#define FLAG_ANSI 0x08
|
||||
|
||||
// Error codes Usages:
|
||||
|
||||
// Success, regular quit
|
||||
#define PM3_SQUIT 2
|
||||
// Success, transfer nonces pm3: Sending nonces back to client
|
||||
#define PM3_SNONCES 1
|
||||
// NOTE: Positive values should be reserved for commands in case they need to return multiple statuses and error codes simultaneously.
|
||||
// Success (no error)
|
||||
#define PM3_SUCCESS 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user