Changeset 6118 in vbox for trunk/src/VBox
- Timestamp:
- Dec 18, 2007 9:55:20 AM (17 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/Makefile.kmk
r6020 r6118 23 23 include $(PATH_SUB_CURRENT)/VBoxGuestLib/Makefile.kmk 24 24 include $(PATH_SUB_CURRENT)/VBoxGuest/Makefile.kmk 25 include $(PATH_SUB_CURRENT)/VBoxService/Makefile.kmk 25 26 26 27 include $(PATH_KBUILD)/subfooter.kmk -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6065 r6118 32 32 #include "VBoxGuestInternal.h" 33 33 #include <VBox/log.h> 34 #include <VBox/VBoxGuest.h>35 34 #include <iprt/asm.h> 36 35 #include <iprt/assert.h> … … 497 496 RTSpinlockReleaseNoInts(g_Spinlock, &Tmp); 498 497 498 VBA_LOGCONT("VBoxAddSolarisOpen: pid=%d\n", (int)RTProcSelf()); 499 499 Log(("VBoxAddSolarisOpen: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf())); 500 500 return 0; … … 507 507 static int VBoxAddSolarisClose(dev_t Dev, int flag, int fType, cred_t *pCred) 508 508 { 509 VBA_LOGCONT("VBoxAddSolarisClose pid=%d =%d\n", (int)RTProcSelf());509 VBA_LOGCONT("VBoxAddSolarisClose pid=%d\n", (int)RTProcSelf()); 510 510 511 511 /* … … 625 625 if ( Cmd >= VBOXGUEST_IOCTL_VMMREQUEST(0) 626 626 && Cmd <= VBOXGUEST_IOCTL_VMMREQUEST(0xfff)) 627 { 627 628 cbBuf = sizeof(VMMDevRequestHeader); 629 VBA_LOGCONT("VBOXGUEST_IOCTL_VMMREQUEST"); 630 } 628 631 #ifdef VBOX_HGCM 629 632 else if ( Cmd >= VBOXGUEST_IOCTL_HGCM_CALL(0) 630 633 && Cmd <= VBOXGUEST_IOCTL_HGCM_CALL(0xfff)) 634 { 631 635 cbBuf = sizeof(VBoxGuestHGCMCallInfo); 636 VBA_LOGCONT("VBOXGUEST_IOCTL_HGCM_CALL"); 637 } 632 638 #endif /* VBOX_HGCM */ 633 639 else … … 637 643 case VBOXGUEST_IOCTL_GETVMMDEVPORT: 638 644 cbBuf = sizeof(VBoxGuestPortInfo); 645 VBA_LOGCONT("VBOXGUEST_IOCTL_GETVMMDEVPORT"); 639 646 break; 640 647 641 648 case VBOXGUEST_IOCTL_WAITEVENT: 642 649 cbBuf = sizeof(VBoxGuestWaitEventInfo); 650 VBA_LOGCONT("VBOXGUEST_IOCTL_WAITEVENT"); 643 651 break; 644 652 645 653 case VBOXGUEST_IOCTL_CTL_FILTER_MASK: 646 654 cbBuf = sizeof(VBoxGuestFilterMaskInfo); 655 VBA_LOGCONT("VBOXGUEST_IOCTL_CTL_FILTER_MASK"); 647 656 break; 648 657 … … 650 659 case VBOXGUEST_IOCTL_HGCM_CONNECT: 651 660 cbBuf = sizeof(VBoxGuestHGCMConnectInfo); 661 VBA_LOGCONT("VBOXGUEST_IOCTL_HGCM_CONNECT"); 652 662 break; 653 663 654 664 case VBOXGUEST_IOCTL_HGCM_DISCONNECT: 655 665 cbBuf = sizeof(VBoxGuestHGCMDisconnectInfo); 666 VBA_LOGCONT("VBOXGUEST_IOCTL_HGCM_DISCONNECT"); 656 667 break; 657 668 658 669 case VBOXGUEST_IOCTL_CLIPBOARD_CONNECT: 659 670 cbBuf = sizeof(uint32_t); 671 VBA_LOGCONT("VBOXGUEST_IOCTL_CLIPBOARD_CONNECT"); 660 672 break; 661 673 #endif /* VBOX_HGCM */ … … 668 680 } 669 681 } 670 682 #if 0 683 /* cbBuf must actually get the size based on the VMM request type. 684 * Anyway, this obtaining cbBuf businesss will be removed eventually. 685 */ 671 686 if (RT_UNLIKELY(cbBuf != IOCPARM_LEN(Cmd))) 672 687 { … … 674 689 return EINVAL; 675 690 } 676 691 #endif 692 693 cbBuf = IOCPARM_LEN(Cmd); 677 694 void *pvBuf = RTMemTmpAlloc(cbBuf); 678 695 if (RT_UNLIKELY(!pvBuf)) … … 689 706 return EFAULT; 690 707 } 708 if (RT_UNLIKELY(cbBuf != 0 && !VALID_PTR(pvBuf))) 709 { 710 RTMemTmpFree(pvBuf); 711 VBA_LOGNOTE("VBoxAddSolarisIOCtl: pvBuf invalid pointer %p\n", pvBuf); 712 } 691 713 692 714 size_t cbDataReturned; 693 715 rc = VBoxGuestCommonIOCtl(Cmd, &g_DevExt, pSession, pvBuf, cbBuf, &cbDataReturned); 694 if (RT_ LIKELY(!rc))716 if (RT_SUCCESS(rc)) 695 717 { 696 718 if (RT_UNLIKELY(cbDataReturned > cbBuf)) -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r6020 r6118 33 33 #include <iprt/mem.h> 34 34 #include <VBox/VBoxGuest.h> 35 36 35 37 36 /******************************************************************************* … … 98 97 g_File = hf; 99 98 99 #elif defined(RT_OS_SOLARIS) 100 RTFILE File; 101 int rc = RTFileOpen(&File, VBOXGUEST_DEVICE_NAME, RTFILE_O_READWRITE); 102 if (RT_FAILURE(rc)) 103 return rc; 104 g_File = File; 105 100 106 #else 101 107 /* the default implemenation. */ -
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r6029 r6118 34 34 VBoxService-os2.def \ 35 35 VBoxServiceClipboard-os2.cpp 36 VBoxService_SOURCES.solaris = \ 37 VBoxService-solaris.cpp 36 38 VBoxService_LIBS = \ 37 39 $(VBOX_LIB_VBGL_R3) \ -
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r6029 r6118 47 47 /** Shutdown the main thread. (later, for signals) */ 48 48 bool volatile g_fShutdown; 49 #ifndef RT_OS_OS2 50 extern int daemon(int nochdir, int noclose); 51 #endif 49 52 50 53 /** … … 273 276 if (cch > sizeof("enable-") && !memcmp(psz, "enable-", sizeof("enable-") - 1)) 274 277 for (unsigned j = 0; !fFound && j < RT_ELEMENTS(g_aServices); j++) 278 #if defined(RT_OS_OS2) 275 279 if ((fFound = !stricmp(psz + sizeof("enable-") - 1, g_aServices[j].pDesc->pszName))) 280 #else 281 if ((fFound = !strcasecmp(psz + sizeof("enable-") - 1, g_aServices[j].pDesc->pszName))) 282 #endif 276 283 g_aServices[j].fEnabled = true; 277 284 278 285 if (cch > sizeof("disable-") && !memcmp(psz, "disable-", sizeof("disable-") - 1)) 279 286 for (unsigned j = 0; !fFound && j < RT_ELEMENTS(g_aServices); j++) 287 #if defined(RT_OS_OS2) 280 288 if ((fFound = !stricmp(psz + sizeof("disable-") - 1, g_aServices[j].pDesc->pszName))) 289 #else 290 if ((fFound = !strcasecmp(psz + sizeof("disable-") - 1, g_aServices[j].pDesc->pszName))) 291 #endif 281 292 g_aServices[j].fEnabled = false; 282 293 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
r6029 r6118 240 240 struct timeval tv; 241 241 # if !defined(RT_OS_OS2) /* PORTME */ 242 RTTimeSpecGetTimeval( Drift, &tv);242 RTTimeSpecGetTimeval(&Drift, &tv); 243 243 if (adjtime(&tv, NULL) == 0) 244 244 { … … 343 343 " with to calculate the dynamic minimum adjust time.\n" 344 344 " The default is 8 times.\n" 345 " --timesync-max-latency The max host timer query latency to acc pet.\n"345 " --timesync-max-latency The max host timer query latency to accept.\n" 346 346 " The default is 250 ms.\n" 347 347 ,
Note:
See TracChangeset
for help on using the changeset viewer.