Created
December 1, 2013 00:55
-
-
Save backerman/7727295 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c | |
index 027e245..a633744 100644 | |
--- a/src/vmware/vmware_conf.c | |
+++ b/src/vmware/vmware_conf.c | |
@@ -271,17 +271,17 @@ vmwareExtractVersion(struct vmware_driver *driver) | |
switch (driver->type) { | |
case VMWARE_DRIVER_PLAYER: | |
- if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmplayer")) | |
+ if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmplayer") < 0) | |
goto cleanup; | |
break; | |
case VMWARE_DRIVER_WORKSTATION: | |
- if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware")) | |
+ if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware") < 0) | |
goto cleanup; | |
break; | |
case VMWARE_DRIVER_FUSION: | |
- if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware-vmx")) | |
+ if (virAsprintf(&bin, "%s/%s", vmwarePath, "vmware-vmx") < 0) | |
goto cleanup; | |
break; | |
@@ -292,7 +292,9 @@ vmwareExtractVersion(struct vmware_driver *driver) | |
} | |
cmd = virCommandNewArgList(bin, "-v", NULL); | |
+ /* The version request command will report to either stdout or stderr. */ | |
virCommandSetOutputBuffer(cmd, &outbuf); | |
+ virCommandSetErrorBuffer(cmd, &outbuf); | |
if (virCommandRun(cmd, NULL) < 0) | |
goto cleanup; | |
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c | |
index 48487f8..a32c5a7 100644 | |
--- a/src/vmx/vmx.c | |
+++ b/src/vmx/vmx.c | |
@@ -47,6 +47,7 @@ domain-xml <=> vmx | |
virtualHW.version = "7" # essential for ESX 4.0 | |
virtualHW.version = "8" # essential for ESX 5.0 | |
virtualHW.version = "9" # essential for ESX 5.1 | |
+ virtualHW.version = "10" # essential for ESX 5.5 | |
??? <=> guestOS = "<value>" # essential, FIXME: not representable | |
@@ -1309,10 +1310,11 @@ virVMXParseConfig(virVMXContext *ctx, | |
} | |
if (virtualHW_version != 4 && virtualHW_version != 7 && | |
- virtualHW_version != 8 && virtualHW_version != 9) { | |
+ virtualHW_version != 8 && virtualHW_version != 9 && | |
+ virtualHW_version != 10) { | |
virReportError(VIR_ERR_INTERNAL_ERROR, | |
_("Expecting VMX entry 'virtualHW.version' to be " | |
- "4, 7, 8 or 9 but found %lld"), | |
+ "4, 7, 8, 9 or 10 but found %lld"), | |
virtualHW_version); | |
goto cleanup; | |
} | |
@@ -2795,10 +2797,23 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port, | |
"but found '%s'"), network_endPoint_name, network_endPoint); | |
goto cleanup; | |
} | |
+ } else if (STRCASEEQ(fileType, "thinprint")) { | |
+ /* | |
+ * FIXME: There has to be a non-hacky way to map ThinPrint to | |
+ * libvirt's domain XML schema. This assuredly isn't it. | |
+ */ | |
+ (*def)->target.port = port; | |
+ (*def)->source.type = VIR_DOMAIN_CHR_TYPE_FILE; | |
+ (*def)->source.data.file.path = ctx->parseFileName("/tmp/DUMMY-thinprint", | |
+ ctx->opaque); | |
+ if ((*def)->source.data.file.path == NULL) { | |
+ goto cleanup; | |
+ } | |
+ fileName = NULL; | |
} else { | |
virReportError(VIR_ERR_INTERNAL_ERROR, | |
- _("Expecting VMX entry '%s' to be 'device', 'file' or 'pipe' " | |
- "or 'network' but found '%s'"), fileType_name, fileType); | |
+ _("Expecting VMX entry '%s' to be 'device', 'file', 'pipe', " | |
+ "'network', or 'thinprint' but found '%s'"), fileType_name, fileType); | |
goto cleanup; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment