All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH pciutils] dump: Allow more leading zeros in dump line number
@ 2021-12-20 15:56 Pali Rohár
  2021-12-26 21:58 ` Martin Mareš
  0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2021-12-20 15:56 UTC (permalink / raw)
  To: Martin Mares, Bjorn Helgaas, Krzysztof Wilczyński,
	Matthew Wilcox, linux-pci

U-Boot's "pci display.b" command prints pci config space dump with 8 digits
in line number. So allow up to the 8 digits in line number to easily parse
U-Boot's pci config space dumps.
---
 lib/dump.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/dump.c b/lib/dump.c
index 879c62449b27..c0f929133973 100644
--- a/lib/dump.c
+++ b/lib/dump.c
@@ -90,7 +90,9 @@ dump_init(struct pci_access *a)
       else if (!len)
 	dev = NULL;
       else if (dev &&
-	       (dump_validate(buf, "##: ") || dump_validate(buf, "###: ")) &&
+	       (dump_validate(buf, "##: ") || dump_validate(buf, "###: ") || dump_validate(buf, "####: ") ||
+		dump_validate(buf, "#####: ") || dump_validate(buf, "######: ") ||
+		dump_validate(buf, "#######: ") || dump_validate(buf, "########: ")) &&
 	       sscanf(buf, "%x: ", &i) == 1)
 	{
 	  struct dump_data *dd = dev->aux;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH pciutils] dump: Allow more leading zeros in dump line number
  2021-12-20 15:56 [PATCH pciutils] dump: Allow more leading zeros in dump line number Pali Rohár
@ 2021-12-26 21:58 ` Martin Mareš
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Mareš @ 2021-12-26 21:58 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Bjorn Helgaas, Krzysztof Wilczyński, Matthew Wilcox, linux-pci

Hi!

> U-Boot's "pci display.b" command prints pci config space dump with 8 digits
> in line number. So allow up to the 8 digits in line number to easily parse
> U-Boot's pci config space dumps.

Thanks, applied.

				Martin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-26 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 15:56 [PATCH pciutils] dump: Allow more leading zeros in dump line number Pali Rohár
2021-12-26 21:58 ` Martin Mareš

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.