summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/common/VBoxGuestLib
diff options
context:
space:
mode:
authorMichael Meskes <meskes@debian.org>2011-08-24 13:18:05 +0200
committerMichael Meskes <meskes@debian.org>2011-08-24 13:18:05 +0200
commitf8fd93b0b6b13ba94584bb61c1efd1a761f438c9 (patch)
tree7bf52d89d95d605721fb5515d467036e2dbc7b96 /src/VBox/Additions/common/VBoxGuestLib
parentcba113ca2826bc4814be2f69a7704c865a37d4ea (diff)
downloadvirtualbox-f8fd93b0b6b13ba94584bb61c1efd1a761f438c9.tar.gz
Imported Upstream version 4.1.2-dfsgupstream/4.1.2-dfsg
Diffstat (limited to 'src/VBox/Additions/common/VBoxGuestLib')
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h10
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp8
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp134
3 files changed, 17 insertions, 135 deletions
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h b/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
index 0c511956f..2c077c52f 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
@@ -1,4 +1,4 @@
-/* $Revision: 36318 $ */
+/* $Revision: 38407 $ */
/** @file
* VBoxGuestLibR0 - Internal header.
*/
@@ -125,8 +125,16 @@ extern VBGLDATA g_vbgldata;
*
* ASSUMES that vbglR0Enter has been called already.
*/
+#if defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)
+/* Disable the PageList feature for 64 bit Windows, because shared folders do not work,
+ * if this is enabled. This should be reenabled again when the problem is fixed.
+ */
+#define VBGLR0_CAN_USE_PHYS_PAGE_LIST() \
+ ( 0 )
+#else
#define VBGLR0_CAN_USE_PHYS_PAGE_LIST() \
( !!(g_vbgldata.hostVersion.features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST) )
+#endif
int vbglR0Enter (void);
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
index dffa3ca86..e71425377 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxGuestR3Lib.cpp 37596 2011-06-22 19:30:06Z vboxsync $ */
+/* $Id: VBoxGuestR3Lib.cpp 38317 2011-08-04 15:27:37Z vboxsync $ */
/** @file
* VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions, Core.
*/
@@ -343,7 +343,11 @@ int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData)
* error instead of an errno.h one. Alternatively, extend/redefine the
* header with an error code return field (much better alternative
* actually). */
+#ifdef VBOX_VBGLR3_XFREE86
+ int rc = xf86ioctl(g_File, iFunction, &Hdr);
+#else
int rc = ioctl(RTFileToNative(g_File), iFunction, &Hdr);
+#endif
if (rc == -1)
{
rc = errno;
@@ -355,6 +359,8 @@ int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData)
# ifdef VBOX_VBGLR3_XFREE86
int rc = xf86ioctl((int)g_File, iFunction, pvData);
# else
+ if (g_File == NIL_RTFILE)
+ return VERR_INVALID_HANDLE;
int rc = ioctl(RTFileToNative(g_File), iFunction, pvData);
# endif
if (RT_LIKELY(rc == 0))
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
index e9ee37bbd..0964c3557 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxGuestR3LibGuestCtrl.cpp 37375 2011-06-08 10:51:26Z vboxsync $ */
+/* $Id: VBoxGuestR3LibGuestCtrl.cpp 38133 2011-07-25 09:02:17Z vboxsync $ */
/** @file
* VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions, guest control.
*/
@@ -157,138 +157,6 @@ VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(uint32_t u32ClientId)
/**
- * Closes a formerly opened guest directory.
- *
- * @return IPRT status code.
- ** @todo Docs!
- */
-VBGLR3DECL(int) VbglR3GuestCtrlGetCmdDirClose(uint32_t u32ClientId, uint32_t uNumParms,
- uint32_t *puContext, uint32_t *puHandle)
-{
- AssertPtrReturn(puContext, VERR_INVALID_PARAMETER);
- AssertPtrReturn(puHandle, VERR_INVALID_PARAMETER);
-
- VBoxGuestCtrlHGCMMsgDirClose Msg;
-
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = u32ClientId;
- Msg.hdr.u32Function = GUEST_GET_HOST_MSG;
- Msg.hdr.cParms = uNumParms;
-
- VbglHGCMParmUInt32Set(&Msg.context, 0);
- VbglHGCMParmUInt32Set(&Msg.handle, 0);
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
- {
- int rc2 = Msg.hdr.result;
- if (RT_FAILURE(rc2))
- {
- rc = rc2;
- }
- else
- {
- Msg.context.GetUInt32(puContext);
- Msg.handle.GetUInt32(puHandle);
- }
- }
- return rc;
-}
-
-
-/**
- * Opens a guest directory for reading.
- *
- * @return IPRT status code.
- ** @todo Docs!
- */
-VBGLR3DECL(int) VbglR3GuestCtrlGetCmdDirOpen(uint32_t u32ClientId, uint32_t uNumParms,
- uint32_t *puContext,
- char *pszDir, uint32_t cbDir,
- char *pszFilter, uint32_t cbFilter,
- uint32_t *puFlags,
- char *pszUser, uint32_t cbUser,
- char *pszPassword, uint32_t cbPassword)
-{
- AssertPtrReturn(pszDir, VERR_INVALID_PARAMETER);
- AssertPtrReturn(pszFilter, VERR_INVALID_PARAMETER);
- AssertPtrReturn(puFlags, VERR_INVALID_PARAMETER);
- AssertPtrReturn(pszUser, VERR_INVALID_PARAMETER);
- AssertPtrReturn(pszPassword, VERR_INVALID_PARAMETER);
-
- VBoxGuestCtrlHGCMMsgDirOpen Msg;
-
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = u32ClientId;
- Msg.hdr.u32Function = GUEST_GET_HOST_MSG;
- Msg.hdr.cParms = uNumParms;
-
- VbglHGCMParmUInt32Set(&Msg.context, 0);
- VbglHGCMParmPtrSet(&Msg.directory, pszDir, cbDir);
- VbglHGCMParmPtrSet(&Msg.filter, pszFilter, cbFilter);
- VbglHGCMParmUInt32Set(&Msg.flags, 0);
- VbglHGCMParmPtrSet(&Msg.username, pszUser, cbUser);
- VbglHGCMParmPtrSet(&Msg.password, pszPassword, cbPassword);
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
- {
- int rc2 = Msg.hdr.result;
- if (RT_FAILURE(rc2))
- {
- rc = rc2;
- }
- else
- {
- Msg.context.GetUInt32(puContext);
- Msg.flags.GetUInt32(puFlags);
- }
- }
- return rc;
-}
-
-
-/**
- * Opens a guest directory for reading.
- *
- * @return IPRT status code.
- ** @todo Docs!
- */
-VBGLR3DECL(int) VbglR3GuestCtrlGetCmdDirRead(uint32_t u32ClientId, uint32_t uNumParms,
- uint32_t *puContext, uint32_t *puHandle)
-{
- AssertPtrReturn(puContext, VERR_INVALID_PARAMETER);
- AssertPtrReturn(puHandle, VERR_INVALID_PARAMETER);
-
- VBoxGuestCtrlHGCMMsgDirRead Msg;
-
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = u32ClientId;
- Msg.hdr.u32Function = GUEST_GET_HOST_MSG;
- Msg.hdr.cParms = uNumParms;
-
- VbglHGCMParmUInt32Set(&Msg.context, 0);
- VbglHGCMParmUInt32Set(&Msg.handle, 0);
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
- {
- int rc2 = Msg.hdr.result;
- if (RT_FAILURE(rc2))
- {
- rc = rc2;
- }
- else
- {
- Msg.context.GetUInt32(puContext);
- Msg.handle.GetUInt32(puHandle);
- }
- }
- return rc;
-}
-
-
-/**
* Allocates and gets host data, based on the message id.
*
* This will block until data becomes available.