svn commit: r251299 - stable/9/sys/cam/scsi

Steven Hartland smh at FreeBSD.org
Mon Jun 3 14:33:11 UTC 2013


Author: smh
Date: Mon Jun  3 14:33:10 2013
New Revision: 251299
URL: http://svnweb.freebsd.org/changeset/base/251299

Log:
  MFC r246146:
  Format CDB output as 2 digit hex correcting the length

Modified:
  stable/9/sys/cam/scsi/scsi_all.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/scsi/scsi_all.c
==============================================================================
--- stable/9/sys/cam/scsi/scsi_all.c	Mon Jun  3 13:11:48 2013	(r251298)
+++ stable/9/sys/cam/scsi/scsi_all.c	Mon Jun  3 14:33:10 2013	(r251299)
@@ -3136,7 +3136,7 @@ scsi_cdb_string(u_int8_t *cdb_ptr, char 
 	*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);
 }


More information about the svn-src-stable-9 mailing list