mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 16:42:56 -08:00
if getting the vpd data fails, don't try and parse the vpd data.
pointed out by jsg@
This commit is contained in:
parent
ab7db32ba8
commit
e1c925b0a5
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pcidump.c,v 1.57 2020/06/22 05:54:26 dlg Exp $ */
|
||||
/* $OpenBSD: pcidump.c,v 1.58 2021/01/06 23:43:43 dlg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006, 2007 David Gwynne <loki@animata.net>
|
||||
@ -402,8 +402,10 @@ dump_vpd(int bus, int dev, int func)
|
||||
io.pv_count = nitems(data);
|
||||
io.pv_data = data;
|
||||
|
||||
if (ioctl(pcifd, PCIOCGETVPD, &io) == -1)
|
||||
if (ioctl(pcifd, PCIOCGETVPD, &io) == -1) {
|
||||
warn("PCIOCGETVPD");
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
uint8_t vpd = *buf;
|
||||
|
Loading…
Reference in New Issue
Block a user