[Libvir] [PATCH] Add virConnectGetCapabilities call to return the capabilities of the driver / hypervisor
Richard W.M. Jones
rjones at redhat.com
Fri Mar 9 16:31:55 UTC 2007
Daniel P. Berrange wrote:
> On Fri, Mar 09, 2007 at 03:22:08PM +0000, Richard W.M. Jones wrote:
>> This patch:
>>
>> * Adds virConnectGetCapabilities which returns an XML description of the
>> capabilities of the driver or hypervisor under this connection (see
>> below for more about the XML format).
>
> + /* 32 or 64 bit host? */
> + const char *bits = strstr (utsname.machine, "64") != NULL ? "64" : "32";
>
> Will this work safely on all OS / arches ? I guess ia64, x86_64, sparc64
> and ppc64 all give the right results.
>
> One alternative would be using 'sizeof(void*) * 8', although if someone used
> a 32-bit set of libs on a 64-bit machine this would give wrong answer.
The trouble is you need to run that sizeof code inside the qemu virtual
machine :-)
Rich.
--
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)
-------------- 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/20070309/578fc30c/attachment-0001.bin>
More information about the libvir-list
mailing list