diff options
author | Martin Mares <mj@ucw.cz> | 2003-12-26 21:41:11 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2006-05-05 14:18:10 +0200 |
commit | b251f40bc2c49892eee8827ef108695f3995ecd9 (patch) | |
tree | cc31a8f6792988e6813feec698a5ab08df872558 /setpci.c | |
parent | 3fe8a38d911e4428689b8f25a2ef42dce4274cbd (diff) | |
download | pciutils-b251f40bc2c49892eee8827ef108695f3995ecd9.tar.gz |
setpci: -D should not disable reading
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
Diffstat (limited to 'setpci.c')
-rw-r--r-- | setpci.c | 27 |
1 files changed, 11 insertions, 16 deletions
@@ -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'); } } |