On Fri, Nov 03, 2017 at 01:03:32PM +0100, Peter Krempa wrote:
All of the error message are already in a conditional block with
known
bus type. Inline the bus type rather than formatting it from a separate
variable.
---
src/qemu/qemu_command.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e663bc357..0d38fc3f2 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1510,14 +1509,14 @@ qemuBuildDriveStrValidate(virDomainDiskDefPtr disk,
}
/* We can only have 1 FDC controller (currently) */
if (disk->info.addr.drive.controller != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Only 1 %s controller is supported"), bus);
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Only 1 fdc controller is supported"));
return -1;
}
/* We can only have 1 FDC bus (currently) */
if (disk->info.addr.drive.bus != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Only 1 %s bus is supported"), bus);
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Only 1 fdc bus is supported"));
s/c /c /
return -1;
}
if (disk->info.addr.drive.target != 0) {
Jan