}
} else {
if (info->addr.pci.function != 0) {
- qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only PCI device addresses with function=0 "
"are supported with this QEMU binary"));
return -1;
return ret;
}
-static int qemuDomainShutdown(virDomainPtr dom) {
+static int qemuDomainShutdown(virDomainPtr dom)
+{
return qemuDomainShutdownFlags(dom, 0);
}
-static int qemuDomainReboot(virDomainPtr dom, unsigned int flags) {
+static int
+qemuDomainReboot(virDomainPtr dom, unsigned int flags)
+{
struct qemud_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
#if HAVE_YAJL
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) {
if (!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) {
- qemuReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Reboot is not supported with this QEMU binary"));
goto cleanup;
}
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_ASYNC)) {
async = true;
} else if (!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_SYNC)) {
- qemuReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("block jobs not supported with this QEMU binary"));
goto cleanup;
} else if (base) {
- qemuReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("partial block pull not supported with this "
"QEMU binary"));
goto cleanup;
if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
controller->model == -1 &&
!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) {
- qemuReportError(VIR_ERR_OPERATION_FAILED,
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("USB controller hotplug unsupported in this QEMU binary"));
goto cleanup;
}
if (mon->json)
ret = qemuMonitorJSONTransaction(mon, actions);
else
- qemuReportError(VIR_ERR_INVALID_ARG, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("transaction requires JSON monitor"));
return ret;
}
ret = qemuMonitorJSONBlockJob(mon, device, base, bandwidth, info, mode,
async);
else
- qemuReportError(VIR_ERR_INVALID_ARG, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("block jobs require JSON monitor"));
return ret;
}
}
if (!mon->json) {
- qemuReportError(VIR_ERR_NO_SUPPORT, "%s",
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("JSON monitor is required"));
return -1;
}