diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2021-01-06 23:43:44 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2021-01-06 23:43:44 +0000 |
commit | e54cf24e23215ddb6cc246115e9c546c3a8839a3 (patch) | |
tree | a285cdb4c42ffcf0a8f6787aa97acae58b427815 /usr.sbin/pcidump | |
parent | 1a3ef4a8e55dfa32e3429f9f91ca69db22237050 (diff) |
if getting the vpd data fails, don't try and parse the vpd data.
pointed out by jsg@
Diffstat (limited to 'usr.sbin/pcidump')
-rw-r--r-- | usr.sbin/pcidump/pcidump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pcidump/pcidump.c b/usr.sbin/pcidump/pcidump.c index 1b239b732da..0c82554d5d5 100644 --- a/usr.sbin/pcidump/pcidump.c +++ b/usr.sbin/pcidump/pcidump.c @@ -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; |