mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
errors: cmdmain
This commit is contained in:
parent
dcfee8963b
commit
38fc6e2290
4 changed files with 9 additions and 7 deletions
|
@ -631,8 +631,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdFlashMem(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return PM3_SUCCESS;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,17 +28,17 @@ static int CmdRem(const char *Cmd) {
|
|||
#endif
|
||||
strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", ct); // ISO8601
|
||||
PrintAndLogEx(NORMAL, "%s remark: %s", buf, Cmd);
|
||||
return 0;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
static int CmdQuit(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
return 99;
|
||||
return PM3_EFATAL;
|
||||
}
|
||||
|
||||
static int CmdRev(const char *Cmd) {
|
||||
CmdCrc(Cmd);
|
||||
return 0;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
static command_t CommandTable[] = {
|
||||
|
@ -67,7 +67,7 @@ static command_t CommandTable[] = {
|
|||
static int CmdHelp(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
CmdsHelp(CommandTable);
|
||||
return 0;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -181,8 +181,9 @@ main_loop(char *script_cmds_file, char *script_cmd, bool usb_present) {
|
|||
if ((!entry) || (strcmp(entry->line, cmd) != 0))
|
||||
add_history(cmd);
|
||||
|
||||
// PrintAndLogEx(NORMAL, "RETVAL: %d\n", ret);
|
||||
// exit or quit
|
||||
if (ret == 99)
|
||||
if (ret == PM3_EFATAL)
|
||||
break;
|
||||
}
|
||||
free(cmd);
|
||||
|
|
|
@ -421,6 +421,8 @@ typedef struct {
|
|||
#define PM3_EMALLOC -12
|
||||
// File error
|
||||
#define PM3_EFILE -13
|
||||
// Quit program
|
||||
#define PM3_EFATAL -99
|
||||
|
||||
|
||||
// CMD_DEVICE_INFO response packet has flags in arg[0], flag definitions:
|
||||
|
|
Loading…
Reference in a new issue