From owner-svn-src-head@FreeBSD.ORG Sun Jun 15 10:04:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 179141A2; Sun, 15 Jun 2014 10:04:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 051C1256F; Sun, 15 Jun 2014 10:04:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5FA4iM7049339; Sun, 15 Jun 2014 10:04:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5FA4iD7049338; Sun, 15 Jun 2014 10:04:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406151004.s5FA4iD7049338@svn.freebsd.org> From: Alexander Motin Date: Sun, 15 Jun 2014 10:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267500 - head/sys/cam/ctl 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.18 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: Sun, 15 Jun 2014 10:04:45 -0000 Author: mav Date: Sun Jun 15 10:04:44 2014 New Revision: 267500 URL: http://svnweb.freebsd.org/changeset/base/267500 Log: Format Portal Group Tag same as istgt does -- %4.4x instead of %x. SPC-4 spec tells it should be "two or more hexadecimal digits". RFC3720 tells it is 16-bit value. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Jun 15 09:37:06 2014 (r267499) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Jun 15 10:04:44 2014 (r267500) @@ -2046,7 +2046,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, cs = PDU_SESSION(request); wwpn_len = strlen(cs->cs_target->ct_name); - wwpn_len += strlen(",t,0x01"); + wwpn_len += strlen(",t,0x0001"); wwpn_len += 1; /* '\0' */ if ((wwpn_len % 4) != 0) wwpn_len += (4 - (wwpn_len % 4)); @@ -2135,7 +2135,7 @@ cfiscsi_devid(struct ctl_scsiio *ctsio, desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_SCSI_NAME; desc1->length = wwpn_len; - snprintf(desc1->identifier, wwpn_len, "%s,t,0x%x", + snprintf(desc1->identifier, wwpn_len, "%s,t,0x%4.4x", cs->cs_target->ct_name, cs->cs_portal_group_tag); /*