diff options
author | Pali Rohár <pali@kernel.org> | 2021-12-20 16:56:59 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2021-12-26 22:57:57 +0100 |
commit | 006ca87f517a8cf6d4629b04e5d5b14f731fc32e (patch) | |
tree | e8138df7fa93cec09640173a460a4c7cfe659d38 | |
parent | 63435b6e6e96b59b00cff31138603dadd1ec183a (diff) | |
download | pciutils-006ca87f517a8cf6d4629b04e5d5b14f731fc32e.tar.gz |
dump: Allow more leading zeros in dump line number
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.
-rw-r--r-- | lib/dump.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |