From 6daf194dde15acda153b824299f36f12dfa527a6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 22 Jun 2011 14:03:54 +0200 Subject: Strip trailing '\n' from error_report()'s first argument error_report() prepends location, and appends a newline. The message constructed from the arguments should not contain a newline. Fix the obvious offenders. Signed-off-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- hw/virtio-serial-bus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/virtio-serial-bus.c') diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 9a12104..bff4004 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -337,7 +337,7 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len) switch(cpkt.event) { case VIRTIO_CONSOLE_DEVICE_READY: if (!cpkt.value) { - error_report("virtio-serial-bus: Guest failure in adding device %s\n", + error_report("virtio-serial-bus: Guest failure in adding device %s", vser->bus.qbus.name); break; } @@ -352,7 +352,7 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len) case VIRTIO_CONSOLE_PORT_READY: if (!cpkt.value) { - error_report("virtio-serial-bus: Guest failure in adding port %u for device %s\n", + error_report("virtio-serial-bus: Guest failure in adding port %u for device %s", port->id, vser->bus.qbus.name); break; } @@ -741,7 +741,7 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base) plugging_port0 = info->is_console && !find_port_by_id(port->vser, 0); if (find_port_by_id(port->vser, port->id)) { - error_report("virtio-serial-bus: A port already exists at id %u\n", + error_report("virtio-serial-bus: A port already exists at id %u", port->id); return -1; } @@ -752,7 +752,7 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base) } else { port->id = find_free_port_id(port->vser); if (port->id == VIRTIO_CONSOLE_BAD_ID) { - error_report("virtio-serial-bus: Maximum port limit for this device reached\n"); + error_report("virtio-serial-bus: Maximum port limit for this device reached"); return -1; } } @@ -760,7 +760,7 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base) max_nr_ports = tswap32(port->vser->config.max_nr_ports); if (port->id >= max_nr_ports) { - error_report("virtio-serial-bus: Out-of-range port id specified, max. allowed: %u\n", + error_report("virtio-serial-bus: Out-of-range port id specified, max. allowed: %u", max_nr_ports - 1); return -1; } -- cgit v1.1