mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 02:43:36 +00:00
hv:Remove dead code in console.c
Remove this API console_dump_bytes Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -135,38 +135,6 @@ int console_write(const char *s, size_t len)
|
||||
return res;
|
||||
}
|
||||
|
||||
void console_dump_bytes(const void *p, unsigned int len)
|
||||
{
|
||||
|
||||
const unsigned char *x = p;
|
||||
const unsigned char *e = x + len;
|
||||
int i;
|
||||
|
||||
/* dump all bytes */
|
||||
while (x < e) {
|
||||
/* write the address of the first byte in the row */
|
||||
printf("%08x: ", (uint64_t) x);
|
||||
/* print one row (16 bytes) as hexadecimal values */
|
||||
for (i = 0; i < 16; i++) {
|
||||
printf("%02x ", x[i]);
|
||||
}
|
||||
|
||||
/* print one row as ASCII characters (if possible) */
|
||||
for (i = 0; i < 16; i++) {
|
||||
if ((x[i] < ' ') || (x[i] >= 127)) {
|
||||
(void)console_putc('.');
|
||||
}
|
||||
else {
|
||||
(void)console_putc(x[i]);
|
||||
}
|
||||
}
|
||||
/* continue with next row */
|
||||
(void)console_putc('\n');
|
||||
/* set pointer one row ahead */
|
||||
x += 16;
|
||||
}
|
||||
}
|
||||
|
||||
static void console_read(void)
|
||||
{
|
||||
spinlock_obtain(&lock);
|
||||
|
Reference in New Issue
Block a user