From: Rohit Mundra Date: Fri, 30 Oct 2020 03:50:23 +0000 (+0000) Subject: Added five nibbles for domain in dump read X-Git-Tag: v3.8.0~103^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ac459e2698a27b0efc2d11b34aca4335d5efc965;p=pciutils.git Added five nibbles for domain in dump read Allow five nibbles as valid domain, when reading from a dump file with domain --- diff --git a/lib/dump.c b/lib/dump.c index 59cf7ed..879c624 100644 --- a/lib/dump.c +++ b/lib/dump.c @@ -80,7 +80,8 @@ dump_init(struct pci_access *a) len = z - buf + 1; mn = 0; if (dump_validate(buf, "##:##.# ") && sscanf(buf, "%x:%x.%d", &bn, &dn, &fn) == 3 || - dump_validate(buf, "####:##:##.# ") && sscanf(buf, "%x:%x:%x.%d", &mn, &bn, &dn, &fn) == 4) + dump_validate(buf, "####:##:##.# ") && sscanf(buf, "%x:%x:%x.%d", &mn, &bn, &dn, &fn) == 4 || + dump_validate(buf, "#####:##:##.# ") && sscanf(buf, "%x:%x:%x.%d", &mn, &bn, &dn, &fn) == 4) { dev = pci_get_dev(a, mn, bn, dn, fn); dump_alloc_data(dev, 256);