scsi: rewrite print_sg_io_buffer using printstr_ex(QUOTE_FORCE_HEX)
As printstr_ex has got QUOTE_FORCE_HEX flag support, there is no need to implement it manually any longer. * scsi.c (print_uchar): Remove. (print_sg_io_buffer): Rewrite using printstr_ex(QUOTE_FORCE_HEX).
This commit is contained in:
parent
c119a6da7c
commit
601a324df2
13
scsi.c
13
scsi.c
@ -42,22 +42,11 @@
|
||||
# include "xlat/bsg_subprotocol.h"
|
||||
# endif
|
||||
|
||||
static bool
|
||||
print_uchar(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
{
|
||||
tprintf("%02x", (unsigned int) (* (unsigned char *) elem_buf));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
print_sg_io_buffer(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const unsigned int len)
|
||||
{
|
||||
unsigned char buf;
|
||||
|
||||
print_array(tcp, addr, len, &buf, sizeof(buf),
|
||||
umoven_or_printaddr, print_uchar, 0);
|
||||
printstr_ex(tcp, addr, len, QUOTE_FORCE_HEX);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user