mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
CHG: pip:ing, command, lua, from CLI has less output.
This commit is contained in:
parent
dc23a6d5ce
commit
d15cf5ff2f
2 changed files with 15 additions and 5 deletions
|
@ -249,13 +249,17 @@ int CmdTune(const char *Cmd)
|
||||||
return CmdTuneSamples(Cmd);
|
return CmdTuneSamples(Cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdVersion(const char *Cmd)
|
int CmdVersion(const char *Cmd) {
|
||||||
{
|
|
||||||
clearCommandBuffer();
|
bool silent = (Cmd[0] == 's' || Cmd[0] == 'S');
|
||||||
|
if ( silent )
|
||||||
|
return 0;
|
||||||
|
|
||||||
UsbCommand c = {CMD_VERSION};
|
UsbCommand c = {CMD_VERSION};
|
||||||
static UsbCommand resp = {0, {0, 0, 0}};
|
static UsbCommand resp = {0, {0, 0, 0}};
|
||||||
|
|
||||||
if (resp.arg[0] == 0 && resp.arg[1] == 0) { // no cached information available
|
if (resp.arg[0] == 0 && resp.arg[1] == 0) { // no cached information available
|
||||||
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
||||||
#ifdef __WIN32
|
#ifdef __WIN32
|
||||||
|
|
|
@ -160,7 +160,10 @@ void main_loop(char *script_cmds_file, char *script_cmd, bool usb_present) {
|
||||||
rarg.run = 1;
|
rarg.run = 1;
|
||||||
pthread_create(&reader_thread, NULL, &uart_receiver, &rarg);
|
pthread_create(&reader_thread, NULL, &uart_receiver, &rarg);
|
||||||
// cache Version information now:
|
// cache Version information now:
|
||||||
CmdVersion( (script_cmds_file) ? "s" : NULL );
|
if ( execCommand || script_cmds_file || stdinOnPipe)
|
||||||
|
CmdVersion("s");
|
||||||
|
else
|
||||||
|
CmdVersion("");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (script_cmds_file) {
|
if (script_cmds_file) {
|
||||||
|
@ -186,7 +189,10 @@ void main_loop(char *script_cmds_file, char *script_cmd, bool usb_present) {
|
||||||
rarg.run = 1;
|
rarg.run = 1;
|
||||||
pthread_create(&reader_thread, NULL, &uart_receiver, &rarg);
|
pthread_create(&reader_thread, NULL, &uart_receiver, &rarg);
|
||||||
// cache Version information now:
|
// cache Version information now:
|
||||||
CmdVersion( (script_cmds_file) ? "s" : NULL );
|
if ( execCommand || script_cmds_file || stdinOnPipe)
|
||||||
|
CmdVersion("s");
|
||||||
|
else
|
||||||
|
CmdVersion("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue