]> mj.ucw.cz Git - pciutils.git/blobdiff - setpci.c
setpci: Pluralize 'capability' in error if needed
[pciutils.git] / setpci.c
index 13b6a6b4079538334a16eb099917748541e03d8c..9f328cf1c975673b94901fec2601725b98b1e921 100644 (file)
--- a/setpci.c
+++ b/setpci.c
@@ -94,9 +94,10 @@ exec_op(struct op *op, struct pci_dev *dev)
             op->number, ((op->cap_type == PCI_CAP_NORMAL) ? "Capability" : "Extended capability"),
             op->cap_id);
       else
-        die("%s: Instance #%d of %s %04x not found - there %s only %d capability with that id.", slot,
+        die("%s: Instance #%d of %s %04x not found - there %s only %d %s with that id.", slot,
             op->number, ((op->cap_type == PCI_CAP_NORMAL) ? "Capability" : "Extended capability"),
-            op->cap_id, ((cap_nr == 1) ? "is" : "are"), cap_nr);
+            op->cap_id, ((cap_nr == 1) ? "is" : "are"), cap_nr,
+            ((cap_nr == 1) ? "capability" : "capabilities"));
 
       trace(((op->cap_type == PCI_CAP_NORMAL) ? "(cap %02x @%02x) " : "(ecap %04x @%03x) "), op->cap_id, addr);
     }