mirror of https://gitee.com/openkylin/libvirt.git
qemu: report error for non-existing disk in blockjobinfo
Before: # virsh blockjob r7 vdc error: An error occurred, but the cause is unknown After: # virsh blockjob r7 vdc error: Disk 'vdc' not found in the domain Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1241355 Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
2e09729b1c
commit
b5c2245b0c
|
@ -16414,8 +16414,11 @@ qemuDomainGetBlockJobInfo(virDomainPtr dom,
|
|||
if (qemuDomainSupportsBlockJobs(vm, NULL) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!(disk = virDomainDiskByName(vm->def, path, true)))
|
||||
if (!(disk = virDomainDiskByName(vm->def, path, true))) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("disk %s not found in the domain"), path);
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
ret = qemuMonitorGetBlockJobInfo(qemuDomainGetMonitor(vm),
|
||||
|
|
Loading…
Reference in New Issue