]> xenbits.xensource.com Git - libvirt.git/commitdiff
vmware: set the driver version
authorJean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>
Tue, 8 Apr 2014 16:01:32 +0000 (18:01 +0200)
committerEric Blake <eblake@redhat.com>
Tue, 8 Apr 2014 17:16:33 +0000 (11:16 -0600)
Since commit 7457cbe8 the vmware driver version isn't set anymore.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/vmware/vmware_conf.c
src/vmware/vmware_conf.h

index 6aba4f8657843ef9ed86bb433863ff81fe3203f6..5ff6396870bd3f46396a12710acc7cbb27429e2c 100644 (file)
@@ -259,7 +259,6 @@ vmwareParseVersionStr(int type, const char *verbuf, unsigned long *version)
 int
 vmwareExtractVersion(struct vmware_driver *driver)
 {
-    unsigned long version = 0;
     int ret = -1;
     virCommandPtr cmd = NULL;
     char * outbuf = NULL;
@@ -298,7 +297,7 @@ vmwareExtractVersion(struct vmware_driver *driver)
     if (virCommandRun(cmd, NULL) < 0)
         goto cleanup;
 
-    if (vmwareParseVersionStr(driver->type, outbuf, &version) < 0)
+    if (vmwareParseVersionStr(driver->type, outbuf, &driver->version) < 0)
         goto cleanup;
 
     ret = 0;
index c99610d4caa4228135ed100ef71bdc0ce79ae783..1f3c41aa83d1df71232adcfa263398d3ba356850 100644 (file)
@@ -48,7 +48,7 @@ struct vmware_driver {
     virDomainXMLOptionPtr xmlopt;
 
     virDomainObjListPtr domains;
-    int version;
+    unsigned long version;
     int type;
     char *vmrun;
 };