fixed handling of sourceless disks in 'domblkinfo' cmd
virDomainGetBlockInfo() returns error if called on a disk with no source (a sourceless disk might be a removable media drive with no media in it, for instance an empty CDROM or floppy drive). So far this caused the virsh domblkinfo --all command to abort and ignore any remaining (not yet displayed) disk devices. This patch fixes the problem by first checking for existence of a <source> element in the corresponding XML. If none is found, we avoid calling virDomainGetBlockInfo() altogether as we know it's bound to fail in that case. https://bugzilla.redhat.com/show_bug.cgi?id=1619625Signed-off-by: NPavel Mores <pmores@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
Showing
想要评论请 注册 或 登录