Integrating feedback to the original version.
This changes the approach to fixing the problem - previously, we called
virDomainGetBlockInfo() and if it failed, we mitigated the failure for CDROMs
and floppies specifically. Now we first check for existence of a <source>
element in the corresponding XML and if we find none, we avoid calling
virDomainGetBlockInfo() altogether as we know it's bound to fail in that case.
The benefit is that whereas the previous fix swallowed all errors concerning
CDROMs and floppies - not just missing <source> - this one only handles
missing <source> specifically and doesn't mask other problems that might come
up.
The patch itself is fairly simple, unfortunately some noise is caused by
additional indentation of code related to the virDomainGetBlockInfo() call.
That code should however be unchanged (apart from reformating a comment to
keep line lengths under 80 chars).
Pavel Mores (1):
fixed handling of sourceless disks in 'domblkinfo' cmd
tools/virsh-domain-monitor.c | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
--
2.21.0