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)
Description: S/MIME Cryptographic Signature