]> mj.ucw.cz Git - pciutils.git/commitdiff
setpci: -D should not disable reading
authorMartin Mares <mj@ucw.cz>
Fri, 26 Dec 2003 21:41:11 +0000 (21:41 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:10 +0000 (14:18 +0200)
setpci.c (ex_op): The demo mode was never documented to disable reads,
only writes, so conform with the definition.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-12

ChangeLog
setpci.c

index cc15ea59ecb244275a649fac7ff3d036c1f8b1e2..7192ee0cf4842269f7a8584fcfb9e523b0ca7ce3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 
        * setpci.c (main): Better error messages.
 
+       * setpci.c (ex_op): The demo mode was never documented to disable reads,
+       only writes, so conform with the definition.
+
        * pciutils.h, common.c, setpci.c: Introduced a NONRET macro encapsulating
        the GCC specific __attribute__((noreturn)) and killed the hack with
        redefining __attribute__ on non-GCC compilers.
index 5af3589359e54af5b1f4cf4214c52aef442edff8..c6b3cc008f26dd24fe0fb21294c0d5ff33e2ffca 100644 (file)
--- a/setpci.c
+++ b/setpci.c
@@ -124,24 +124,19 @@ exec_op(struct op *op, struct pci_dev *dev)
     {
       if (verbose)
        printf(" = ");
-      if (!demo_mode)
+      switch (width)
        {
-         switch (width)
-           {
-           case 1:
-             x = pci_read_byte(dev, addr);
-             break;
-           case 2:
-             x = pci_read_word(dev, addr);
-             break;
-           default:
-             x = pci_read_long(dev, addr);
-             break;
-           }
-         printf(formats[width], x);
+       case 1:
+         x = pci_read_byte(dev, addr);
+         break;
+       case 2:
+         x = pci_read_word(dev, addr);
+         break;
+       default:
+         x = pci_read_long(dev, addr);
+         break;
        }
-      else
-       putchar('?');
+      printf(formats[width], x);
       putchar('\n');
     }
 }