2b0cd7cceb
Rebased on top of Martin Wilck's queue of ACKed upstream commits * https://github.com/openSUSE/multipath-tools/tree/upstream-queue * All previous patches have been reordered, with the exception of 0011-libdmmp-Add-support-for-upcoming-json-c-0.14.0.patch which has been replaced with 0029-fix-boolean-value-with-json-c-0.14.patch Modify 0054-RH-add-mpathconf.patch * remove default enable_foreign and property blacklist_exceptions settings, and deal with the builtin default change from 0031-libmultipath-set-enable_foreign-to-NONE-by-default.patch. Fixes bz #1853668 Add 0048-Makefile.inc-trim-extra-information-from-systemd-ver.patch Add 0049-kpartx-fix-Wsign-compare-error.patch * The above two patches have been submitted upstream
91 lines
3.4 KiB
Diff
91 lines
3.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Mon, 11 May 2020 16:02:25 +0200
|
|
Subject: [PATCH] libmultipath: discovery.c: use %z qualifier for size_t
|
|
|
|
Otherwise compilation for 32bit targets spits out warnings.
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmultipath/discovery.c | 16 ++++++++--------
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
|
index ee3290cd..ffec5162 100644
|
|
--- a/libmultipath/discovery.c
|
|
+++ b/libmultipath/discovery.c
|
|
@@ -986,7 +986,7 @@ parse_vpd_pg80(const unsigned char *in, char *out, size_t out_len)
|
|
}
|
|
|
|
if (len >= out_len) {
|
|
- condlog(2, "vpd pg80 overflow, %lu/%lu bytes required",
|
|
+ condlog(2, "vpd pg80 overflow, %zu/%zu bytes required",
|
|
len + 1, out_len);
|
|
len = out_len - 1;
|
|
}
|
|
@@ -1087,7 +1087,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
|
|
|
len = sprintf(out, "%d", vpd_type);
|
|
if (2 * vpd_len >= out_len - len) {
|
|
- condlog(1, "%s: WWID overflow, type %d, %lu/%lu bytes required",
|
|
+ condlog(1, "%s: WWID overflow, type %d, %zu/%zu bytes required",
|
|
__func__, vpd_type,
|
|
2 * vpd_len + len + 1, out_len);
|
|
vpd_len = (out_len - len - 1) / 2;
|
|
@@ -1096,7 +1096,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
|
len += sprintf(out + len,
|
|
"%02x", vpd[i]);
|
|
} else if (vpd_type == 0x8 && vpd_len < 4) {
|
|
- condlog(1, "%s: VPD length %lu too small for designator type 8",
|
|
+ condlog(1, "%s: VPD length %zu too small for designator type 8",
|
|
__func__, vpd_len);
|
|
return -EINVAL;
|
|
} else if (vpd_type == 0x8) {
|
|
@@ -1112,7 +1112,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
|
while (len > 2 && vpd[len - 2] == '\0')
|
|
--len;
|
|
if (len > out_len - 1) {
|
|
- condlog(1, "%s: WWID overflow, type 8/%c, %lu/%lu bytes required",
|
|
+ condlog(1, "%s: WWID overflow, type 8/%c, %zu/%zu bytes required",
|
|
__func__, out[0], len + 1, out_len);
|
|
len = out_len - 1;
|
|
}
|
|
@@ -1136,7 +1136,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
|
while ((p = memchr(vpd, ' ', vpd_len))) {
|
|
p_len = p - vpd;
|
|
if (len + p_len > out_len - 1) {
|
|
- condlog(1, "%s: WWID overflow, type 1, %lu/%lu bytes required",
|
|
+ condlog(1, "%s: WWID overflow, type 1, %zu/%zu bytes required",
|
|
__func__, len + p_len, out_len);
|
|
p_len = out_len - len - 1;
|
|
}
|
|
@@ -1162,7 +1162,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
|
p_len = vpd_len;
|
|
if (p_len > 0 && len < out_len - 1) {
|
|
if (len + p_len > out_len - 1) {
|
|
- condlog(1, "%s: WWID overflow, type 1, %lu/%lu bytes required",
|
|
+ condlog(1, "%s: WWID overflow, type 1, %zu/%zu bytes required",
|
|
__func__, len + p_len + 1, out_len);
|
|
p_len = out_len - len - 1;
|
|
}
|
|
@@ -1186,14 +1186,14 @@ parse_vpd_c0_hp3par(const unsigned char *in, size_t in_len,
|
|
|
|
memset(out, 0x0, out_len);
|
|
if (in_len <= 4 || (in[4] > 3 && in_len < 44)) {
|
|
- condlog(3, "HP/3PAR vendor specific VPD page length too short: %lu", in_len);
|
|
+ condlog(3, "HP/3PAR vendor specific VPD page length too short: %zu", in_len);
|
|
return -EINVAL;
|
|
}
|
|
if (in[4] <= 3) /* revision must be > 3 to have Vomlume Name */
|
|
return -ENODATA;
|
|
len = get_unaligned_be32(&in[40]);
|
|
if (len > out_len || len + 44 > in_len) {
|
|
- condlog(3, "HP/3PAR vendor specific Volume name too long: %lu",
|
|
+ condlog(3, "HP/3PAR vendor specific Volume name too long: %zu",
|
|
len);
|
|
return -EINVAL;
|
|
}
|
|
--
|
|
2.17.2
|
|
|