From 72e0c0b4d4680b7a7b4b42be525d406635dae40f Mon Sep 17 00:00:00 2001 From: Henry Zhao Date: Fri, 6 Apr 2012 17:26:59 -0700 Subject: scanpci: print meaningful info on BASEROM Signed-off-by: Henry Zhao Signed-off-by: Alan Coopersmith --- scanpci/Makefile.am | 2 +- scanpci/scanpci.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scanpci/Makefile.am b/scanpci/Makefile.am index 68d54f4..1a48fdd 100644 --- a/scanpci/Makefile.am +++ b/scanpci/Makefile.am @@ -23,7 +23,7 @@ noinst_PROGRAMS = scanpci -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src LDADD = $(top_builddir)/src/libpciaccess.la scanpci_SOURCES = scanpci.c diff --git a/scanpci/scanpci.c b/scanpci/scanpci.c index 1f5f8bd..a427692 100644 --- a/scanpci/scanpci.c +++ b/scanpci/scanpci.c @@ -47,6 +47,7 @@ #endif #include "pciaccess.h" +#include "pciaccess_private.h" static void @@ -168,8 +169,11 @@ print_pci_device( struct pci_device * dev, int verbose ) } if ( dev->rom_size ) { - printf( " BASEROM 0x%08x addr 0x%08x\n", - 0, 0 ); + struct pci_device_private *priv = + (struct pci_device_private *) dev; + + printf( " BASEROM 0x%08"PRIxPTR" SIZE %zu\n", + (intptr_t) priv->rom_base, (size_t) dev->rom_size); } pci_device_cfg_read_u8( dev, & int_pin, 61 ); -- cgit v1.2.1