From 785b2e0e1f259db04b023e68a75fb7368570406e Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 16 Oct 2018 21:00:33 +0200 Subject: [PATCH] setpci: Pluralize 'capability' in error if needed --- setpci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.39.2