From: VMware, Inc <> Date: Tue, 26 Apr 2011 20:43:13 +0000 (-0700) Subject: Change error code of VMCIDoorbell_Create X-Git-Tag: 2011.04.25-402641~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=615ef17f8dd0b0e80a619257780e2b9f97a9fa4e;p=thirdparty%2Fopen-vm-tools.git Change error code of VMCIDoorbell_Create Before the merging of the two VMCI drivers, the guest version would return VMCI_ERROR_ALREADY_EXISTS when creating a doorbell with a handle that already exists. The host code actually returned VMCI_ERROR_DUPLICATE_ENTRY, which is the hash table error code for duplicate entries. After the merge, we always return VMCI_ERROR_DUPLICATE_ENTRY, but VMCI_ERROR_ALREADY_EXISTS is slightly more descriptive so return that instead. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c b/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c index abaea624e..3f6d47c9f 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c @@ -644,6 +644,9 @@ VMCIDoorbell_Create(VMCIHandle *handle, // IN/OUT if (result != VMCI_SUCCESS) { VMCI_WARNING((LGPFX"Failed to add new resource (handle=0x%x:0x%x).\n", newHandle.context, newHandle.resource)); + if (result == VMCI_ERROR_DUPLICATE_ENTRY) { + result = VMCI_ERROR_ALREADY_EXISTS; + } goto destroy; } diff --git a/open-vm-tools/modules/linux/vmci/linux/vmci_version.h b/open-vm-tools/modules/linux/vmci/linux/vmci_version.h index c47022ba3..27ed5b328 100644 --- a/open-vm-tools/modules/linux/vmci/linux/vmci_version.h +++ b/open-vm-tools/modules/linux/vmci/linux/vmci_version.h @@ -25,8 +25,8 @@ #ifndef _VMCI_VERSION_H_ #define _VMCI_VERSION_H_ -#define VMCI_DRIVER_VERSION 9.1.14.0 -#define VMCI_DRIVER_VERSION_COMMAS 9,1,14,0 -#define VMCI_DRIVER_VERSION_STRING "9.1.14.0" +#define VMCI_DRIVER_VERSION 9.1.15.0 +#define VMCI_DRIVER_VERSION_COMMAS 9,1,15,0 +#define VMCI_DRIVER_VERSION_STRING "9.1.15.0" #endif /* _VMCI_VERSION_H_ */