[Libvir] Re: RFC: replace "no support for hypervisor" error

Richard W.M. Jones rjones at redhat.com
Wed Jun 20 13:15:50 UTC 2007

Daniel Veillard wrote:
> On Tue, Jun 19, 2007 at 02:16:23PM +0100, Richard W.M. Jones wrote:
>> (3) Split VIR_ERR_NO_SUPPORT into two categories.  Currently this 
>> category mixes up cases where we fail to open a connection, and cases 
>> where there is no driver support for a particular operation (even with 
>> an open connection).  In the first case, go through all the places which 
>> return this error and add proper diagnostic information to the error 
>> messages.
>>   -- Again, I am prepared to do this if people think it's a good idea.
>   It would be logical to separate the two, I think we already at the low level
> do the difference but it doesn't show up at the error level.

The attached patch:

(1) Makes VIR_ERR_NO_SUPPORT mean that a function is not supported by 
the hypervisor.  It changes the message to be more specific and 
coincidentally corrects a bug which was causing the optional info field 
to be dropped.

(2) Makes VIR_ERR_NO_CONNECT mean that we could not connect to the 

(3) Deprecates VIR_ERR_CALL_FAILED, because the meaning and use of this 
overlapped with VIR_ERR_NO_SUPPORT, and some calls failed with one and 
other calls failed with the other.  Accordingly it changes all 

(4) Removes all error messages which occur before VIR_DRV_OPEN_DECLINED. 
  If a driver is declines a URI, then that is normal behaviour and no 
reason to print an error.  A later driver in the chain may accept the 
URI, and if none of the drivers can accept it then libvirt.c:do_open 
contains code to generate an error.

(5) If xen_unified.c was passed a naked string like "foo" as a URI then 
it would try to use it as a relative file reference.  This was wrong and 
obscures a whole class of error message, so I've changed it so that 
xen_unified.c will only try to accept an absolute pathname (eg. 


Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-no-support-for-hypervisor-20070620.patch
Type: text/x-patch
Size: 19420 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070620/446982c3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070620/446982c3/attachment-0003.bin>

More information about the libvir-list mailing list