mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-30 11:39:14 -07:00
style
This commit is contained in:
parent
5801cfa4a8
commit
4f11ef048f
11 changed files with 38 additions and 38 deletions
|
@ -594,8 +594,8 @@ int TestProxmark(void) {
|
|||
}
|
||||
|
||||
// reconfigure.
|
||||
if ( conn.send_via_fpc == false ) {
|
||||
uart_reconfigure_timeouts(sp, UART_USB_CLIENT_RX_TIMEOUT_MS );
|
||||
if (conn.send_via_fpc == false) {
|
||||
uart_reconfigure_timeouts(sp, UART_USB_CLIENT_RX_TIMEOUT_MS);
|
||||
}
|
||||
|
||||
return PM3_SUCCESS;
|
||||
|
|
|
@ -63,14 +63,14 @@ static int build_segs_from_phdrs(flash_file_t *ctx, FILE *fd, Elf32_Phdr *phdrs,
|
|||
continue;
|
||||
}
|
||||
PrintAndLogEx(NORMAL, "%d: V 0x%08x P 0x%08x (0x%08x->0x%08x) [%c%c%c] @0x%x",
|
||||
i, vaddr, paddr, filesz, memsz,
|
||||
(flags & PF_R) ? 'R' : ' ',
|
||||
(flags & PF_W) ? 'W' : ' ',
|
||||
(flags & PF_X) ? 'X' : ' ',
|
||||
offset);
|
||||
i, vaddr, paddr, filesz, memsz,
|
||||
(flags & PF_R) ? 'R' : ' ',
|
||||
(flags & PF_W) ? 'W' : ' ',
|
||||
(flags & PF_X) ? 'X' : ' ',
|
||||
offset);
|
||||
if (filesz != memsz) {
|
||||
PrintAndLogEx(ERR, "Error: PHDR file size does not equal memory size\n"
|
||||
"(DATA+BSS PHDRs do not make sense on ROM platforms!)");
|
||||
"(DATA+BSS PHDRs do not make sense on ROM platforms!)");
|
||||
return -1;
|
||||
}
|
||||
if (paddr < last_end) {
|
||||
|
@ -121,7 +121,7 @@ static int build_segs_from_phdrs(flash_file_t *ctx, FILE *fd, Elf32_Phdr *phdrs,
|
|||
memcpy(new_data, prev_seg->data, prev_seg->length);
|
||||
memcpy(new_data + this_offset, data, filesz);
|
||||
PrintAndLogEx(NORMAL, "Note: Extending previous segment from 0x%x to 0x%x bytes",
|
||||
prev_seg->length, new_length);
|
||||
prev_seg->length, new_length);
|
||||
if (hole)
|
||||
PrintAndLogEx(NORMAL, "Note: 0x%x-byte hole created", hole);
|
||||
free(data);
|
||||
|
@ -335,9 +335,9 @@ static int wait_for_ack(PacketResponseNG *ack) {
|
|||
|
||||
if (ack->cmd != CMD_ACK) {
|
||||
PrintAndLogEx(ERR, "Error: Unexpected reply 0x%04x %s (expected ACK)",
|
||||
ack->cmd,
|
||||
(ack->cmd == CMD_NACK) ? "NACK" : ""
|
||||
);
|
||||
ack->cmd,
|
||||
(ack->cmd == CMD_NACK) ? "NACK" : ""
|
||||
);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -129,7 +129,7 @@ int mfCheckKeys(uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keyc
|
|||
data[2] = clear_trace;
|
||||
data[3] = keycnt;
|
||||
memcpy(data + 4, keyBlock, 6 * keycnt);
|
||||
SendCommandNG(CMD_MIFARE_CHKKEYS, data, (4 + 6 * keycnt) );
|
||||
SendCommandNG(CMD_MIFARE_CHKKEYS, data, (4 + 6 * keycnt));
|
||||
|
||||
PacketResponseNG resp;
|
||||
if (!WaitForResponseTimeout(CMD_MIFARE_CHKKEYS, &resp, 2500)) return PM3_ETIMEOUT;
|
||||
|
|
|
@ -35,7 +35,7 @@ static int l_clearCommandBuffer(lua_State *L) {
|
|||
* @param L
|
||||
* @return
|
||||
*/
|
||||
static int l_fast_push_mode(lua_State *L){
|
||||
static int l_fast_push_mode(lua_State *L) {
|
||||
|
||||
luaL_checktype(L, 1, LUA_TBOOLEAN);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void PrintAndLogEx(logLevel_t level, const char *fmt, ...) {
|
|||
char *tmp_ptr = NULL;
|
||||
// {NORMAL, SUCCESS, INFO, FAILED, WARNING, ERR, DEBUG}
|
||||
static const char *prefixes[7] = { "", "[+] ", "[=] ", "[-] ", "[!] ", "[!!] ", "[#] "};
|
||||
FILE* stream = stdout;
|
||||
FILE *stream = stdout;
|
||||
|
||||
switch (level) {
|
||||
case ERR:
|
||||
|
|
|
@ -107,6 +107,6 @@ uint32_t uart_get_speed(const serial_port sp);
|
|||
|
||||
/* Reconfigure timeouts
|
||||
*/
|
||||
int uart_reconfigure_timeouts(serial_port sp, uint32_t value );
|
||||
int uart_reconfigure_timeouts(serial_port sp, uint32_t value);
|
||||
#endif // _UART_H_
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ struct timeval timeout = {
|
|||
.tv_usec = UART_FPC_CLIENT_RX_TIMEOUT_MS * 1000
|
||||
};
|
||||
|
||||
int uart_reconfigure_timeouts(serial_port sp, uint32_t value ) {
|
||||
int uart_reconfigure_timeouts(serial_port sp, uint32_t value) {
|
||||
timeout.tv_usec = value * 1000;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue