[Libvir] [PATCH] Add virConnectGetHostname and virConnectGetURI calls, virsh commands, and some related fixes

Richard W.M. Jones rjones at redhat.com
Tue Jun 26 11:00:01 UTC 2007


Daniel Veillard wrote:
>> I haven't updated the Python bindings, but will do so next.
> 
>   it's probable that those 2 calles will be handled automatically
> since the arg is a known structure and the return value is a string.
> It's a matter of rebuilding the API xml with the new headers once applied
> and let the generator do its job.

I'll check.  I'm really ill today ...

> Can we avoid using asprintf, especially in new code, I don't think the
> convenience wins over the portability problem, thanks
> Or it's just a conveninent way to indicate where a new path creation 
> routine should be added...

Even better, can we add asprintf to the code and compile it into libvirt 
if configure.in detects that it is absent from libc?  Asprintf is really 
useful...

>> --- src/xen_unified.h	30 Apr 2007 16:57:15 -0000	1.3
>> +++ src/xen_unified.h	26 Jun 2007 09:51:05 -0000
>> @@ -50,6 +50,9 @@ struct _xenUnifiedPrivate {
>>       * xen_unified.c.
>>       */
>>      int opened[XEN_UNIFIED_NR_DRIVERS];
>> +
>> +    /* Canonical URI. */
>> +    char *name;
>>  };
> 
>   is that the canonical URI or the FQDN ? Maybe the field need to be renamed
> (and possibly the comment).

It's the canonical URI.  For example NULL || "xen" -> "xen:///":

# src/virsh -c xen uri
xen:///

Rich.

-- 
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: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070626/56117d77/attachment-0001.bin>


More information about the libvir-list mailing list