mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
client: return error code
This commit is contained in:
parent
c9a1ff6e60
commit
8e29559db6
1 changed files with 5 additions and 3 deletions
|
@ -44,6 +44,8 @@
|
||||||
|
|
||||||
typedef enum LogoMode { UTF8, ANSI, ASCII } LogoMode;
|
typedef enum LogoMode { UTF8, ANSI, ASCII } LogoMode;
|
||||||
|
|
||||||
|
static int mainret = PM3_ESOFT;
|
||||||
|
|
||||||
static void showBanner_logo(LogoMode mode) {
|
static void showBanner_logo(LogoMode mode) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case UTF8: {
|
case UTF8: {
|
||||||
|
@ -398,12 +400,12 @@ check_script:
|
||||||
}
|
}
|
||||||
// process cmd
|
// process cmd
|
||||||
g_pendingPrompt = false;
|
g_pendingPrompt = false;
|
||||||
int ret = CommandReceived(cmd);
|
mainret = CommandReceived(cmd);
|
||||||
#if defined ICOPYX
|
#if defined ICOPYX
|
||||||
PrintAndLogEx(NORMAL, "\nNikola.D: %d", ret);
|
PrintAndLogEx(NORMAL, "\nNikola.D: %d", ret);
|
||||||
#endif
|
#endif
|
||||||
// exit or quit
|
// exit or quit
|
||||||
if (ret == PM3_EFATAL)
|
if (mainret == PM3_EFATAL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free(cmd);
|
free(cmd);
|
||||||
|
@ -1070,6 +1072,6 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
if (g_session.window_changed) // Plot/Overlay moved or resized
|
if (g_session.window_changed) // Plot/Overlay moved or resized
|
||||||
preferences_save();
|
preferences_save();
|
||||||
exit(EXIT_SUCCESS);
|
return mainret;
|
||||||
}
|
}
|
||||||
#endif //LIBPM3
|
#endif //LIBPM3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue