mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
avoid more format-related warnings
* src/qemu/qemu_conf.c (qemuBuildDriveStr): Use "%s". * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetGuestPCIAddress): (qemuMonitorJSONGetGuestDriveAddress): Likewise.
This commit is contained in:
parent
dfff67c082
commit
d47b6e54fd
@ -1896,7 +1896,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
|
||||
* to have > 1 bus on a SCSI controller (yet). */
|
||||
if (disk->info.addr.drive.bus != 0) {
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
_("SCSI controller only supports 1 bus"));
|
||||
"%s", _("SCSI controller only supports 1 bus"));
|
||||
goto error;
|
||||
}
|
||||
busid = disk->info.addr.drive.controller;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* qemu_monitor_json.c: interaction with QEMU monitor console
|
||||
*
|
||||
* Copyright (C) 2006-2009 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -1235,7 +1235,7 @@ qemuMonitorJSONGetGuestPCIAddress(virJSONValuePtr reply,
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberUint(addr, "function", &guestAddr->function) < 0) {
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("pci_add reply was missing device function number"));
|
||||
return -1;
|
||||
}
|
||||
@ -1531,19 +1531,19 @@ qemuMonitorJSONGetGuestDriveAddress(virJSONValuePtr reply,
|
||||
|
||||
addr = virJSONValueObjectGet(reply, "return");
|
||||
if (!addr || addr->type != VIR_JSON_TYPE_OBJECT) {
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("drive_add reply was missing device address"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberUint(addr, "bus", &driveAddr->bus) < 0) {
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("drive_add reply was missing device bus number"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberUint(addr, "unit", &driveAddr->unit) < 0) {
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("drive_add reply was missing device unit number"));
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user