* [dm-devel] [PATCH] libmultipath: fix printing native nvme multipath topology.
@ 2022-02-16 6:12 Benjamin Marzinski
2022-02-16 8:34 ` Martin Wilck
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Marzinski @ 2022-02-16 6:12 UTC (permalink / raw)
To: Christophe Varoqui; +Cc: device-mapper development, Martin Wilck
Since commit 2f05df4 ("libmultipath: use strbuf in print.c"), when
multipath prints the topology of native nvme devices, instead of
printing the multipath device information, it prints "w [G]:d s". This
is because nvme_style() switched from calling snprintf(), which supports
format specifiers, to append_strbuf_str(), which doesn't, while still
keeping the same string, "%%w [%%G]:%%d %%s". Remove the extra percent
signs, since they don't need to be escaped in append_strbuf_str().
Fixes: 2f05df4 ("libmultipath: use strbuf in print.c")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/foreign/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c
index 499b881d..838e1164 100644
--- a/libmultipath/foreign/nvme.c
+++ b/libmultipath/foreign/nvme.c
@@ -337,7 +337,7 @@ static int snprint_nvme_pg(const struct gen_pathgroup *gmp,
static int nvme_style(__attribute__((unused)) const struct gen_multipath* gm,
struct strbuf *buf, __attribute__((unused)) int verbosity)
{
- return append_strbuf_str(buf, "%%w [%%G]:%%d %%s");
+ return append_strbuf_str(buf, "%w [%G]:%d %s");
}
static const struct gen_multipath_ops nvme_map_ops = {
--
2.17.2
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [dm-devel] [PATCH] libmultipath: fix printing native nvme multipath topology.
2022-02-16 6:12 [dm-devel] [PATCH] libmultipath: fix printing native nvme multipath topology Benjamin Marzinski
@ 2022-02-16 8:34 ` Martin Wilck
0 siblings, 0 replies; 2+ messages in thread
From: Martin Wilck @ 2022-02-16 8:34 UTC (permalink / raw)
To: bmarzins, christophe.varoqui; +Cc: dm-devel
On Wed, 2022-02-16 at 00:12 -0600, Benjamin Marzinski wrote:
> Since commit 2f05df4 ("libmultipath: use strbuf in print.c"), when
> multipath prints the topology of native nvme devices, instead of
> printing the multipath device information, it prints "w [G]:d s".
> This
> is because nvme_style() switched from calling snprintf(), which
> supports
> format specifiers, to append_strbuf_str(), which doesn't, while still
> keeping the same string, "%%w [%%G]:%%d %%s". Remove the extra
> percent
> signs, since they don't need to be escaped in append_strbuf_str().
>
> Fixes: 2f05df4 ("libmultipath: use strbuf in print.c")
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Oops, thanks a lot for catching this!
Reviewed-by: Martin Wilck <mwilck@suse.com>
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-16 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 6:12 [dm-devel] [PATCH] libmultipath: fix printing native nvme multipath topology Benjamin Marzinski
2022-02-16 8:34 ` Martin Wilck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.