Fix scanpci -v core dump when subsys vendor/device id's are NOVENDOR &
NODEVICE. Bug #3763 <https://bugs.freedesktop.org/show_bug.cgi?id=3763> Patch #3074 <https://bugs.freedesktop.org/attachment.cgi?id=3074>
This commit is contained in:
parent
cda9c7b267
commit
d6808a48d2
@ -216,7 +216,7 @@ identify_card(pciConfigPtr pcr, int verbose)
|
|||||||
int i, j;
|
int i, j;
|
||||||
int foundit = 0;
|
int foundit = 0;
|
||||||
int foundvendor = 0;
|
int foundvendor = 0;
|
||||||
const char *vname, *dname, *svname, *sname;
|
const char *vname = NULL, *dname = NULL, *svname = NULL, *sname = NULL;
|
||||||
|
|
||||||
pciVendorDevFuncInfo *vdf = vendorDeviceFuncInfo;
|
pciVendorDevFuncInfo *vdf = vendorDeviceFuncInfo;
|
||||||
|
|
||||||
@ -263,6 +263,8 @@ identify_card(pciConfigPtr pcr, int verbose)
|
|||||||
|
|
||||||
if (verbose && !(pcr->pci_header_type & 0x7f) &&
|
if (verbose && !(pcr->pci_header_type & 0x7f) &&
|
||||||
(pcr->pci_subsys_vendor != 0 || pcr->pci_subsys_card != 0) &&
|
(pcr->pci_subsys_vendor != 0 || pcr->pci_subsys_card != 0) &&
|
||||||
|
((pcr->pci_subsys_vendor != NOVENDOR)
|
||||||
|
|| (pcr->pci_subsys_card != NOSUBSYS)) &&
|
||||||
(pcr->pci_vendor != pcr->pci_subsys_vendor ||
|
(pcr->pci_vendor != pcr->pci_subsys_vendor ||
|
||||||
pcr->pci_device != pcr->pci_subsys_card)) {
|
pcr->pci_device != pcr->pci_subsys_card)) {
|
||||||
foundit = 0;
|
foundit = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user