diff options
author | Markus Armbruster <armbru@redhat.com> | 2011-06-22 14:03:54 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-06-24 09:13:36 +0100 |
commit | 6daf194dde15acda153b824299f36f12dfa527a6 (patch) | |
tree | e501eb043697f6ec77338ef8fe4cb5602177fdb0 /hw/virtio-serial-bus.c | |
parent | db78ef5b0a93b16ad56b70a70e21b1c5e7d06ba8 (diff) | |
download | qemu-6daf194dde15acda153b824299f36f12dfa527a6.zip qemu-6daf194dde15acda153b824299f36f12dfa527a6.tar.gz qemu-6daf194dde15acda153b824299f36f12dfa527a6.tar.bz2 |
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 <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-serial-bus.c')
-rw-r--r-- | hw/virtio-serial-bus.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |