- Timestamp:
- Jul 1, 2009 12:48:15 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r21072 r21118 62 62 #endif 63 63 64 #if defined(RT_OS_LINUX) && !defined(VBOX_WITH_COMMON_VBOXGUEST_ON_LINUX)64 #if defined(RT_OS_LINUX) /*&& !defined(VBOX_WITH_COMMON_VBOXGUEST_ON_LINUX)*/ 65 65 /** The support device name. */ 66 66 # define VBOXGUEST_DEVICE_NAME "/dev/vboxadd" -
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r21104 r21118 118 118 endif # FreeBSD 119 119 120 121 ifeq ($(KBUILD_TARGET),linux) 122 # 123 # Install the source files and script(s). 124 # 125 include $(PATH_SUB_CURRENT)/linux/files_vboxguest 126 # sources and stuff. 127 INSTALLS += vboxguest-src 128 vboxguest-src_INST = $(INST_ADDITIONS)src/vboxguest/ 129 vboxguest-src_MODE = a+r,u+w 130 vboxguest-src_SOURCES = $(subst ",,$(FILES_VBOXGUEST_NOBIN)) 131 vboxguest-src_SOURCES += $(if $(VBOX_OSE),,$(vboxguest-sh_0_OUTDIR)/dkms.conf) 132 vboxguest-src_CLEAN = $(vboxguest-sh_0_OUTDIR)/dkms.conf 133 134 $$(vboxguest-sh_0_OUTDIR)/dkms.conf: \ 135 $(PATH_SUB_CURRENT)/linux/dkms.conf \ 136 $(VBOX_VERSION_STAMP) \ 137 | $$(dir $$@) 138 $(call MSG_TOOL,Creating,,$@) 139 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $< 140 141 # scripts. 142 INSTALLS += vboxguest-sh 143 vboxguest-sh_INST = $(INST_ADDITIONS)src/vboxguest/ 144 vboxguest-sh_MODE = a+rx,u+w 145 vboxguest-sh_SOURCES = $(subst ",,$(FILES_VBOXGUEST_BIN)) 146 vboxguest-sh_SOURCES += $(if $(VBOX_OSE),,$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers) 147 vboxguest-sh_SOURCES += $(vboxguest-sh_0_OUTDIR)/build_in_tmp 148 vboxguest-sh_CLEAN = $(vboxguest-sh_0_OUTDIR)/build_in_tmp 149 150 $$(vboxguest-sh_0_OUTDIR)/build_in_tmp: \ 151 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \ 152 $(VBOX_VERSION_STAMP) \ 153 | $$(dir $$@) 154 $(call MSG_TOOL,Creating,,$@) 155 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxguest;g" --output $@ $< 156 $(QUIET)$(CHMOD) 0755 $@ 157 158 endif # Linux 159 120 160 endif # enabled 121 161 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
r21103 r21118 121 121 /** Our file node major id. 122 122 * Either set dynamically at run time or statically at compile time. */ 123 #ifdef CONFIG_VBOXGUEST_MAJOR 124 static unsigned int g_iModuleMajor = CONFIG_VBOXGUEST_MAJOR; 125 #else 126 static unsigned int g_iModuleMajor = 0; 127 #endif 123 128 #ifdef CONFIG_VBOXADD_MAJOR 124 static unsigned int g_iModuleMajor = CONFIG_VBOXADD_MAJOR; 125 #else 126 static unsigned int g_iModuleMajor = 0; 129 # error "CONFIG_VBOXADD_MAJOR -> CONFIG_VBOXGUEST_MAJOR" 127 130 #endif 128 131 … … 292 295 * Clean up the usage of the PCI device. 293 296 */ 294 static void __exitvboxguestLinuxTermPci(void)297 static void vboxguestLinuxTermPci(void) 295 298 { 296 299 struct pci_dev *pPciDev = g_pPciDev; … … 363 366 * Deregisters the ISR. 364 367 */ 365 static void __exitvboxguestLinuxTermISR(void)368 static void vboxguestLinuxTermISR(void) 366 369 { 367 370 free_irq(g_pPciDev->irq, &g_DevExt); … … 421 424 * Deregisters the device nodes. 422 425 */ 423 static void __exitvboxguestLinuxTermDeviceNodes(void)426 static void vboxguestLinuxTermDeviceNodes(void) 424 427 { 425 428 if (g_iModuleMajor > 0) -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r21102 r21118 164 164 pDevExt->f32PendingEvents = 0; 165 165 pDevExt->u32ClipboardClientId = 0; 166 pDevExt->u32MousePosChangedSeq = 0; 166 167 167 168 /* … … 170 171 if (pvMMIOBase) 171 172 { 173 VMMDevMemory *pVMMDev = (VMMDevMemory *)pvMMIOBase; 172 174 Assert(cbMMIO); 173 VMMDevMemory *pVMMDev = (VMMDevMemory *)pvMMIOBase;174 175 if ( pVMMDev->u32Version == VMMDEV_MEMORY_VERSION 175 176 && pVMMDev->u32Size >= 32 … … 258 259 while (pList->pHead) 259 260 { 260 PVBOXGUESTWAIT pWait = pList->pHead; 261 int rc2; 262 PVBOXGUESTWAIT pWait = pList->pHead; 261 263 pList->pHead = pWait->pNext; 262 264 263 265 pWait->pNext = NULL; 264 266 pWait->pPrev = NULL; 265 intrc2 = RTSemEventMultiDestroy(pWait->Event); AssertRC(rc2);267 rc2 = RTSemEventMultiDestroy(pWait->Event); AssertRC(rc2); 266 268 pWait->Event = NIL_RTSEMEVENTMULTI; 267 269 RTMemFree(pWait); … … 377 379 void VBoxGuestCloseSession(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession) 378 380 { 381 unsigned i; NOREF(i); 379 382 Log(("VBoxGuestCloseSession: pSession=%p proc=%RTproc (%d) r0proc=%p\n", 380 383 pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */ 381 384 382 385 #ifdef VBOX_WITH_HGCM 383 for ( unsignedi = 0; i < RT_ELEMENTS(pSession->aHGCMClientIds); i++)386 for (i = 0; i < RT_ELEMENTS(pSession->aHGCMClientIds); i++) 384 387 if (pSession->aHGCMClientIds[i]) 385 388 { … … 466 469 { 467 470 static unsigned s_cErrors = 0; 471 int rc; 468 472 469 473 pWait = (PVBOXGUESTWAIT)RTMemAlloc(sizeof(*pWait)); … … 475 479 } 476 480 477 intrc = RTSemEventMultiCreate(&pWait->Event);481 rc = RTSemEventMultiCreate(&pWait->Event); 478 482 if (RT_FAILURE(rc)) 479 483 { -
trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile
r21112 r21118 63 63 64 64 # override is required by the Debian guys 65 override MODULE = vbox add65 override MODULE = vboxguest 66 66 OBJS = \ 67 cmc.o \68 vboxmod.o \67 VBoxGuest-linux.o \ 68 VBoxGuest.o \ 69 69 GenericRequest.o \ 70 70 HGCMInternal.o \ … … 74 74 VMMDev.o \ 75 75 r0drv/alloc-r0drv.o \ 76 r0drv/initterm-r0drv.o \ 76 77 r0drv/memobj-r0drv.o \ 78 r0drv/mpnotification-r0drv.o \ 79 r0drv/powernotification-r0drv.o \ 77 80 r0drv/linux/alloc-r0drv-linux.o \ 78 81 r0drv/linux/assert-r0drv-linux.o \ 82 r0drv/linux/initterm-r0drv-linux.o \ 79 83 r0drv/linux/memobj-r0drv-linux.o \ 84 r0drv/linux/mp-r0drv-linux.o \ 85 r0drv/linux/mpnotification-r0drv-linux.o \ 80 86 r0drv/linux/process-r0drv-linux.o \ 81 87 r0drv/linux/semevent-r0drv-linux.o \ 88 r0drv/linux/semeventmulti-r0drv-linux.o \ 82 89 r0drv/linux/semfastmutex-r0drv-linux.o \ 90 r0drv/linux/thread-r0drv-linux.o \ 91 RTErrConvertFromErrno.o \ 83 92 RTErrConvertToErrno.o \ 84 93 divdi3.o \ … … 94 103 strprintf.o \ 95 104 strformat-vbox.o \ 96 105 RTAssertShouldPanic-generic.o 97 106 ifeq ($(BUILD_TARGET_ARCH),amd64) 98 107 OBJS += \ … … 163 172 164 173 # guess kernel version (24 or 26) 165 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes) 174 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes) 166 175 KERN_VERSION := 24 167 176 else … … 250 259 clean: 251 260 for f in . linux r0drv r0drv/linux; do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done 252 rm -rf .vbox add* .tmp_ver* vboxadd.* Module.symvers Modules.symvers modules.order261 rm -rf .vboxguest* .tmp_ver* vboxguest.* Module.symvers Modules.symvers modules.order -
trunk/src/VBox/Additions/common/VBoxGuest/linux/dkms.conf
r21112 r21118 1 BUILT_MODULE_NAME=vbox add1 BUILT_MODULE_NAME=vboxguest 2 2 DEST_MODULE_LOCATION=/kernel/misc 3 PACKAGE_NAME=vbox add3 PACKAGE_NAME=vboxguest 4 4 PACKAGE_VERSION=_VERSION_ 5 5 AUTOINSTALL=yes 6 POST_BUILD="do_Module.symvers vbox addsave $dkms_tree/$module/$module_version/build/Module.symvers"6 POST_BUILD="do_Module.symvers vboxguest save $dkms_tree/$module/$module_version/build/Module.symvers" -
trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
r21112 r21118 1 1 #!/bin/sh 2 # 2 ## @file 3 3 # Shared file between Makefile.kmk and export_modules 4 4 # 5 # Copyright (C) 2007 Sun Microsystems, Inc. 5 6 # 7 # Copyright (C) 2007-2009 Sun Microsystems, Inc. 6 8 # 7 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 18 20 # 19 21 20 FILES_VBOX ADD_NOBIN=" \22 FILES_VBOXGUEST_NOBIN=" \ 21 23 ${PATH_ROOT}/include/iprt/nocrt/limits.h=>include/iprt/nocrt/limits.h \ 22 24 ${PATH_ROOT}/include/iprt/alloca.h=>include/iprt/alloca.h \ … … 24 26 ${PATH_ROOT}/include/iprt/asm.h=>include/iprt/asm.h \ 25 27 ${PATH_ROOT}/include/iprt/assert.h=>include/iprt/assert.h \ 28 ${PATH_ROOT}/include/iprt/avl.h=>include/iprt/avl.h \ 26 29 ${PATH_ROOT}/include/iprt/cdefs.h=>include/iprt/cdefs.h \ 30 ${PATH_ROOT}/include/iprt/cpuset.h=>include/iprt/cpuset.h \ 27 31 ${PATH_ROOT}/include/iprt/ctype.h=>include/iprt/ctype.h \ 28 32 ${PATH_ROOT}/include/iprt/err.h=>include/iprt/err.h \ 29 33 ${PATH_ROOT}/include/iprt/heap.h=>include/iprt/heap.h \ 34 ${PATH_ROOT}/include/iprt/initterm.h=>include/iprt/initterm.h \ 30 35 ${PATH_ROOT}/include/iprt/log.h=>include/iprt/log.h \ 31 36 ${PATH_ROOT}/include/iprt/mem.h=>include/iprt/mem.h \ 32 37 ${PATH_ROOT}/include/iprt/memobj.h=>include/iprt/memobj.h \ 38 ${PATH_ROOT}/include/iprt/mp.h=>include/iprt/mp.h \ 33 39 ${PATH_ROOT}/include/iprt/param.h=>include/iprt/param.h \ 40 ${PATH_ROOT}/include/iprt/power.h=>include/iprt/power.h \ 34 41 ${PATH_ROOT}/include/iprt/process.h=>include/iprt/process.h \ 35 42 ${PATH_ROOT}/include/iprt/semaphore.h=>include/iprt/semaphore.h \ … … 38 45 ${PATH_ROOT}/include/iprt/stdint.h=>include/iprt/stdint.h \ 39 46 ${PATH_ROOT}/include/iprt/string.h=>include/iprt/string.h \ 47 ${PATH_ROOT}/include/iprt/thread.h=>include/iprt/thread.h \ 40 48 ${PATH_ROOT}/include/iprt/time.h=>include/iprt/time.h \ 41 49 ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \ … … 57 65 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h=>VBoxGuestLog.h \ 58 66 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp=>VMMDev.c \ 67 ${PATH_ROOT}/src/VBox/Runtime/include/internal/initterm.h=>include/internal/initterm.h \ 59 68 ${PATH_ROOT}/src/VBox/Runtime/include/internal/magics.h=>include/internal/magics.h \ 60 69 ${PATH_ROOT}/src/VBox/Runtime/include/internal/memobj.h=>include/internal/memobj.h \ 61 70 ${PATH_ROOT}/src/VBox/Runtime/include/internal/string.h=>include/internal/string.h \ 71 ${PATH_ROOT}/src/VBox/Runtime/include/internal/thread.h=>include/internal/thread.h \ 62 72 ${PATH_ROOT}/src/VBox/Runtime/common/alloc/heapsimple.cpp=>alloc/heapsimple.c \ 73 ${PATH_ROOT}/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp=>RTErrConvertFromErrno.c \ 63 74 ${PATH_ROOT}/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp=>RTErrConvertToErrno.c \ 64 75 ${PATH_ROOT}/src/VBox/Runtime/common/log/logformat.cpp=>logformat.c \ … … 76 87 ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.cpp=>r0drv/alloc-r0drv.c \ 77 88 ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.h=>r0drv/alloc-r0drv.h \ 89 ${PATH_ROOT}/src/VBox/Runtime/r0drv/initterm-r0drv.cpp=>r0drv/initterm-r0drv.c \ 78 90 ${PATH_ROOT}/src/VBox/Runtime/r0drv/memobj-r0drv.cpp=>r0drv/memobj-r0drv.c \ 91 ${PATH_ROOT}/src/VBox/Runtime/r0drv/mp-r0drv.h=>r0drv/mp-r0drv.h \ 92 ${PATH_ROOT}/src/VBox/Runtime/r0drv/mpnotification-r0drv.c=>r0drv/mpnotification-r0drv.c \ 93 ${PATH_ROOT}/src/VBox/Runtime/r0drv/power-r0drv.h=>r0drv/power-r0drv.h \ 94 ${PATH_ROOT}/src/VBox/Runtime/r0drv/powernotification-r0drv.c=>r0drv/powernotification-r0drv.c \ 79 95 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c=>r0drv/linux/alloc-r0drv-linux.c \ 80 96 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c=>r0drv/linux/assert-r0drv-linux.c \ 97 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c=>r0drv/linux/initterm-r0drv-linux.c \ 81 98 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c=>r0drv/linux/memobj-r0drv-linux.c \ 99 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c=>r0drv/linux/mp-r0drv-linux.c \ 100 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c=>r0drv/linux/mpnotification-r0drv-linux.c \ 82 101 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/process-r0drv-linux.c=>r0drv/linux/process-r0drv-linux.c \ 83 102 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c=>r0drv/linux/semevent-r0drv-linux.c \ … … 87 106 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/string.h=>r0drv/linux/string.h \ 88 107 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h=>r0drv/linux/the-linux-kernel.h \ 108 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c=>r0drv/linux/thread-r0drv-linux.c \ 89 109 ${PATH_ROOT}/src/VBox/Runtime/VBox/logbackdoor.cpp=>logbackdoor.c \ 90 110 ${PATH_ROOT}/src/VBox/Runtime/VBox/strformat-vbox.cpp=>strformat-vbox.c \ 91 ${PATH_ROOT}/src/VBox/Additions/ linux/module/vboxmod.c=>vboxmod.c \92 ${PATH_ROOT}/src/VBox/Additions/ linux/module/cmc.c=>cmc.c \93 ${PATH_ROOT}/src/VBox/Additions/ linux/module/vboxmod.h=>vboxmod.h \94 ${PATH_ROOT}/src/VBox/Additions/ linux/module/waitcompat.h=>waitcompat.h \95 ${PATH_ROOT}/src/VBox/Additions/ linux/module/Makefile.module=>Makefile \111 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp=>VBoxGuest.c \ 112 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c=>VBoxGuest-linux.c \ 113 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/VBoxGuestIDC-unix.c.h=>VBoxGuestIDC-unix.c.h \ 114 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h=>VBoxGuestInternal.h \ 115 ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/linux/Makefile=>Makefile \ 96 116 ${PATH_OUT}/version-generated.h=>version-generated.h \ 97 117 " 98 118 99 FILES_VBOX ADD_BIN=" \119 FILES_VBOXGUEST_BIN=" \ 100 120 "
Note:
See TracChangeset
for help on using the changeset viewer.