]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Internal branch sync. Included in this change:
authorVMware, Inc <>
Fri, 18 Sep 2009 21:39:23 +0000 (14:39 -0700)
committerMarcelo Vanzin <mvanzin@mvanzin-dev1.eng.vmware.com>
Sat, 19 Sep 2009 01:49:11 +0000 (18:49 -0700)
. don't translate non-system errors in VIX handler.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/system.h
open-vm-tools/lib/include/vixOpenSource.h
open-vm-tools/lib/vixTools/vixTools.c

index ba104f6c6f9e918c31e143f9262b0399012a8b0a..8049af0a0864a7a155b0c278f421da56bdeac138 100644 (file)
@@ -64,6 +64,7 @@ typedef struct MonListNode {
    BOOL isPrimary;
    DWORD bpp;
    BOOL isActive;
+   uint32 srcId;
    DblLnkLst_Links l;
 } MonListNode;
 
index 8ea2646edb8ef359767a4b5b0cecedc1c99c9ab7..aeeebdd285e14360a9aff76600fd22519b4fcc0d 100644 (file)
@@ -94,8 +94,10 @@ VixError Vix_TranslateCOMError(HRESULT comError);
  * These error codes are in addition to those.
  */
 enum {
-   VIX_E_OP_NOT_SUPPORTED_ON_NON_VMWARE_VM         = 3038
+   VIX_E_OP_NOT_SUPPORTED_ON_NON_VMWARE_VM         = 3038,
 
+   /* Reg Errors*/
+   VIX_E_REG_INCORRECT_VALUE_TYPE                  = 25000
    /* WARNING. Do not exceed 2**16 */
 };
 
index 9b8827c79f9660e4fa9191c24730f713b68b90ce..18fa9e32a9c1e700e5216bcfe844eae63712563b 100644 (file)
@@ -1216,7 +1216,14 @@ VixToolsReadRegistry(VixCommandRequestHeader *requestMsg,  // IN
    if (VIX_PROPERTYTYPE_INTEGER == registryRequest->expectedRegistryKeyType) {
       errResult = Registry_ReadInteger(registryPathName, &valueInt);
       if (ERROR_SUCCESS != errResult) {
-         err = Vix_TranslateSystemError(errResult);
+         /*
+          * E_UNEXPECTED isn't a system err. Don't use Vix_TranslateSystemError
+          */
+         if (E_UNEXPECTED == errResult) {
+            err = VIX_E_REG_INCORRECT_VALUE_TYPE;
+         } else {
+            err = Vix_TranslateSystemError(errResult);
+         }
          goto abort;
       }
 
@@ -1228,7 +1235,14 @@ VixToolsReadRegistry(VixCommandRequestHeader *requestMsg,  // IN
    } else if (VIX_PROPERTYTYPE_STRING == registryRequest->expectedRegistryKeyType) {
       errResult = Registry_ReadString(registryPathName, &valueStr);
       if (ERROR_SUCCESS != errResult) {
-         err = Vix_TranslateSystemError(errResult);
+         /*
+          * E_UNEXPECTED isn't a system err. Don't use Vix_TranslateSystemError
+          */
+         if (E_UNEXPECTED == errResult) {
+            err = VIX_E_REG_INCORRECT_VALUE_TYPE;
+         } else {
+            err = Vix_TranslateSystemError(errResult);
+         }
          goto abort;
       }
    } else {