提交 34c13d0d 编写于 作者: W Wen Congyang 提交者: Eric Blake

check more error info about whether drive_add failed

When we attach a disk, but we specify a wrong format of disk image,
qemu monitor command drive_add will fail, but libvirt does not detect
this error.
Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
上级 bb904f45
......@@ -2453,6 +2453,12 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
goto cleanup;
}
if (strstr(reply, "could not open disk image")) {
qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("open disk image file failed"));
goto cleanup;
}
ret = 0;
cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册