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

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