diff --git a/client/src/cmdhfmfhard.c b/client/src/cmdhfmfhard.c index e9f0ba03e..3f3f47b1b 100644 --- a/client/src/cmdhfmfhard.c +++ b/client/src/cmdhfmfhard.c @@ -1821,12 +1821,12 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_ } // error during nested_hard - if (resp.oldarg[0]) { + if (resp.status != PM3_SUCCESS) { if (nonce_file_write) { fclose(fnonces); } DropField(); - return resp.oldarg[0]; + return resp.status; } } diff --git a/client/src/flash.c b/client/src/flash.c index 37a0da184..c52421b54 100644 --- a/client/src/flash.c +++ b/client/src/flash.c @@ -483,6 +483,7 @@ static int get_proxmark_state(uint32_t *state) { break; } case CMD_DEVICE_INFO: { + // bootloader replies are OLD frames by design, see doc/new_frame_format.md *state = resp.oldarg[0]; break; } diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 846fa2a04..dca86c52b 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -937,6 +937,7 @@ static int dumpmem_pm3(char *serial_port_name, const char *filename, uint32_t ad PrintAndLogEx(ERR, "Could not get device info."); goto finish2; } + // bootrom path: CMD_DEVICE_INFO is served by bootrom.c, which only speaks OLD frames uint32_t dev_info = resp.oldarg[0]; in_bootloader = (dev_info & DEVICE_INFO_FLAG_CURRENT_MODE_BOOTROM) != 0; if (in_bootloader) { diff --git a/client/src/scripting.c b/client/src/scripting.c index 81d5d845e..8901de663 100644 --- a/client/src/scripting.c +++ b/client/src/scripting.c @@ -331,15 +331,6 @@ static int l_WaitForResponseTimeout(lua_State *L) { memcpy(foo + n, &resp.crc, sizeof(resp.crc)); n += sizeof(resp.crc); - memcpy(foo + n, &resp.oldarg[0], sizeof(resp.oldarg[0])); - n += sizeof(resp.oldarg[0]); - - memcpy(foo + n, &resp.oldarg[1], sizeof(resp.oldarg[1])); - n += sizeof(resp.oldarg[1]); - - memcpy(foo + n, &resp.oldarg[2], sizeof(resp.oldarg[2])); - n += sizeof(resp.oldarg[2]); - memcpy(foo + n, resp.data.asBytes, sizeof(resp.data)); n += sizeof(resp.data);