Blame SOURCES/0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch

da32ae
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
da32ae
From: Benjamin Marzinski <bmarzins@redhat.com>
da32ae
Date: Wed, 16 Feb 2022 00:12:29 -0600
da32ae
Subject: [PATCH] libmultipath: fix printing native nvme multipath topology.
da32ae
da32ae
Since commit 2f05df4 ("libmultipath: use strbuf in print.c"), when
da32ae
multipath prints the topology of native nvme devices, instead of
da32ae
printing the multipath device information, it prints "w [G]:d s". This
da32ae
is because nvme_style() switched from calling snprintf(), which supports
da32ae
format specifiers, to append_strbuf_str(), which doesn't, while still
da32ae
keeping the same string, "%%w [%%G]:%%d %%s". Remove the extra percent
da32ae
signs, since they don't need to be escaped in append_strbuf_str().
da32ae
da32ae
Fixes: 2f05df4 ("libmultipath: use strbuf in print.c")
da32ae
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
da32ae
Reviewed-by: Martin Wilck <mwilck@suse.com>
da32ae
---
da32ae
 libmultipath/foreign/nvme.c | 2 +-
da32ae
 1 file changed, 1 insertion(+), 1 deletion(-)
da32ae
da32ae
diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c
da32ae
index d40c0869..23355ca5 100644
da32ae
--- a/libmultipath/foreign/nvme.c
da32ae
+++ b/libmultipath/foreign/nvme.c
da32ae
@@ -335,7 +335,7 @@ static int snprint_nvme_pg(const struct gen_pathgroup *gmp,
da32ae
 static int nvme_style(__attribute__((unused)) const struct gen_multipath* gm,
da32ae
 		      struct strbuf *buf, __attribute__((unused)) int verbosity)
da32ae
 {
da32ae
-	return append_strbuf_str(buf, "%%w [%%G]:%%d %%s");
da32ae
+	return append_strbuf_str(buf, "%w [%G]:%d %s");
da32ae
 }
da32ae
 
da32ae
 static const struct gen_multipath_ops nvme_map_ops = {