X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=setpci.c;h=50d2a898c7bb81db3c641108134adbd931f2fe16;hb=df59fab40a649ed00cd04047523b1da986c3042c;hp=17d98a800d98d4ccd77fc529ee6fc811d57d60d7;hpb=f34b0c7a54f47a2f7e59cd2567ade99b0a2c4fc5;p=pciutils.git diff --git a/setpci.c b/setpci.c index 17d98a8..50d2a89 100644 --- a/setpci.c +++ b/setpci.c @@ -81,19 +81,19 @@ exec_op(struct op *op, struct pci_dev *dev) char slot[16]; sprintf(slot, "%04x:%02x:%02x.%x", dev->domain, dev->bus, dev->dev, dev->func); - trace("%s", slot); + trace("%s ", slot); if (op->cap_type) { struct pci_cap *cap; - trace(((op->cap_type == PCI_CAP_NORMAL) ? "(cap %02x)" : "(ecap %04x)"), op->cap_id); cap = pci_find_cap(dev, op->cap_id, op->cap_type); if (cap) addr = cap->addr; else die("%s: %s %04x not found", slot, ((op->cap_type == PCI_CAP_NORMAL) ? "Capability" : "Extended capability"), op->cap_id); + trace(((op->cap_type == PCI_CAP_NORMAL) ? "(cap %02x @%02x) " : "(ecap %04x @%03x) "), op->cap_id, addr); } addr += op->addr; - trace(":%02x", addr); + trace("@%02x", addr); /* We have already checked it when parsing, but addressing relative to capabilities can change the address. */ if (addr & (width-1)) @@ -187,6 +187,8 @@ execute(struct op *op) static void scan_ops(struct op *op) { + if (demo_mode) + return; while (op) { if (op->num_values)