Blame SOURCES/0007-libmultipath-discovery.c-use-z-qualifier-for-size_t.patch

49190a
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
49190a
From: Martin Wilck <mwilck@suse.com>
49190a
Date: Tue, 12 May 2020 00:39:25 +0200
49190a
Subject: [PATCH] libmultipath: discovery.c: use %z qualifier for size_t
49190a
49190a
Otherwise compilation for 32bit targets spits out warnings.
49190a
49190a
Signed-off-by: Martin Wilck <mwilck@suse.com>
49190a
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
49190a
---
49190a
 libmultipath/discovery.c | 16 ++++++++--------
49190a
 1 file changed, 8 insertions(+), 8 deletions(-)
49190a
49190a
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
49190a
index ee3290cd..ffec5162 100644
49190a
--- a/libmultipath/discovery.c
49190a
+++ b/libmultipath/discovery.c
49190a
@@ -986,7 +986,7 @@ parse_vpd_pg80(const unsigned char *in, char *out, size_t out_len)
49190a
 	}
49190a
 
49190a
 	if (len >= out_len) {
49190a
-		condlog(2, "vpd pg80 overflow, %lu/%lu bytes required",
49190a
+		condlog(2, "vpd pg80 overflow, %zu/%zu bytes required",
49190a
 			len + 1, out_len);
49190a
 		len = out_len - 1;
49190a
 	}
49190a
@@ -1087,7 +1087,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
49190a
 
49190a
 		len = sprintf(out, "%d", vpd_type);
49190a
 		if (2 * vpd_len >= out_len - len) {
49190a
-			condlog(1, "%s: WWID overflow, type %d, %lu/%lu bytes required",
49190a
+			condlog(1, "%s: WWID overflow, type %d, %zu/%zu bytes required",
49190a
 				__func__, vpd_type,
49190a
 				2 * vpd_len + len + 1, out_len);
49190a
 			vpd_len = (out_len - len - 1) / 2;
49190a
@@ -1096,7 +1096,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
49190a
 			len += sprintf(out + len,
49190a
 				       "%02x", vpd[i]);
49190a
 	} else if (vpd_type == 0x8 && vpd_len < 4) {
49190a
-		condlog(1, "%s: VPD length %lu too small for designator type 8",
49190a
+		condlog(1, "%s: VPD length %zu too small for designator type 8",
49190a
 			__func__, vpd_len);
49190a
 		return -EINVAL;
49190a
 	} else if (vpd_type == 0x8) {
49190a
@@ -1112,7 +1112,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
49190a
 		while (len > 2 && vpd[len - 2] == '\0')
49190a
 			--len;
49190a
 		if (len > out_len - 1) {
49190a
-			condlog(1, "%s: WWID overflow, type 8/%c, %lu/%lu bytes required",
49190a
+			condlog(1, "%s: WWID overflow, type 8/%c, %zu/%zu bytes required",
49190a
 				__func__, out[0], len + 1, out_len);
49190a
 			len = out_len - 1;
49190a
 		}
49190a
@@ -1136,7 +1136,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
49190a
 		while ((p = memchr(vpd, ' ', vpd_len))) {
49190a
 			p_len = p - vpd;
49190a
 			if (len + p_len > out_len - 1) {
49190a
-				condlog(1, "%s: WWID overflow, type 1, %lu/%lu bytes required",
49190a
+				condlog(1, "%s: WWID overflow, type 1, %zu/%zu bytes required",
49190a
 					__func__, len + p_len, out_len);
49190a
 				p_len = out_len - len - 1;
49190a
 			}
49190a
@@ -1162,7 +1162,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
49190a
 		p_len = vpd_len;
49190a
 		if (p_len > 0 && len < out_len - 1) {
49190a
 			if (len + p_len > out_len - 1) {
49190a
-				condlog(1, "%s: WWID overflow, type 1, %lu/%lu bytes required",
49190a
+				condlog(1, "%s: WWID overflow, type 1, %zu/%zu bytes required",
49190a
 					__func__, len + p_len + 1, out_len);
49190a
 				p_len = out_len - len - 1;
49190a
 			}
49190a
@@ -1186,14 +1186,14 @@ parse_vpd_c0_hp3par(const unsigned char *in, size_t in_len,
49190a
 
49190a
 	memset(out, 0x0, out_len);
49190a
 	if (in_len <= 4 || (in[4] > 3 && in_len < 44)) {
49190a
-		condlog(3, "HP/3PAR vendor specific VPD page length too short: %lu", in_len);
49190a
+		condlog(3, "HP/3PAR vendor specific VPD page length too short: %zu", in_len);
49190a
 		return -EINVAL;
49190a
 	}
49190a
 	if (in[4] <= 3) /* revision must be > 3 to have Vomlume Name */
49190a
 		return -ENODATA;
49190a
 	len = get_unaligned_be32(&in[40]);
49190a
 	if (len > out_len || len + 44 > in_len) {
49190a
-		condlog(3, "HP/3PAR vendor specific Volume name too long: %lu",
49190a
+		condlog(3, "HP/3PAR vendor specific Volume name too long: %zu",
49190a
 			len);
49190a
 		return -EINVAL;
49190a
 	}
49190a
-- 
49190a
2.17.2
49190a