summaryrefslogtreecommitdiff
path: root/setpci.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2003-12-26 21:41:11 +0000
committerMartin Mares <mj@ucw.cz>2006-05-05 14:18:10 +0200
commitb251f40bc2c49892eee8827ef108695f3995ecd9 (patch)
treecc31a8f6792988e6813feec698a5ab08df872558 /setpci.c
parent3fe8a38d911e4428689b8f25a2ef42dce4274cbd (diff)
downloadpciutils-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.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/setpci.c b/setpci.c
index 5af3589..c6b3cc0 100644
--- 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');
}
}