mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
db78ef5b0a
commit
6daf194dde
16 changed files with 76 additions and 74 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue