Format CDB output as 2 digit hex correcting the length

Approved by:	pjd (mentor)
MFC after:	1 week
This commit is contained in:
Steven Hartland 2013-01-31 14:07:24 +00:00
parent 77a9c69878
commit 4b6b0f4163

View File

@ -3139,7 +3139,7 @@ scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len)
*cdb_string = '\0';
for (i = 0; i < cdb_len; i++)
snprintf(cdb_string + strlen(cdb_string),
len - strlen(cdb_string), "%x ", cdb_ptr[i]);
len - strlen(cdb_string), "%02hhx ", cdb_ptr[i]);
return(cdb_string);
}