mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-30 11:25:47 +00:00
vmware: os x support is broken
https://bugzilla.redhat.com/show_bug.cgi?id=1036248 Incorrect usage of virAsprintf. vmware-vmx reports version information to stderr, at least for OS X 10.9.1. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
344e1f5130
commit
d69415d4bc
@ -1,6 +1,6 @@
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2011-2012 Red Hat, Inc.
|
* Copyright (C) 2011-2014 Red Hat, Inc.
|
||||||
* Copyright 2010, diateam (www.diateam.net)
|
* Copyright 2010, diateam (www.diateam.net)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -271,28 +271,29 @@ vmwareExtractVersion(struct vmware_driver *driver)
|
|||||||
|
|
||||||
switch (driver->type) {
|
switch (driver->type) {
|
||||||
case VMWARE_DRIVER_PLAYER:
|
case VMWARE_DRIVER_PLAYER:
|
||||||
if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmplayer"))
|
if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmplayer") < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VMWARE_DRIVER_WORKSTATION:
|
case VMWARE_DRIVER_WORKSTATION:
|
||||||
if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware"))
|
if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware") < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VMWARE_DRIVER_FUSION:
|
case VMWARE_DRIVER_FUSION:
|
||||||
if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware-vmx"))
|
if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware-vmx") < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("invalid driver type for version detection"));
|
_("invalid driver type for version detection"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = virCommandNewArgList(bin, "-v", NULL);
|
cmd = virCommandNewArgList(bin, "-v", NULL);
|
||||||
virCommandSetOutputBuffer(cmd, &outbuf);
|
virCommandSetOutputBuffer(cmd, &outbuf);
|
||||||
|
virCommandSetErrorBuffer(cmd, &outbuf);
|
||||||
|
|
||||||
if (virCommandRun(cmd, NULL) < 0)
|
if (virCommandRun(cmd, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user