propagate CmdsParse return value

This commit is contained in:
Philippe Teuwen 2019-04-19 00:47:51 +02:00
commit 1b6a45ac17
46 changed files with 47 additions and 93 deletions

View file

@ -925,6 +925,5 @@ static int CmdHelp(const char *Cmd) {
int CmdAnalyse(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -2147,7 +2147,6 @@ static int CmdHelp(const char *Cmd) {
int CmdData(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -127,8 +127,7 @@ static command_t CommandTable[] = {
int CmdHF(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int CmdHelp(const char *Cmd) {

View file

@ -1156,8 +1156,7 @@ static int CmdHelp(const char *Cmd) {
int CmdHF14A(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int infoHF14A(bool verbose, bool do_nack_test) {

View file

@ -1120,8 +1120,7 @@ static int CmdHelp(const char *Cmd) {
int CmdHF14B(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// get and print all info known about any known 14b tag

View file

@ -1293,7 +1293,7 @@ static int CmdHF15Restore(const char *Cmd) {
return 0;
}
static command_t CommandTable15[] = {
static command_t CommandTable[] = {
{"help", CmdHF15Help, 1, "This help"},
{"demod", CmdHF15Demod, 1, "Demodulate ISO15693 from tag"},
{"dump", CmdHF15Dump, 0, "Read all memory pages of an ISO15693 tag, save to file"},
@ -1320,8 +1320,7 @@ static int CmdHF15Help(const char *Cmd) {
int CmdHF15(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable15, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// used with 'hf search'

View file

@ -178,6 +178,5 @@ static int CmdHelp(const char *Cmd) {
int CmdHFEPA(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -562,8 +562,7 @@ static int CmdHelp(const char *Cmd) {
int CmdHFFelica(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int readFelicaUid(bool verbose) {

View file

@ -906,8 +906,7 @@ static command_t CommandTable[] = {
int CmdHFFido(const char *Cmd) {
(void)WaitForResponseTimeout(CMD_ACK, NULL, 100);
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int CmdHelp(const char *Cmd) {

View file

@ -2454,8 +2454,7 @@ static int CmdHelp(const char *Cmd) {
int CmdHFiClass(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int readIclass(bool loop, bool verbose) {

View file

@ -1311,8 +1311,7 @@ static int CmdHelp(const char *Cmd) {
int CmdHFLegic(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int readLegicUid(bool verbose) {

View file

@ -3585,7 +3585,6 @@ static int CmdHelp(const char *Cmd) {
int CmdHFMF(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -659,7 +659,6 @@ static int CmdHelp(const char *Cmd) {
int CmdHFMFDes(const char *Cmd) {
// flush
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -241,6 +241,5 @@ static int CmdHelp(const char *Cmd) {
int CmdHFMFDesfire(const char *Cmd) {
// flush
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -862,7 +862,6 @@ static int CmdHelp(const char *Cmd) {
int CmdHFMFP(const char *Cmd) {
(void)WaitForResponseTimeout(CMD_ACK, NULL, 100);
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -2671,7 +2671,6 @@ static int CmdHelp(const char *Cmd) {
int CmdHFMFUltra(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -525,8 +525,7 @@ static int CmdHelp(const char *Cmd) {
int CmdHFTopaz(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int readTopazUid(void) {

View file

@ -1007,8 +1007,7 @@ static command_t CommandTable[] = {
int CmdLF(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int CmdHelp(const char *Cmd) {

View file

@ -522,8 +522,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFAWID(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
//refactored by marshmellow

View file

@ -118,8 +118,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFCOTAG(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int demodCOTAG(void) {

View file

@ -1495,8 +1495,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFEM4X(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int demodEM410x(void) {

View file

@ -344,8 +344,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFFdx(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// Ask/Biphase Demod then try to locate an ISO 11784/85 ID

View file

@ -241,8 +241,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFGuard(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// by marshmellow

View file

@ -624,8 +624,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFHID(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int demodHID(void) {

View file

@ -720,8 +720,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFHitag(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int readHitagUid(void) {

View file

@ -480,8 +480,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFINDALA(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// redesigned by marshmellow adjusted from existing decode functions

View file

@ -282,8 +282,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFIO(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int demodIOProx(void) {

View file

@ -217,8 +217,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFJablotron(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int getJablotronBits(uint64_t fullcode, uint8_t *bits) {

View file

@ -214,8 +214,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFKeri(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// find KERI preamble in already demoded data

View file

@ -320,8 +320,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFNedap(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// find nedap preamble in already demoded data

View file

@ -89,8 +89,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFNEXWATCH(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int detectNexWatch(uint8_t *dest, size_t *size, bool *invert) {

View file

@ -222,8 +222,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFNoralsy(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int getnoralsyBits(uint32_t id, uint16_t year, uint8_t *bits) {

View file

@ -71,8 +71,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFPac(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// by marshmellow

View file

@ -164,8 +164,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFParadox(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// loop to get raw paradox waveform then FSK demodulate the TAG ID from it

View file

@ -173,7 +173,6 @@ static int CmdHelp(const char *Cmd) {
int CmdLFPCF7931(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -175,8 +175,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFPresco(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// find presco preamble 0x10D in already demoded data

View file

@ -295,8 +295,7 @@ static command_t CommandTable[] = {
int CmdLFPyramid(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int CmdHelp(const char *Cmd) {

View file

@ -116,8 +116,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFSecurakey(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// by marshmellow

View file

@ -2335,7 +2335,6 @@ static int CmdHelp(const char *Cmd) {
int CmdLFT55XX(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -315,8 +315,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFTI(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int demodTI(void) {

View file

@ -143,8 +143,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFViking(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// calc checksum

View file

@ -227,8 +227,7 @@ static int CmdHelp(const char *Cmd) {
int CmdLFVisa2k(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
// by iceman

View file

@ -193,7 +193,6 @@ static int CmdHelp(const char *Cmd) {
*/
int CmdScript(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}

View file

@ -1166,8 +1166,7 @@ static int CmdHelp(const char *Cmd) {
int CmdSmartcard(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int ExchangeAPDUSC(uint8_t *datain, int datainlen, bool activateCard, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen) {

View file

@ -586,8 +586,7 @@ static int CmdHelp(const char *Cmd) {
int CmdTrace(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}
int CmdTraceList(const char *Cmd) {

View file

@ -1968,7 +1968,6 @@ static int CmdHelp(const char *Cmd) {
int CmdEMV(const char *Cmd) {
clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
return CmdsParse(CommandTable, Cmd);
}