hf 14a list helptext handling by CmdTraceListAlias, to be generalized if ok

This commit is contained in:
Philippe Teuwen
2021-04-19 14:35:09 +02:00
parent 4c228b6c64
commit 4dea429157
3 changed files with 38 additions and 5 deletions

View File

@@ -171,12 +171,13 @@ static uint16_t frameLength = 0;
uint16_t atsFSC[] = {16, 24, 32, 40, 48, 64, 96, 128, 256};
static int CmdHF14AList(const char *Cmd) {
char args[128] = {0};
if (strlen(Cmd) == 0) {
snprintf(args, sizeof(args), "-t 14a");
} else {
strncpy(args, Cmd, sizeof(args) - 1);
int ret = CmdTraceListAlias(Cmd, "hf 14a list");
if (ret != PM3_SUCCESS) {
return ret;
}
char args[128] = {0};
snprintf(args, sizeof(args), "-t 14a ");
strncat(args, Cmd, sizeof(args) - strlen(args));
return CmdTraceList(args);
}