fix leftover oldargs
This commit is contained in:
1 parent
87b5ee37c9
commit
1ee41ecf95
4 files changed
+4
-11
No files matched your search
@@ -1821,12 +1821,12 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// error during nested_hard
|
// error during nested_hard
|
||||||
if (resp.oldarg[0]) {
|
if (resp.status != PM3_SUCCESS) {
|
||||||
if (nonce_file_write) {
|
if (nonce_file_write) {
|
||||||
fclose(fnonces);
|
fclose(fnonces);
|
||||||
}
|
}
|
||||||
DropField();
|
DropField();
|
||||||
return resp.oldarg[0];
|
return resp.status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ static int get_proxmark_state(uint32_t *state) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_DEVICE_INFO: {
|
case CMD_DEVICE_INFO: {
|
||||||
|
// bootloader replies are OLD frames by design, see doc/new_frame_format.md
|
||||||
*state = resp.oldarg[0];
|
*state = resp.oldarg[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.");
|
PrintAndLogEx(ERR, "Could not get device info.");
|
||||||
goto finish2;
|
goto finish2;
|
||||||
}
|
}
|
||||||
|
// bootrom path: CMD_DEVICE_INFO is served by bootrom.c, which only speaks OLD frames
|
||||||
uint32_t dev_info = resp.oldarg[0];
|
uint32_t dev_info = resp.oldarg[0];
|
||||||
in_bootloader = (dev_info & DEVICE_INFO_FLAG_CURRENT_MODE_BOOTROM) != 0;
|
in_bootloader = (dev_info & DEVICE_INFO_FLAG_CURRENT_MODE_BOOTROM) != 0;
|
||||||
if (in_bootloader) {
|
if (in_bootloader) {
|
||||||
|
|||||||
@@ -331,15 +331,6 @@ static int l_WaitForResponseTimeout(lua_State *L) {
|
|||||||
memcpy(foo + n, &resp.crc, sizeof(resp.crc));
|
memcpy(foo + n, &resp.crc, sizeof(resp.crc));
|
||||||
n += 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));
|
memcpy(foo + n, resp.data.asBytes, sizeof(resp.data));
|
||||||
n += sizeof(resp.data);
|
n += sizeof(resp.data);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user