svn commit: r268147 - stable/10/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Wed Jul 2 10:39:45 UTC 2014


Author: mav
Date: Wed Jul  2 10:39:45 2014
New Revision: 268147
URL: http://svnweb.freebsd.org/changeset/base/268147

Log:
  MFC r267500:
  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.

Modified:
  stable/10/sys/cam/ctl/ctl_frontend_iscsi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c	Wed Jul  2 10:38:22 2014	(r268146)
+++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c	Wed Jul  2 10:39:45 2014	(r268147)
@@ -2045,7 +2045,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));
@@ -2134,7 +2134,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);
 
 	/*


More information about the svn-src-all mailing list