From: Daniel Schaefer Date: Tue, 16 Oct 2018 19:00:33 +0000 (+0200) Subject: setpci: Pluralize 'capability' in error if needed X-Git-Tag: v3.6.3~31 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=785b2e0e1f259db04b023e68a75fb7368570406e;p=pciutils.git setpci: Pluralize 'capability' in error if needed --- diff --git a/setpci.c b/setpci.c index 13b6a6b..9f328cf 100644 --- 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); }