svn commit: r267500 - head/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Sun Jun 15 10:04:45 UTC 2014
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);
/*
More information about the svn-src-head
mailing list