>From 22409c67d2e461c0e462c2be5efa3bc2941caed7 Mon Sep 17 00:00:00 2001 From: Henry Zhao <[email protected]> Date: Fri, 6 Apr 2012 17:26:59 -0700 Subject: [PATCH] scanpci: print meaningful info on BASEROM
Signed-off-by: Henry Zhao <[email protected]> --- 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 ); -- 1.5.6.5
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
