[libvirt] [PATCH] vmware: os x support is broken

Eric Blake eblake at redhat.com
Fri Jan 3 18:14:25 UTC 2014


On 01/03/2014 10:57 AM, Denis Kondratenko wrote:
> Incorrect usage of virAsprintf and vmware-vmx reports to stderr.
> 
> --- https://bugzilla.redhat.com/show_bug.cgi?id=1036248

Oh my - the triple --- leadin confused 'git am':

Applying: vmware: os x support is broken
fatal: patch fragment without header at line 42: @@ -271,17 +271,17 @@
vmwareExtractVersion(struct vmware_driver
*driver)</div><div> </div><div>     switch (driver->type)
{</div><div>         case VMWARE_DRIVER_PLAYER:</div><div>-          
 if (virAsprintf(&bin, "%s/%s", vmwarePath,
"vmplayer"))</div>
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 vmware: os x support is broken

so I had to apply it by hand.


>          case VMWARE_DRIVER_PLAYER:
> -            if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmplayer"))
> +            if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmplayer") < 0)

Definitely correct!


>      cmd = virCommandNewArgList(bin, "-v", NULL);
>      virCommandSetOutputBuffer(cmd, &outbuf);
> +
> +    // OS X 10.9.1 and some earlier ver: vmware-vmx reports ver to stderr

We prefer to avoid C99 comments, and the code is self-explanatory enough
that it was easier to just drop the comment (and put it in the commit
message instead).

ACK and pushed.  Congrats on your first libvirt patch!

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list