From: Martin Mares Date: Fri, 20 Aug 1999 08:30:42 +0000 (+0000) Subject: Don't show region size if it's zero (usually due to buscentric mode X-Git-Tag: v3.0.0~267 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c36c086251920ae458bc274c8a4eca194d796087;p=pciutils.git Don't show region size if it's zero (usually due to buscentric mode being enabled). --- diff --git a/ChangeLog b/ChangeLog index cbcfdfb..a6c8da5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 5 17:45:42 1999 Martin Mares + + * lspci.c (show_size): Don't show size if it's zero (usually + due to bus-centric mode being enabled). + Tue Jul 20 13:25:09 1999 Martin Mares * lib/pci.h: Types are OS dependent. diff --git a/lspci.c b/lspci.c index 5a429cf..3c07629 100644 --- a/lspci.c +++ b/lspci.c @@ -1,5 +1,5 @@ /* - * $Id: lspci.c,v 1.27 1999/07/07 11:23:04 mj Exp $ + * $Id: lspci.c,v 1.28 1999/08/20 08:30:44 mj Exp $ * * Linux PCI Utilities -- List All PCI Devices * @@ -248,6 +248,8 @@ show_terse(struct device *d) static void show_size(pciaddr_t x) { + if (!x) + return; printf(" [size="); if (x < 1024) printf("%d", (int) x); @@ -342,8 +344,7 @@ show_bases(struct device *d, int cnt) if (!(cmd & PCI_COMMAND_MEMORY)) printf(" [disabled]"); } - if (len) - show_size(len); + show_size(len); putchar('\n'); } }