From 660ac667940dc7bb188b4e2d0ec9c7f2dd444fc0 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Fri, 27 Dec 2019 18:18:48 +0000 Subject: sg_lib: add sg_get_command_str() and sg_print_command_len(); sg_verify+sg_write_same: fix and --ff option; sg_dd+sgh_dd: add --verify support git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@837 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- src/sg_write_x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sg_write_x.c') diff --git a/src/sg_write_x.c b/src/sg_write_x.c index fca94377..0bc28c27 100644 --- a/src/sg_write_x.c +++ b/src/sg_write_x.c @@ -38,7 +38,7 @@ #include "sg_unaligned.h" #include "sg_pr2serr.h" -static const char * version_str = "1.21 20190913"; +static const char * version_str = "1.22 20191220"; /* Protection Information refers to 8 bytes of extra information usually * associated with each logical block and is often abbreviated to PI while @@ -1237,10 +1237,10 @@ do_write_x(int sg_fd, const void * dataoutp, int dout_len, } if (vb > 1) { - pr2serr(" %s cdb: ", op->cdb_name); - for (k = 0; k < cdb_len; ++k) - pr2serr("%02x ", x_cdb[k]); - pr2serr("\n"); + char b[128]; + + pr2serr(" %s cdb: %s\n", op->cdb_name, + sg_get_command_str(x_cdb, cdb_len, false, sizeof(b), b)); } if (op->do_scattered && (vb > 2) && (dout_len > 31)) { uint32_t sod_off = op->bs_pi_do * op->scat_lbdof; -- cgit v1.2.3