if (!error &&
events & VIR_EVENT_HANDLE_HANGUP) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("End of file from monitor"));
eof = 1;
events &= ~VIR_EVENT_HANDLE_HANGUP;
if (!error && !eof &&
events & VIR_EVENT_HANDLE_ERROR) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Invalid file descriptor while waiting for monitor"));
eof = 1;
events &= ~VIR_EVENT_HANDLE_ERROR;
} else {
virErrorPtr err = virGetLastError();
if (!err)
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Error while processing monitor IO"));
virCopyLastError(&mon->lastError);
virResetLastError();
goto cleanup;
}
} else {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Block I/O tuning is not available on this host"));
goto cleanup;
}
goto cleanup;
}
} else {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("CPU tuning is not available on this host"));
}
}
mask = virDomainCpuSetFormat(vm->def->numatune.memory.nodemask,
VIR_DOMAIN_CPUMASK_LEN);
if (!mask) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to convert memory nodemask"));
goto cleanup;
}
continue;
if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("virtio only support device address type 'PCI'"));
goto error;
}
_("guest and host CPU are not compatible: %s"),
compare_msg);
} else {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("guest CPU is not compatible with host CPU"));
}
/* fall through */
if (def->graphics[0]->data.spice.tlsPort > 0) {
if (!driver->spiceTLS) {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("spice TLS port set in XML configuration,"
" but TLS is disabled in qemu.conf"));
goto error;
if (dom->clock.timers[i]->present != -1 &&
dom->clock.timers[i]->present != present) {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("conflicting occurrences of kvmclock feature"));
goto error;
}
}
if (!first_rbd_disk) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("CEPH_ARGS was set without an rbd disk"));
goto error;
}
orig = vmdef->disks[pos];
if (!(orig->device == VIR_DOMAIN_DISK_DEVICE_CDROM) &&
!(orig->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY)) {
- qemuReportError(VIR_ERR_INVALID_ARG,
+ qemuReportError(VIR_ERR_INVALID_ARG, "%s",
_("this disk doesn't support update"));
return -1;
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
if (!qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_BLKIO)) {
- qemuReportError(VIR_ERR_OPERATION_INVALID,
+ qemuReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("blkio cgroup isn't mounted"));
goto cleanup;
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
if (!qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_BLKIO)) {
- qemuReportError(VIR_ERR_OPERATION_INVALID, _("blkio cgroup isn't mounted"));
+ qemuReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("blkio cgroup isn't mounted"));
goto cleanup;
}
|| snap->def->state == VIR_DOMAIN_PAUSED) &&
(flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED))) {
- qemuReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY,
+ qemuReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, "%s",
_("must respawn qemu to start inactive snapshot"));
goto cleanup;
}
(flags & VIR_DOMAIN_CONSOLE_FORCE) != 0);
if (ret == 1) {
- qemuReportError(VIR_ERR_OPERATION_FAILED,
+ qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Active console session exists for this domain"));
ret = -1;
}
int j;
if (virCgroupForVcpu(group, i, &group_vcpu, 0) < 0) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("error accessing cgroup cpuacct for vcpu"));
goto cleanup;
}
pos = buf;
for (j = 0; j < num; j++) {
if (virStrToLong_ull(pos, &pos, 10, &tmp) < 0) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("cpuacct parse error"));
goto cleanup;
}
isvf = qemuDomainHostdevIsVirtualFunction(hostdev);
if (isvf <= 0) {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Interface type hostdev is currently supported on"
" SR-IOV Virtual Functions only"));
return ret;
isvf = qemuDomainHostdevIsVirtualFunction(hostdev);
if (isvf <= 0) {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Interface type hostdev is currently supported on"
" SR-IOV Virtual Functions only"));
return ret;
if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
controller->model == -1 &&
!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) {
- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("USB controller hotplug unsupported in this QEMU binary"));
goto cleanup;
}
/* set link state */
if (net->linkstate == VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN) {
if (!net->info.alias) {
- qemuReportError(VIR_ERR_OPERATION_FAILED,
+ qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("device alias not found: cannot set link state to down"));
} else {
qemuDomainObjEnterMonitorWithDriver(driver, vm);
VIR_DEBUG("dev: %s, state: %d", dev->info.alias, linkstate);
if (!dev->info.alias) {
- qemuReportError(VIR_ERR_OPERATION_FAILED,
+ qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("can't change link state: device alias not found"));
return -1;
}
int ret = 0;
if (!olddev) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot find existing network device to modify"));
return -1;
}
if (olddev->type != dev->type) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot change network interface type"));
return -1;
}
if (STRNEQ_NULLABLE(olddev->data.ethernet.dev, dev->data.ethernet.dev) ||
STRNEQ_NULLABLE(olddev->script, dev->script) ||
STRNEQ_NULLABLE(olddev->data.ethernet.ipaddr, dev->data.ethernet.ipaddr)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify ethernet network device configuration"));
return -1;
}
case VIR_DOMAIN_NET_TYPE_MCAST:
if (STRNEQ_NULLABLE(olddev->data.socket.address, dev->data.socket.address) ||
olddev->data.socket.port != dev->data.socket.port) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify network socket device configuration"));
return -1;
}
if (STRNEQ_NULLABLE(olddev->data.network.name, dev->data.network.name) ||
STRNEQ_NULLABLE(olddev->data.network.portgroup, dev->data.network.portgroup) ||
!virNetDevVPortProfileEqual(olddev->data.network.virtPortProfile, dev->data.network.virtPortProfile)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify network device configuration"));
return -1;
}
/* allow changing brname, but not portprofile */
if (!virNetDevVPortProfileEqual(olddev->data.bridge.virtPortProfile,
dev->data.bridge.virtPortProfile)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify bridge network device configuration"));
return -1;
}
case VIR_DOMAIN_NET_TYPE_INTERNAL:
if (STRNEQ_NULLABLE(olddev->data.internal.name, dev->data.internal.name)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify internal network device configuration"));
return -1;
}
if (STRNEQ_NULLABLE(olddev->data.direct.linkdev, dev->data.direct.linkdev) ||
olddev->data.direct.mode != dev->data.direct.mode ||
!virNetDevVPortProfileEqual(olddev->data.direct.virtPortProfile, dev->data.direct.virtPortProfile)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify direct network device configuration"));
return -1;
}
/* all other unmodifiable parameters */
if (STRNEQ_NULLABLE(olddev->model, dev->model) ||
STRNEQ_NULLABLE(olddev->filter, dev->filter)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify network device configuration"));
return -1;
}
/* check if device name has been set, if no, retain the autogenerated one */
if (dev->ifname &&
STRNEQ_NULLABLE(olddev->ifname, dev->ifname)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("cannot modify network device configuration"));
return -1;
}
if (!(flags & VIR_MIGRATE_TUNNELLED) &&
(uri_out == NULL)) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare2 did not set uri"));
cancelled = 1;
goto finish;
if (!(flags & VIR_MIGRATE_TUNNELLED) &&
(uri_out == NULL)) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare3 did not set uri"));
cancelled = 1;
goto finish;
if (!error &&
events & VIR_EVENT_HANDLE_HANGUP) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("End of file from monitor"));
eof = 1;
events &= ~VIR_EVENT_HANDLE_HANGUP;
if (!error && !eof &&
events & VIR_EVENT_HANDLE_ERROR) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Invalid file descriptor while waiting for monitor"));
eof = 1;
events &= ~VIR_EVENT_HANDLE_ERROR;
} else {
virErrorPtr err = virGetLastError();
if (!err)
- qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Error while processing monitor IO"));
virCopyLastError(&mon->lastError);
virResetLastError();
if (mon->lastError.code == VIR_ERR_OK) {
virErrorPtr err = virSaveLastError();
- qemuReportError(VIR_ERR_OPERATION_FAILED,
+ qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Qemu monitor was closed"));
virCopyLastError(&mon->lastError);
if (err) {
VIR_DEBUG("mon=%p, name=%p:%s, state=%u", mon, name, name, state);
if (!mon || !name) {
- qemuReportError(VIR_ERR_INVALID_ARG,
+ qemuReportError(VIR_ERR_INVALID_ARG, "%s",
_("monitor || name must not be NULL"));
return -1;
}
VIR_DEBUG("Setting link state: %s", def->nets[i]->info.alias);
if (!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_NETDEV)) {
- qemuReportError(VIR_ERR_NO_SUPPORT,
+ qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
_("Setting of link state is not supported by this qemu"));
return -1;
}