From owner-svn-src-head@FreeBSD.ORG Thu Jan 31 14:07:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E8E2A787; Thu, 31 Jan 2013 14:07:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C3F5A951; Thu, 31 Jan 2013 14:07:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0VE7PPU098203; Thu, 31 Jan 2013 14:07:25 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0VE7PrX098202; Thu, 31 Jan 2013 14:07:25 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201301311407.r0VE7PrX098202@svn.freebsd.org> From: Steven Hartland Date: Thu, 31 Jan 2013 14:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246146 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2013 14:07:26 -0000 Author: smh Date: Thu Jan 31 14:07:24 2013 New Revision: 246146 URL: http://svnweb.freebsd.org/changeset/base/246146 Log: Format CDB output as 2 digit hex correcting the length Approved by: pjd (mentor) MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Thu Jan 31 11:00:57 2013 (r246145) +++ head/sys/cam/scsi/scsi_all.c Thu Jan 31 14:07:24 2013 (r246146) @@ -3139,7 +3139,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); }