File sg3_fixup-tab-in-inquiry of Package sg3_utils
Index: sg3_utils-1.27/src/sg_inq.c
===================================================================
--- sg3_utils-1.27.orig/src/sg_inq.c
+++ sg3_utils-1.27/src/sg_inq.c
@@ -1773,10 +1773,19 @@ process_std_inq(int sg_fd, const struct
printf(" Inquiry response length=%d, no vendor, "
"product or revision data\n", act_len);
else {
+ int i;
+
if (act_len < SAFE_STD_INQ_RESP_LEN)
rsp_buff[act_len] = '\0';
memcpy(xtra_buff, &rsp_buff[8], 8);
xtra_buff[8] = '\0';
+ /* Fixup any tab characters */
+ i = 0;
+ while (i < 8) {
+ if (xtra_buff[i] == 0x09)
+ xtra_buff[i] = ' ';
+ i++;
+ }
printf(" Vendor identification: %s\n", xtra_buff);
if (act_len <= 16)
printf(" Product identification: <none>\n");