Display only exec basename in proxmark3 client help

This commit is contained in:
Philippe Teuwen 2021-04-20 18:40:19 +02:00
commit e1b922631d

View file

@ -21,6 +21,7 @@
#include <signal.h> #include <signal.h>
#endif #endif
#include <ctype.h> #include <ctype.h>
#include <libgen.h> // basename
#include "usart_defs.h" #include "usart_defs.h"
#include "util_posix.h" #include "util_posix.h"
@ -745,15 +746,8 @@ int main(int argc, char *argv[]) {
#endif // RL_STATE_READCMD #endif // RL_STATE_READCMD
#endif // HAVE_READLINE #endif // HAVE_READLINE
char *exec_name = argv[0]; char exec_name[100] = {0};
#if defined(_WIN32) strncpy(exec_name, basename(argv[0]), sizeof(exec_name) - 1);
for (int m = strlen(exec_name); m > 0; m--) {
if (exec_name[m] == '\\') {
exec_name += (++m);
break;
}
}
#endif
bool flash_mode = false; bool flash_mode = false;
bool flash_can_write_bl = false; bool flash_can_write_bl = false;