Changeset 32266 in vbox for trunk/src/VBox
- Timestamp:
- Sep 7, 2010 9:23:05 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 10 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r32183 r32266 20 20 21 21 22 if1of ($(KBUILD_TARGET), freebsd $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris )22 if1of ($(KBUILD_TARGET), freebsd $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris win) 23 23 # 24 24 # VBoxGuest - The Guest Additions Driver. … … 31 31 VBoxGuest_NOINST.linux = true 32 32 VBoxGuest_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB 33 VBoxGuest_DEFS.win = VBOX_REBOOT_ON_UNINSTALL VBOX_SVN_REV=$(VBOX_SVN_REV) # VBOX_WITH_VRDP_SESSION_HANDLING 34 ifdef VBOX_SIGN_ADDITIONS # (See the parent makefile.) 35 VBoxGuest_NOINST = true 36 endif 37 ifdef VBOX_WITH_GUEST_BUGCHECK_DETECTION 38 VBoxGuest_DEFS.win += VBOX_WITH_GUEST_BUGCHECK_DETECTION 39 endif 33 40 VBoxGuest_DEFS.solaris = VBOX_SVN_REV=$(VBOX_SVN_REV) 34 41 VBoxGuest_DEPS.solaris += $(VBOX_SVN_REV_KMK) … … 40 47 VBoxGuest_INCS.linux = ../../../Runtime/r0drv/linux 41 48 ifneq ($(KBUILD_TARGET),os2) 42 ifn1of ($(KBUILD_TARGET), linux freebsd solaris) 43 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).cpp 44 else 45 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).c 46 endif 47 VBoxGuest_SOURCES += \ 48 VBoxGuest.cpp \ 49 VBoxGuest2.cpp 50 VBoxGuest2.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV) 51 VBoxGuest_LIBS = \ 49 ifeq ($(KBUILD_TARGET),win) 50 VBoxGuest_SOURCES = \ 51 VBoxGuest-$(KBUILD_TARGET).cpp \ 52 VBoxGuest-$(KBUILD_TARGET)-pnp.cpp \ 53 win/VBoxGuest.rc 54 VBoxGuest_LDFLAGS.x86 = -Entry:DriverEntry@8 55 VBoxGuest_LDFLAGS.amd64 = -Entry:DriverEntry 56 VBoxGuest_LIBS = \ 57 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \ 58 $(PATH_SDK_W2K3DDK_LIB)/hal.lib 59 ifdef VBOX_WITH_GUEST_BUGCHECK_DETECTION 60 VBoxGuest_LIBS += \ 61 $(PATH_SDK_WINDDKWLH_LIB)/aux_klib.lib \ 62 $(PATH_SDK_WINDDKWLH_LIB)/ksecdd.lib \ 63 $(PATH_SDK_WINDDKWLH_LIB)/BufferOverflowK.lib 64 VBoxGuest.cpp_SDKS = WINDDKWLH 65 endif # VBOX_WITH_GUEST_BUGCHECK_DETECTION 66 67 #SYSMODS.x86 += VBoxGuestNT # Not yet buildable! 68 VBoxGuestNT_EXTENDS = VBoxGuest 69 VBoxGuestNT_NOINST = $(NO_SUCH_VARIABLE) 70 VBoxGuestNT_DEFS = $(VBoxGuest_DEFS) TARGET_NT4 71 VBoxGuestNT_SOURCES = \ 72 VBoxGuest-$(KBUILD_TARGET).cpp \ 73 VBoxGuest-$(KBUILD_TARGET)-legacy.cpp \ 74 win/VBoxGuest.rc 75 VBoxGuestNT_LIBS = \ 76 $(PATH_SDK_W2K3DDK_LIB)/exsup.lib \ 77 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \ 78 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \ 79 $(VBOX_LIB_VBGL_R0BASE) \ 80 $(VBOX_LIB_IPRT_GUEST_R0_NT4) 81 else # not Windows 82 ifn1of ($(KBUILD_TARGET), linux freebsd solaris) 83 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).cpp 84 else 85 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).c 86 endif 87 endif # win 88 VBoxGuest_SOURCES += \ 89 VBoxGuest.cpp \ 90 VBoxGuest2.cpp 91 VBoxGuest2.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV) 92 VBoxGuest.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV) 93 VBoxGuest_LIBS += \ 52 94 $(VBOX_LIB_VBGL_R0BASE) \ 53 95 $(VBOX_LIB_IPRT_GUEST_R0) … … 56 98 $(PATH_INS)/gen-sys-hdrs/bus_if.h \ 57 99 $(PATH_INS)/gen-sys-hdrs/device_if.h 58 59 100 else # OS/2: 60 101 # The library order is crucial, so a bit of trickery is necessary. … … 163 204 endif # FreeBSD 164 205 206 ifeq ($(KBUILD_TARGET),win) 207 # 208 # VBoxGuestInst - The installer. 209 # 210 #PROGRAMS += VBoxGuestInst 211 VBoxGuestInst_TEMPLATE= VBOXGUESTR3EXE 212 VBoxGuestInst_SOURCES = win/VBoxGuestInst.cpp 213 endif 214 165 215 include $(KBUILD_PATH)/subfooter.kmk 166 216 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf
-
Property svn:eol-style
changed from
LF
tonative
-
Property svn:keywords
set to
Author Date Id Revision
-
Property svn:eol-style
changed from
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r31752 r32266 40 40 #if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) 41 41 # include "revision-generated.h" 42 #endif 43 #if defined(RT_OS_WINDOWS) 44 RT_C_DECLS_BEGIN 45 # include <ntddk.h> 46 RT_C_DECLS_END 42 47 #endif 43 48 … … 1573 1578 1574 1579 1580 /** 1581 * Helper to (re-)init the HGCM communication. 1582 * 1583 * @param pDevExt Device extension 1584 */ 1585 int VBoxGuestHGCMInitCommunication(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType) 1586 { 1587 int rc = VBoxGuestReportGuestInfo(enmOSType); 1588 if (RT_SUCCESS(rc)) 1589 { 1590 rc = VBoxGuestReportDriverStatus(true /* Driver is active */); 1591 if (RT_FAILURE(rc)) 1592 Log(("VBoxGuest::VBoxGuestInitHGCMCommunication: could not report guest driver status, vrc = %d\n", rc)); 1593 } 1594 else 1595 Log(("VBoxGuest::VBoxGuestInitHGCMCommunication: could not report guest information to host, vrc = %d\n", rc)); 1596 Log(("VBoxGuest::VBoxGuestInitHGCMCommunication: returned with vrc = %d\n", rc)); 1597 return rc; 1598 } 1599 1600 1575 1601 static int VBoxGuestCommonIOCtl_HGCMConnect(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, 1576 1602 VBoxGuestHGCMConnectInfo *pInfo, size_t *pcbDataReturned) … … 1949 1975 if (pDevExt->MemBalloon.pOwner == pSession) 1950 1976 { 1951 rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr, pInfo->fInflate); 1977 rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, 1978 pInfo->u64ChunkAddr, 1979 pInfo->fInflate > 0 ? true : false); 1952 1980 if (pcbDataReturned) 1953 1981 *pcbDataReturned = 0; … … 1962 1990 return rc; 1963 1991 } 1992 1993 1994 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING 1995 /** 1996 * Enables the VRDP session and saves its session ID. 1997 * 1998 * @returns VBox status code. 1999 * 2000 * @param pDevExt The device extention. 2001 * @param pSession The session. 2002 */ 2003 static int VBoxGuestCommonIOCtl_EnableVRDPSession(VBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession) 2004 { 2005 /* Nothing to do here right now, since this only is supported on Windows at the moment. */ 2006 return VINF_SUCCESS; 2007 } 2008 2009 2010 /** 2011 * Disables the VRDP session. 2012 * 2013 * @returns VBox status code. 2014 * 2015 * @param pDevExt The device extention. 2016 * @param pSession The session. 2017 */ 2018 static int VBoxGuestCommonIOCtl_DisableVRDPSession(VBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession) 2019 { 2020 /* Nothing to do here right now, since this only is supported on Windows at the moment. */ 2021 return VINF_SUCCESS; 2022 } 2023 #endif /* VBOX_WITH_VRDP_SESSION_HANDLING */ 1964 2024 1965 2025 … … 2155 2215 break; 2156 2216 2217 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING 2218 case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION: 2219 rc = VBoxGuestCommonIOCtl_EnableVRDPSession(pDevExt, pSession); 2220 break; 2221 2222 case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION: 2223 rc = VBoxGuestCommonIOCtl_DisableVRDPSession(pDevExt, pSession); 2224 break; 2225 #endif /* VBOX_WITH_VRDP_SESSION_HANDLING */ 2226 2157 2227 default: 2158 2228 { -
Property svn:keywords
changed from
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r28800 r32266 5 5 6 6 /* 7 * Copyright (C) 20 07Oracle Corporation7 * Copyright (C) 2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 143 143 * For implementing the VBOXGUEST_IOCTL_CLIPBOARD_CONNECT interface. */ 144 144 uint32_t u32ClipboardClientId; 145 145 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING 146 BOOL fVRDPEnabled; 147 #endif 146 148 /** Memory balloon information for RTR0MemObjAllocPhysNC(). */ 147 149 VBOXGUESTMEMBALLOON MemBalloon; 150 /** Align the next bit on a 64-byte boundary and make sure it starts at the same 151 * offset in both 64-bit and 32-bit builds. 152 * 153 * @remarks The aligments of the members that are larger than 48 bytes should be 154 * 64-byte for cache line reasons. structs containing small amounts of 155 * data could be lumped together at the end with a < 64 byte padding 156 * following it (to grow into and align the struct size). 157 */ 158 uint8_t abAlignment1[HC_ARCH_BITS == 32 ? 24 : 4]; 159 160 /** Windows part. */ 161 union 162 { 163 #ifdef ___VBoxGuest_win_h 164 VBOXGUESTDEVEXTWIN s; 165 #endif 166 uint8_t padding[256]; /* Multiple of 64; fix me! */ 167 } win; 148 168 149 169 } VBOXGUESTDEVEXT; … … 201 221 void VBoxGuestCloseSession(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession); 202 222 223 #ifdef VBOX_WITH_HGCM 224 int VBoxGuestHGCMInitCommunication(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType); 225 #endif 226 203 227 int VBoxGuestCommonIOCtlFast(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession); 204 228 int VBoxGuestCommonIOCtl(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, -
Property svn:keywords
changed from
Note:
See TracChangeset
for help on using the changeset viewer.