aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-bus.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-12-20 18:13:08 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-01-06 15:07:00 +0000
commitbe62a2ebab29eef7dc66c112d60271890ebbbee2 (patch)
tree1002b4c87da2f01304b89a1dc49e20b97cb59254 /hw/usb-bus.c
parentd70d6b31091ab522ce793a52559e3dd9f9913b32 (diff)
Strip trailing '\n' from error_report()'s first argument (again)
Commit 6daf194d got rid of them, but Hans and Gerd added some more lately. Tracked down with this Coccinelle semantic patch: @r@ expression fmt; position p; @@ error_report(fmt, ...)@p @script:python@ fmt << r.fmt; p << r.p; @@ if "\\n" in str(fmt): print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt) Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/usb-bus.c')
-rw-r--r--hw/usb-bus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 8203390929..bd4afa7e2b 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -137,7 +137,7 @@ USBDevice *usb_create(USBBus *bus, const char *name)
bus = usb_bus_find(-1);
if (!bus)
return NULL;
- error_report("%s: no bus specified, using \"%s\" for \"%s\"\n",
+ error_report("%s: no bus specified, using \"%s\" for \"%s\"",
__FUNCTION__, bus->qbus.name, name);
}
#endif
@@ -152,12 +152,12 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name)
int rc;
if (!dev) {
- error_report("Failed to create USB device '%s'\n", name);
+ error_report("Failed to create USB device '%s'", name);
return NULL;
}
rc = qdev_init(&dev->qdev);
if (rc < 0) {
- error_report("Failed to initialize USB device '%s'\n", name);
+ error_report("Failed to initialize USB device '%s'", name);
return NULL;
}
return dev;
@@ -244,7 +244,7 @@ int usb_claim_port(USBDevice *dev)
}
}
if (port == NULL) {
- error_report("Error: usb port %s (bus %s) not found (in use?)\n",
+ error_report("Error: usb port %s (bus %s) not found (in use?)",
dev->port_path, bus->qbus.name);
return -1;
}
@@ -255,7 +255,7 @@ int usb_claim_port(USBDevice *dev)
}
if (bus->nfree == 0) {
error_report("Error: tried to attach usb device %s to a bus "
- "with no free ports\n", dev->product_desc);
+ "with no free ports", dev->product_desc);
return -1;
}
port = QTAILQ_FIRST(&bus->free);
@@ -302,7 +302,7 @@ int usb_device_attach(USBDevice *dev)
if (!(port->speedmask & dev->speedmask)) {
error_report("Warning: speed mismatch trying to attach "
- "usb device %s to bus %s\n",
+ "usb device %s to bus %s",
dev->product_desc, bus->qbus.name);
return -1;
}