]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/proc.c
Corrected masking of hdr_type
[pciutils.git] / lib / proc.c
index 7a1191da55af2df93a63676b58fd44e5cf2aa791..d46e5cba4aba1e4dd0bd3c43c85b3b29a3a86862 100644 (file)
@@ -155,7 +155,7 @@ proc_scan(struct pci_access *a)
       d->func = PCI_FUNC(dfn & 0xff);
       d->vendor_id = vend >> 16U;
       d->device_id = vend & 0xffff;
-      d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE);
+      d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f;
       known = PCI_FILL_IDENT;
       if (!a->buscentric)
        {