Skip to contentSkip to conversation

lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command

PATCH In review James Smart 3 participants 4 messages Apr 3, 2015 – Apr 10, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 10/21 lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command

Fix provide host name and OS name in RSNN-NN FC-GS command

---
 drivers/scsi/lpfc/lpfc_ct.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +19 -2
index 61a32cd..c259eb0 100644
@@ -1074,8 +1074,25 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
 
 	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
 
-	n = snprintf(symbol, size, "Emulex %s FV%s DV%s",
-		vport->phba->ModelName, fwrev, lpfc_release_version);
+	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " DV%s", lpfc_release_version);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " HN:%s", init_utsname()->nodename);
+
+	/* Note :- OS name is "Linux" as per requirement BZ168199. */
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
+
 	return n;
 }
 
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 29 lines · James Smart

Fix provide host name and OS name in RSNN-NN FC-GS command

---
 drivers/scsi/lpfc/lpfc_ct.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +11 -2
index 61a32cd..c259eb0 100644
@@ -1074,8 +1074,25 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
 
 	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
 
-	n = snprintf(symbol, size, "Emulex %s FV%s DV%s",
-		vport->phba->ModelName, fwrev, lpfc_release_version);
+	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " DV%s", lpfc_release_version);
+
+	if (size < n)

drivers/scsi/lpfc/lpfc_ct.c lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol, · line 1097

Quoted 10 lines
drivers/scsi/lpfc/lpfc_ct.c +8 -0
+		return n;
+	n += snprintf(symbol + n, size - n, " HN:%s", init_utsname()->nodename);
+
+	/* Note :- OS name is "Linux" as per requirement BZ168199. */
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
+
 	return n;
 }

Care to disclose which bugzilla contains BZ168199?

Sebastian

#2 lore raw
Quoted 11 lines · Sebastian Herbszt

drivers/scsi/lpfc/lpfc_ct.c lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol, · line 1097

Quoted 7 lines · James Smart
drivers/scsi/lpfc/lpfc_ct.c +5 -0
+	/* Note :- OS name is "Linux" as per requirement BZ168199. */
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
+
  	return n;
  }

Care to disclose which bugzilla contains BZ168199?

It's meaningless as it's Emulex's bugzilla database, per our own requirements. You will see in the v3 patches just posted I just nixed this.

-- james s

Reviewed-by on v1 10/21
#3 lore raw
In reply to James Smart
Quoted 5 lines · James Smart

Fix provide host name and OS name in RSNN-NN FC-GS command

---

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html