Third version of this patch, which should allow virt-manager to start up
correctly*.
virt-manager relies on virDomainGetID returning -1 in the case when a
domain is inactive. On further investigation it turns out that
virDomainGetID and virDomainGetName can never fail**, since all they do
is read fields from the domain pointer that you pass. It was also
claimed that virDomainGetUUID was also error-free, but that's actually
not the case.
So this patch disables exceptions in those two functions only.
Note that the documentation for virDomainGetID is wrong.
Thanks to Hugh Brock and Dan Berrange for finding and diagnosing the
problem.
Rich.
* Not tested: for me virt-manager fails for another reason, with or
without this patch.
** Well, they can fail in the case where you've corrupted memory and
your virDomainPtr isn't really a virDomainPtr, but at that point all
bets are off anyway ...
--
Emerging Technologies, Red Hat
http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)