Re: [PATCH] Add virConnectGetCapabilities call to return the capabilities of the driver / hypervisor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. 

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]