On 11/17/2010 03:32 PM, Matthias Bolte wrote:
> +
> +#include <config.h>
> +
> +#include <sys/utsname.h>
So this driver is going to be Linux-only. Any intention to make it
work on Windows too?
gnulib provides <sys/utsname.h> for mingw....
> + uname(&utsname);
> +
> + if ((caps = virCapabilitiesNew(utsname.machine, 0, 0)) == NULL)
> + goto no_memory;
> +
> + if (nodeCapsInitNUMA(caps) < 0)
> + goto no_memory;
> +
> + virCapabilitiesSetMacPrefix(caps, (unsigned char[]) {
> + 0x52, 0x54, 0x00});
> +
> + if ((guest = virCapabilitiesAddGuest(caps,
> + "hvm",
> + utsname.machine,
> + sizeof(int) == 4 ? 32 : 8,
I don't think that you can use utsname.machine to determine the
supported architectures, as you can install and run a 32bit VMware
Player/Workstation on a 64bit system and only use 32bit guests. Or am
I wrong here?
However, you are entirely correct that using uname() as the deciding
factor is wrong. The autoconf rule is feature-tests, not version tests
(and uname() is the most hard-coded of version test out there).
Also fclose(fp) is missing and we are currently deprecating fclose
in
libvirt, use the VIR_FCLOSE macro instead.
I still need to get around to patching cfg.mk to automate 'make
syntax-check' in enforcing that.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org