From 82f52db0560ace1cf0bfa8ef025719bd8bbb4711 Mon Sep 17 00:00:00 2001 From: Sucareto <28331534+Sucareto@users.noreply.github.com> Date: Tue, 22 Jun 2021 11:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/sg-cmd.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/sg-cmd.c b/tools/sg-cmd.c index 84d00f5..f676282 100644 --- a/tools/sg-cmd.c +++ b/tools/sg-cmd.c @@ -66,11 +66,6 @@ void sg_req_transact( sg_dispatch_fn_t dispatch, void *ctx) { - printf("req: "); - for (uint8_t i = 0; i < req_nbytes; i++) - printf("%02X ", req_bytes[i]); - printf("\n"); - struct iobuf req_span; union sg_req_any req; union sg_res_any res; @@ -104,8 +99,11 @@ void sg_req_transact( } sg_frame_encode(res_frame, res.bytes, res.res.hdr.frame_len); - - printf("res: "); + printf("req: "); + for (uint8_t i = 0; i < req_nbytes; i++) + printf("%02X ", req_bytes[i]); + printf("\n"); + printf("res: "); for (uint8_t i = 0; i < res_frame->pos; i++) printf("%02X ", res_frame->bytes[i]); printf("\n");