| 23 | } |
| 24 | |
| 25 | void dump_hex(const u8 *ptr, u32 buflen, const char *tag) |
| 26 | { |
| 27 | unsigned char *buf = (unsigned char *)ptr; |
| 28 | u32 i, j; |
| 29 | |
| 30 | Ft_printf("dump hex for %s\r\n", tag); |
| 31 | for (i = 0; i < buflen; i += 16) |
| 32 | { |
| 33 | Ft_printf("%08X: ", ptr + i); |
| 34 | |
| 35 | for (j = 0; j < 16; j++) |
| 36 | { |
| 37 | if (i + j < buflen) |
| 38 | { |
| 39 | Ft_printf("%02X ", buf[i + j]); |
| 40 | } |
| 41 | else |
| 42 | { |
| 43 | Ft_printf(" "); |
| 44 | } |
| 45 | } |
| 46 | Ft_printf(" "); |
| 47 | |
| 48 | for (j = 0; j < 16; j++) |
| 49 | { |
| 50 | if (i + j < buflen) |
| 51 | { |
| 52 | Ft_printf("%c", __is_print(buf[i + j]) ? buf[i + j] : '.'); |
| 53 | } |
| 54 | } |
| 55 | Ft_printf("\r\n"); |
| 56 | } |
| 57 | } |
nothing calls this directly
no test coverage detected