]> mj.ucw.cz Git - pciutils.git/commitdiff
Don't show region size if it's zero (usually due to buscentric mode
authorMartin Mares <mj@ucw.cz>
Fri, 20 Aug 1999 08:30:42 +0000 (08:30 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:10:12 +0000 (14:10 +0200)
being enabled).

ChangeLog
lspci.c

index cbcfdfb0677cf4cabb682b810609c5e47d9fca24..a6c8da59bb836a8a191a66b9892ba4e831feda1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug  5 17:45:42 1999  Martin Mares  <mj@albireo.ucw.cz>
+
+       * 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  <mj@albireo.ucw.cz>
 
        * lib/pci.h: Types are OS dependent.
diff --git a/lspci.c b/lspci.c
index 5a429cff13193c8ca0d640acdb085600d31cea09..3c07629e462aa229304b367dd1f6817d34d0a4f2 100644 (file)
--- 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');
     }
 }