mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Add short flag -m for timeout related commands
This commit is contained in:
parent
119a4c5efa
commit
7dbdc7cf10
2 changed files with 7 additions and 5 deletions
|
@ -931,13 +931,14 @@ static int CmdTimeout(const char *Cmd) {
|
||||||
CLIParserContext *ctx;
|
CLIParserContext *ctx;
|
||||||
CLIParserInit(&ctx, "hw timeout",
|
CLIParserInit(&ctx, "hw timeout",
|
||||||
"Set the communication timeout on the client side",
|
"Set the communication timeout on the client side",
|
||||||
"hw timeout --> Show current timeout\n"
|
"hw timeout --> Show current timeout\n"
|
||||||
"hw timeout --ms 500\n"
|
"hw timeout -m 20 --> Set the timeout to 20ms\n"
|
||||||
|
"hw timeout --ms 500 --> Set the timeout to 500ms\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
arg_int0(NULL, "ms", "<ms>", "timeout in micro seconds"),
|
arg_int0("m", "ms", "<ms>", "timeout in micro seconds"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
|
@ -839,12 +839,13 @@ static int setClientTimeout(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "prefs set client.timeout",
|
CLIParserInit(&ctx, "prefs set client.timeout",
|
||||||
"Set persistent preference of client communication timeout",
|
"Set persistent preference of client communication timeout",
|
||||||
"prefs set client.timeout --ms 0 --> unsets any timeout\n"
|
"prefs set client.timeout --ms 0 --> unsets any timeout\n"
|
||||||
"prefs set client.timeout --ms 500\n"
|
"prefs set client.timeout -m 20 --> Set the timeout to 20ms\n"
|
||||||
|
"prefs set client.timeout --ms 500 --> Set the timeout to 500ms\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
arg_int0(NULL, "ms", "<ms>", "timeout in micro seconds"),
|
arg_int0("m", "ms", "<ms>", "timeout in micro seconds"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue