From: VMware, Inc <> Date: Sat, 28 May 2011 19:04:37 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.05.27-420096~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8fdf985af2b49363ab4b7bc1636a37e1f96f3cd;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h b/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h index 51fc81da1..28106e294 100644 --- a/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h +++ b/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h @@ -51,8 +51,12 @@ /* VMCI Device Usage API. */ -Bool VMCI_DeviceGet(uint32 *apiVersion); -void VMCI_DeviceRelease(void); +typedef void (VMCI_DeviceShutdownFn)(void *deviceRegistration, + void *userData); + +Bool VMCI_DeviceGet(uint32 *apiVersion, VMCI_DeviceShutdownFn *deviceShutdownCB, + void *userData, void **deviceRegistration); +void VMCI_DeviceRelease(void *deviceRegistration); /* VMCI Datagram API. */ @@ -148,7 +152,7 @@ ssize_t VMCIQPair_PeekV(VMCIQPair *qpair, /* Typedefs for all of the above, used by the IOCTLs and the kernel library. */ -typedef void (VMCI_DeviceReleaseFct)(void); +typedef void (VMCI_DeviceReleaseFct)(void *); typedef int (VMCIDatagram_CreateHndFct)(VMCIId, uint32, VMCIDatagramRecvCB, void *, VMCIHandle *); typedef int (VMCIDatagram_CreateHndPrivFct)(VMCIId, uint32, VMCIPrivilegeFlags, diff --git a/open-vm-tools/modules/linux/shared/vmci_iocontrols.h b/open-vm-tools/modules/linux/shared/vmci_iocontrols.h index a3c13428c..57b907457 100644 --- a/open-vm-tools/modules/linux/shared/vmci_iocontrols.h +++ b/open-vm-tools/modules/linux/shared/vmci_iocontrols.h @@ -652,6 +652,9 @@ typedef struct VMCIDeviceGetInfoVer2 { typedef struct VMCIDeviceGetInfoHdr { /* Requested API version on input, supported version on output. */ uint32 apiVersion; + VMCI_DeviceShutdownFn *deviceShutdownCB; + void *userData; + void *deviceRegistration; } VMCIDeviceGetInfoHdr; /* Combination of all versions. */ diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c index 7c5dc18eb..0a6fac6b6 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c @@ -145,8 +145,15 @@ VMCI_HostCleanup(void) VMCI_EXPORT_SYMBOL(VMCI_DeviceGet) Bool -VMCI_DeviceGet(uint32 *apiVersion) +VMCI_DeviceGet(uint32 *apiVersion, // IN/OUT + VMCI_DeviceShutdownFn *deviceShutdownCB, // UNUSED + void *userData, // UNUSED + void **deviceRegistration) // OUT { + if (NULL != deviceRegistration) { + *deviceRegistration = NULL; + } + if (*apiVersion > VMCI_KERNEL_API_VERSION) { *apiVersion = VMCI_KERNEL_API_VERSION; return FALSE; @@ -178,7 +185,7 @@ VMCI_DeviceGet(uint32 *apiVersion) VMCI_EXPORT_SYMBOL(VMCI_DeviceRelease) void -VMCI_DeviceRelease(void) +VMCI_DeviceRelease(void *deviceRegistration) // UNUSED { } #endif // !_WIN32 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 6884259eb..3f11d069d 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.16.0 -#define VMCI_DRIVER_VERSION_COMMAS 9,1,16,0 -#define VMCI_DRIVER_VERSION_STRING "9.1.16.0" +#define VMCI_DRIVER_VERSION 9.1.17.0 +#define VMCI_DRIVER_VERSION_COMMAS 9,1,17,0 +#define VMCI_DRIVER_VERSION_STRING "9.1.17.0" #endif /* _VMCI_VERSION_H_ */ diff --git a/open-vm-tools/modules/linux/vsock/linux/af_vsock.c b/open-vm-tools/modules/linux/vsock/linux/af_vsock.c index 97d280531..bdb061d7f 100644 --- a/open-vm-tools/modules/linux/vsock/linux/af_vsock.c +++ b/open-vm-tools/modules/linux/vsock/linux/af_vsock.c @@ -3244,7 +3244,7 @@ VSockVmciRegisterWithVmci(void) * present. */ apiVersion = VMCI_KERNEL_API_VERSION_1; - vmciDevicePresent = VMCI_DeviceGet(&apiVersion); + vmciDevicePresent = VMCI_DeviceGet(&apiVersion, NULL, NULL, NULL); if (!vmciDevicePresent) { Warning("VMCI device not present.\n"); return -1; @@ -3322,7 +3322,7 @@ VSockVmciUnregisterWithVmci(void) qpResumedSubId = VMCI_INVALID_ID; } - VMCI_DeviceRelease(); + VMCI_DeviceRelease(NULL); vmciDevicePresent = FALSE; } diff --git a/open-vm-tools/modules/linux/vsock/linux/vsock_version.h b/open-vm-tools/modules/linux/vsock/linux/vsock_version.h index 72a3fba52..f3a0daa39 100644 --- a/open-vm-tools/modules/linux/vsock/linux/vsock_version.h +++ b/open-vm-tools/modules/linux/vsock/linux/vsock_version.h @@ -25,8 +25,8 @@ #ifndef _VSOCK_VERSION_H_ #define _VSOCK_VERSION_H_ -#define VSOCK_DRIVER_VERSION 9.1.0.0 -#define VSOCK_DRIVER_VERSION_COMMAS 9,1,0,0 -#define VSOCK_DRIVER_VERSION_STRING "9.1.0.0" +#define VSOCK_DRIVER_VERSION 9.1.1.0 +#define VSOCK_DRIVER_VERSION_COMMAS 9,1,1,0 +#define VSOCK_DRIVER_VERSION_STRING "9.1.1.0" #endif /* _VSOCK_VERSION_H_ */