Blame SOURCES/lib-zfcp-hbaapi-2.1-parse-u64-as-ull.patch

6ef316
---
6ef316
 lib-zfcp-hbaapi-2.1/vlib_sysfs.c |   52 +++++++++++++++++++--------------------
6ef316
 1 file changed, 26 insertions(+), 26 deletions(-)
6ef316
6ef316
--- a/lib-zfcp-hbaapi-2.1/vlib_sysfs.c
6ef316
+++ b/lib-zfcp-hbaapi-2.1/vlib_sysfs.c
6ef316
@@ -47,13 +47,13 @@ static HBA_STATUS addPortByName(struct v
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "node_name", attr);
6ef316
 	if (!ret)
6ef316
-		port.wwnn = strtol(attr, NULL, 16);
6ef316
+		port.wwnn = strtoull(attr, NULL, 16);
6ef316
 	ret = sfhelper_getProperty(path, "port_name", attr);
6ef316
 	if (!ret)
6ef316
-		port.wwpn = strtol(attr, NULL, 16);
6ef316
+		port.wwpn = strtoull(attr, NULL, 16);
6ef316
 	ret = sfhelper_getProperty(path, "port_id", attr);
6ef316
 	if (!ret)
6ef316
-		port.did = strtol(attr, NULL, 16);
6ef316
+		port.did = strtoul(attr, NULL, 16);
6ef316
 
6ef316
 	addPortToRepos(adapter, &port);
6ef316
 	return HBA_STATUS_OK;
6ef316
@@ -118,13 +118,13 @@ static HBA_STATUS addAdapterByDevPath(ch
6ef316
 
6ef316
 	ret = sfhelper_getProperty(classpath, "node_name", attr);
6ef316
 	if (!ret)
6ef316
-		a.ident.wwnn = strtol(attr, NULL, 16);
6ef316
+		a.ident.wwnn = strtoull(attr, NULL, 16);
6ef316
 	ret = sfhelper_getProperty(classpath, "port_name", attr);
6ef316
 	if (!ret)
6ef316
-		a.ident.wwpn = strtol(attr, NULL, 16);
6ef316
+		a.ident.wwpn = strtoull(attr, NULL, 16);
6ef316
 	ret = sfhelper_getProperty(classpath, "port_id", attr);
6ef316
 	if (!ret)
6ef316
-		a.ident.did = strtol(attr, NULL, 16);
6ef316
+		a.ident.did = strtoul(attr, NULL, 16);
6ef316
 
6ef316
 	addAdapterToRepos(&a);
6ef316
 
6ef316
@@ -151,17 +151,17 @@ static HBA_STATUS getPortAttributes(HBA_
6ef316
 	/* Worldwide Port and Node Name */
6ef316
 	ret = sfhelper_getProperty(classpath, "node_name", attr);
6ef316
 	if (!ret)
6ef316
-		vlib_wwn_to_HBA_WWN(strtol(attr, NULL, 16),
6ef316
+		vlib_wwn_to_HBA_WWN(strtoull(attr, NULL, 16),
6ef316
 					&(*pPortattributes)->NodeWWN);
6ef316
 	ret = sfhelper_getProperty(classpath, "port_name", attr);
6ef316
 	if (!ret)
6ef316
-		vlib_wwn_to_HBA_WWN(strtol(attr, NULL, 16),
6ef316
+		vlib_wwn_to_HBA_WWN(strtoull(attr, NULL, 16),
6ef316
 					&(*pPortattributes)->PortWWN);
6ef316
 
6ef316
 	/* PortFcId */
6ef316
 	ret = sfhelper_getProperty(classpath, "port_id", attr);
6ef316
 	if (!ret)
6ef316
-		(*pPortattributes)->PortFcId = strtol(attr, NULL, 16);
6ef316
+		(*pPortattributes)->PortFcId = strtoul(attr, NULL, 16);
6ef316
 
6ef316
 	/* Port Type */
6ef316
 	ret = sfhelper_getProperty(classpath, "port_type", attr);
6ef316
@@ -361,7 +361,7 @@ int sysfs_getUnitsFromPort(struct vlib_p
6ef316
 		strcat(unitPath, dirent);
6ef316
 		ret = sfhelper_getProperty(unitPath, "fcp_lun", attr);
6ef316
 		if (!ret)
6ef316
-			unit.fcLun = strtol(attr, NULL, 16);
6ef316
+			unit.fcLun = strtoull(attr, NULL, 16);
6ef316
 		sg_dir = sfhelper_opendir(unitPath);
6ef316
 		if (sg_dir == NULL)
6ef316
 			continue;
6ef316
@@ -514,7 +514,7 @@ HBA_STATUS sysfs_getAdapterAttributes(HB
6ef316
 	ret = sfhelper_getProperty(adapter->ident.sysfsPath, "card_version",
6ef316
 									attr);
6ef316
 	if (!ret) {
6ef316
-		a = strtol(attr, NULL, 16);
6ef316
+		a = strtoul(attr, NULL, 16);
6ef316
 		strcpy((*pAttrs)->ModelDescription,
6ef316
 				"zSeries/System z Fibre Channel Adapter ");
6ef316
 		switch (a) {
6ef316
@@ -612,63 +612,63 @@ HBA_STATUS sysfs_getPortStatistics(HBA_P
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "seconds_since_last_reset", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->SecondsSinceLastReset = strtol(attr, NULL, 16);
6ef316
+		(*pS)->SecondsSinceLastReset = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "tx_frames", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->TxFrames = strtol(attr, NULL, 16);
6ef316
+		(*pS)->TxFrames = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "tx_words", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->TxWords = strtol(attr, NULL, 16);
6ef316
+		(*pS)->TxWords = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "rx_frames", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->RxFrames = strtol(attr, NULL, 16);
6ef316
+		(*pS)->RxFrames = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "rx_words", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->RxWords = strtol(attr, NULL, 16);
6ef316
+		(*pS)->RxWords = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "lip_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->LIPCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->LIPCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "nos_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->NOSCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->NOSCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "error_frames", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->ErrorFrames = strtol(attr, NULL, 16);
6ef316
+		(*pS)->ErrorFrames = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "dumped_frames", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->DumpedFrames = strtol(attr, NULL, 16);
6ef316
+		(*pS)->DumpedFrames = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "link_failure_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->LinkFailureCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->LinkFailureCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "loss_of_sync_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->LossOfSyncCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->LossOfSyncCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "loss_of_signal_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->LossOfSignalCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->LossOfSignalCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "prim_seq_protocol_err_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->PrimitiveSeqProtocolErrCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->PrimitiveSeqProtocolErrCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "invalid_tx_word_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->InvalidTxWordCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->InvalidTxWordCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	ret = sfhelper_getProperty(path, "invalid_crc_count", attr);
6ef316
 	if (!ret)
6ef316
-		(*pS)->InvalidCRCCount = strtol(attr, NULL, 16);
6ef316
+		(*pS)->InvalidCRCCount = strtoull(attr, NULL, 16);
6ef316
 
6ef316
 	return HBA_STATUS_OK;
6ef316
 }