[libvirt] VMware Workstation/Player support

Eric Blake eblake at redhat.com
Wed Nov 17 22:42:14 UTC 2010


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 at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101117/95d0cf27/attachment-0001.sig>


More information about the libvir-list mailing list