mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Wen Congyang <wency@cn.fujitsu.com>
This commit is contained in:
parent
bb904f45ff
commit
34c13d0d1a
@ -2453,6 +2453,12 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
|
|||||||
goto cleanup;
|
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;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user