summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Zhao <henry.zhao@oracle.com>2012-04-06 17:26:59 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-10-21 11:36:24 -0700
commit72e0c0b4d4680b7a7b4b42be525d406635dae40f (patch)
treefcc901f1a1f725e98346277e2c7971a4c96d388d
parentba53031899611a1653656034a1a3de9b71e5bc85 (diff)
scanpci: print meaningful info on BASEROM
Signed-off-by: Henry Zhao <henry.zhao@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--scanpci/Makefile.am2
-rw-r--r--scanpci/scanpci.c8
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 );