Changeset 75498 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Nov 16, 2018 12:03:41 AM (6 years ago)
- Location:
- trunk/src/VBox/HostServices
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestProperties/service.cpp
r73511 r75498 394 394 } 395 395 396 #ifdef ASYNC_HOST_NOTIFY397 396 int initialize(); 398 #endif399 397 400 398 private: … … 422 420 int hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 423 421 int uninit(); 424 void dbgInfoShow(PCDBGFINFOHLP pHlp);425 422 static DECLCALLBACK(void) dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs); 426 423 … … 1439 1436 static DECLCALLBACK(int) dbgInfoCallback(PRTSTRSPACECORE pStr, void *pvUser) 1440 1437 { 1441 Property *pProp = (Property *)pStr;1442 PCDBGFINFOHLP pHlp = ((ENUMDBGINFO*)pvUser)->pHlp;1438 Property *pProp = (Property *)pStr; 1439 PCDBGFINFOHLP pHlp = ((ENUMDBGINFO *)pvUser)->pHlp; 1443 1440 1444 1441 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; … … 1447 1444 RTStrPrintf(szFlags, sizeof(szFlags), "???"); 1448 1445 1449 pHlp->pfnPrintf(pHlp, "%s: '%s', %RU64", 1450 pProp->mName.c_str(), pProp->mValue.c_str(), pProp->mTimestamp); 1446 pHlp->pfnPrintf(pHlp, "%s: '%s', %RU64", pProp->mName.c_str(), pProp->mValue.c_str(), pProp->mTimestamp); 1451 1447 if (strlen(szFlags)) 1452 1448 pHlp->pfnPrintf(pHlp, " (%s)", szFlags); … … 1455 1451 } 1456 1452 1457 void Service::dbgInfoShow(PCDBGFINFOHLP pHlp)1458 {1459 ENUMDBGINFO EnumData = { pHlp };1460 RTStrSpaceEnumerate(&mhProperties, dbgInfoCallback, &EnumData);1461 }1462 1453 1463 1454 /** … … 1468 1459 * @param pszArgs Arguments, ignored. 1469 1460 */ 1470 voidService::dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs)1461 DECLCALLBACK(void) Service::dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs) 1471 1462 { 1472 1463 RT_NOREF1(pszArgs); 1473 1464 SELF *pSelf = reinterpret_cast<SELF *>(pvUser); 1474 pSelf->dbgInfoShow(pHlp); 1465 1466 ENUMDBGINFO EnumData = { pHlp }; 1467 RTStrSpaceEnumerate(&pSelf->mhProperties, dbgInfoCallback, &EnumData); 1475 1468 } 1476 1469 … … 1542 1535 break; 1543 1536 1544 case GUEST_PROP_FN_HOST_GET_DBGF_INFO:1545 if (cParms != 2)1546 return VERR_INVALID_PARAMETER;1547 paParms[0].u.pointer.addr = (void*)(uintptr_t)dbgInfo;1548 paParms[1].u.pointer.addr = (void*)this;1549 break;1550 1551 1537 default: 1552 1538 rc = VERR_NOT_SUPPORTED; … … 1564 1550 1565 1551 #ifdef ASYNC_HOST_NOTIFY 1552 1566 1553 /* static */ 1567 1554 DECLCALLBACK(int) Service::threadNotifyHost(RTTHREAD hThreadSelf, void *pvUser) … … 1596 1583 } 1597 1584 1585 #endif /* ASYNC_HOST_NOTIFY */ 1586 1598 1587 int Service::initialize() 1599 1588 { 1589 #ifdef ASYNC_HOST_NOTIFY 1600 1590 /* The host notification thread and queue. */ 1601 1591 int rc = RTReqQueueCreate(&mhReqQNotifyHost); … … 1619 1609 } 1620 1610 } 1611 #else /* !ASYNC_HOST_NOTIFY */ 1612 int rc = VINF_SUCCESS; 1613 #endif /* !ASYNC_HOST_NOTIFY */ 1614 1615 /* Finally debug stuff (ignore failures): */ 1616 if (RT_SUCCESS(rc)) 1617 HGCMSvcHlpInfoRegister(mpHelpers, "guestprops", "Display the guest properties", Service::dbgInfo, this); 1621 1618 1622 1619 return rc; 1623 1620 } 1624 1621 1622 #ifdef ASYNC_HOST_NOTIFY 1625 1623 /** 1626 1624 * @callback_method_impl{FNRTSTRSPACECALLBACK, Destroys Property.} … … 1638 1636 int Service::uninit() 1639 1637 { 1638 if (mpHelpers) 1639 HGCMSvcHlpInfoDeregister(mpHelpers, "guestprops"); 1640 1640 1641 #ifdef ASYNC_HOST_NOTIFY 1641 1642 if (mhReqQNotifyHost != NIL_RTREQQUEUE) … … 1656 1657 } 1657 1658 #endif 1658 1659 1659 return VINF_SUCCESS; 1660 1660 } … … 1667 1667 * @copydoc VBOXHGCMSVCLOAD 1668 1668 */ 1669 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad 1669 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad(VBOXHGCMSVCFNTABLE *ptable) 1670 1670 { 1671 1671 int rc = VERR_IPE_UNINITIALIZED_STATUS; … … 1713 1713 ptable->pfnLoadState = NULL; /* construction done before restoring suffices */ 1714 1714 ptable->pfnRegisterExtension = Service::svcRegisterExtension; 1715 ptable->pvService = pService; 1715 1716 1716 1717 /* Service specific initialization. */ 1717 ptable->pvService = pService;1718 1719 #ifdef ASYNC_HOST_NOTIFY1720 1718 rc = pService->initialize(); 1721 1719 if (RT_FAILURE(rc)) … … 1724 1722 pService = NULL; 1725 1723 } 1726 #endif1727 1724 } 1728 1725 else -
trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
r69500 r75498 1 /* $Id$ */ 1 2 /** @file 2 * Shared Clipboard :Win32 host.3 * Shared Clipboard Service - Win32 host. 3 4 */ 4 5 … … 15 16 */ 16 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 17 23 #include <iprt/win/windows.h> 18 24 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h
r69500 r75498 1 /* $Id$ */ 1 2 /** @file 2 * 3 * Shared Clipboard 3 * Shared Clipboard Service - Internal Header. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef __ VBOXCLIPBOARD__H19 #define __ VBOXCLIPBOARD__H18 #ifndef ___VBOXCLIPBOARD_H 19 #define ___VBOXCLIPBOARD_H 20 20 21 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD22 21 #include <VBox/hgcmsvc.h> 23 22 #include <VBox/log.h> … … 98 97 #endif 99 98 100 #endif /* __VBOXCLIPBOARD__H */ 99 #endif /* !___VBOXCLIPBOARD_H */ 100 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc
r69500 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * VBoxSharedClipboard- Resource file containing version info and icon.3 * Shared Clipboard Service - Resource file containing version info and icon. 4 4 */ 5 5 -
trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
r69500 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * Shared Clipboard :Mac OS X host implementation.3 * Shared Clipboard Service - Mac OS X host implementation. 4 4 */ 5 5 … … 18 18 */ 19 19 20 #define LOG_GROUP LOG_GROUP_HGCM 20 /********************************************************************************************************************************* 21 * Header Files * 22 *********************************************************************************************************************************/ 23 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 21 24 #include <Carbon/Carbon.h> 22 25 … … 29 32 #include "VBox/GuestHost/clipboard-helper.h" 30 33 34 35 /********************************************************************************************************************************* 36 * Defined Constants And Macros * 37 *********************************************************************************************************************************/ 31 38 /* For debugging */ 32 39 //#define SHOW_CLIPBOARD_CONTENT 40 33 41 34 42 /** -
trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h
r69500 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * Shared Clipboard :Mac OS X host implementation.3 * Shared Clipboard Service - Mac OS X host implementation. 4 4 */ 5 5 … … 21 21 typedef struct OpaquePasteboardRef *PasteboardRef; 22 22 23 int initPasteboard 24 void destroyPasteboard 23 int initPasteboard(PasteboardRef *pPasteboardRef); 24 void destroyPasteboard(PasteboardRef *pPasteboardRef); 25 25 26 int queryNewPasteboardFormats 27 int readFromPasteboard 28 int writeToPasteboard 26 int queryNewPasteboardFormats(PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged); 27 int readFromPasteboard(PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual); 28 int writeToPasteboard(PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat); 29 29 30 30 #endif -
trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp
r69500 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * Shared Clipboard :Mac OS X host.3 * Shared Clipboard Service - Mac OS X host. 4 4 */ 5 5 … … 16 16 */ 17 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 18 23 #include <VBox/HostServices/VBoxClipboardSvc.h> 19 24 … … 25 30 #include "darwin-pasteboard.h" 26 31 32 33 /********************************************************************************************************************************* 34 * Structures and Typedefs * 35 *********************************************************************************************************************************/ 27 36 /** Global clipboard context information */ 28 37 struct _VBOXCLIPBOARDCONTEXT … … 38 47 }; 39 48 49 50 /********************************************************************************************************************************* 51 * Global Variables * 52 *********************************************************************************************************************************/ 40 53 /** Only one client is supported. There seems to be no need for more clients. */ 41 54 static VBOXCLIPBOARDCONTEXT g_ctx; -
trunk/src/VBox/HostServices/SharedClipboard/service.cpp
r73097 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * Shared Clipboard :Host service entry points.3 * Shared Clipboard Service - Host service entry points. 4 4 */ 5 5 … … 70 70 */ 71 71 72 /********************************************************************************************************************************* 73 * Header Files * 74 *********************************************************************************************************************************/ 75 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 72 76 #include <VBox/HostServices/VBoxClipboardSvc.h> 73 77 #include <VBox/HostServices/VBoxClipboardExt.h> … … 81 85 #include "VBoxClipboard.h" 82 86 83 static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32) 84 { 85 pParm->type = VBOX_HGCM_SVC_PARM_32BIT; 86 pParm->u.uint32 = u32; 87 } 88 89 static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32) 90 { 91 if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT) 92 { 93 *pu32 = pParm->u.uint32; 94 return VINF_SUCCESS; 95 } 96 97 return VERR_INVALID_PARAMETER; 98 } 99 100 #if 0 101 static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb) 102 { 103 pParm->type = VBOX_HGCM_SVC_PARM_PTR; 104 pParm->u.pointer.size = cb; 105 pParm->u.pointer.addr = pv; 106 } 107 #endif 108 109 static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb) 110 { 111 if (pParm->type == VBOX_HGCM_SVC_PARM_PTR) 112 { 113 *ppv = pParm->u.pointer.addr; 114 *pcb = pParm->u.pointer.size; 115 return VINF_SUCCESS; 116 } 117 118 return VERR_INVALID_PARAMETER; 119 } 120 87 88 /********************************************************************************************************************************* 89 * Global Variables * 90 *********************************************************************************************************************************/ 121 91 static PVBOXHGCMSVCHELPERS g_pHelpers; 122 92 … … 136 106 /** Is the clipboard running in headless mode? */ 137 107 static bool g_fHeadless = false; 108 109 110 static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32) 111 { 112 pParm->type = VBOX_HGCM_SVC_PARM_32BIT; 113 pParm->u.uint32 = u32; 114 } 115 116 static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32) 117 { 118 if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT) 119 { 120 *pu32 = pParm->u.uint32; 121 return VINF_SUCCESS; 122 } 123 124 return VERR_INVALID_PARAMETER; 125 } 126 127 #if 0 128 static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb) 129 { 130 pParm->type = VBOX_HGCM_SVC_PARM_PTR; 131 pParm->u.pointer.size = cb; 132 pParm->u.pointer.addr = pv; 133 } 134 #endif 135 136 static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb) 137 { 138 if (pParm->type == VBOX_HGCM_SVC_PARM_PTR) 139 { 140 *ppv = pParm->u.pointer.addr; 141 *pcb = pParm->u.pointer.size; 142 return VINF_SUCCESS; 143 } 144 145 return VERR_INVALID_PARAMETER; 146 } 147 138 148 139 149 static uint32_t vboxSvcClipboardMode (void) -
trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp
r69656 r75498 1 /* $Id$ */ 1 2 /** @file 2 * 3 * Shared Clipboard: 4 * Linux host. 3 * Shared Clipboard Service - Linux host. 5 4 */ 6 5 … … 17 16 */ 18 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 19 22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 20 21 #include <string.h>22 23 23 #include <iprt/assert.h> 24 24 #include <iprt/critsect.h> … … 26 26 #include <iprt/mem.h> 27 27 #include <iprt/semaphore.h> 28 #include <iprt/string.h> 28 29 29 30 #include <VBox/GuestHost/SharedClipboard.h> -
trunk/src/VBox/HostServices/SharedClipboard/x11-stub.cpp
r70243 r75498 1 /* $Id$*/ 1 2 /** @file 2 * 3 * Shared Clipboard: 4 * Linux host, a stub version with no functionality for use on headless hosts. 3 * Shared Clipboard Service - Linux host, a stub version with no functionality for use on headless hosts. 5 4 */ 6 5 … … 17 16 */ 18 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 19 23 #include <VBox/HostServices/VBoxClipboardSvc.h> 20 24 … … 32 36 33 37 #include "VBoxClipboard.h" 38 39 34 40 35 41 /** Initialise the host side of the shared clipboard - called by the hgcm layer. */ … … 129 135 LogFlowFunc(("called, returning.\n")); 130 136 } 137 -
trunk/src/VBox/HostServices/SharedFolders/mappings.cpp
r75432 r75498 1 /* $Id$ */ 1 2 /** @file 2 * Shared Folders :Mappings support.3 * Shared Folders Service - Mappings support. 3 4 */ 4 5 … … 15 16 */ 16 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS 17 23 #ifdef UNITTEST 18 24 # include "testcase/tstSharedFolderService.h" … … 31 37 #endif 32 38 39 40 /********************************************************************************************************************************* 41 * Global Variables * 42 *********************************************************************************************************************************/ 33 43 extern PVBOXHGCMSVCHELPERS g_pHelpers; /* service.cpp */ 34 44 -
trunk/src/VBox/HostServices/SharedFolders/service.cpp
r75407 r75498 16 16 */ 17 17 18 /********************************************************************************************************************************* 19 * Header Files * 20 *********************************************************************************************************************************/ 21 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS 18 22 #include <VBox/shflsvc.h> 19 20 23 21 24 #include "shfl.h" … … 30 33 #include <VBox/vmm/pdmifs.h> 31 34 35 36 /********************************************************************************************************************************* 37 * Defined Constants And Macros * 38 *********************************************************************************************************************************/ 32 39 #define SHFL_SAVED_STATE_VERSION_FOLDERNAME_UTF16 2 33 40 #define SHFL_SAVED_STATE_VERSION_PRE_AUTO_MOUNT_POINT 3 34 41 #define SHFL_SAVED_STATE_VERSION 4 42 43 44 /********************************************************************************************************************************* 45 * Global Variables * 46 *********************************************************************************************************************************/ 47 PVBOXHGCMSVCHELPERS g_pHelpers; 48 static PPDMLED g_pStatusLed = NULL; 49 50 /** @name Shared folder statistics. 51 * @{ */ 52 static STAMPROFILE g_StatQueryMappings; 53 static STAMPROFILE g_StatQueryMappingsFail; 54 static STAMPROFILE g_StatQueryMapName; 55 static STAMPROFILE g_StatCreate; 56 static STAMPROFILE g_StatCreateFail; 57 static STAMPROFILE g_StatLookup; 58 static STAMPROFILE g_StatLookupFail; 59 static STAMPROFILE g_StatClose; 60 static STAMPROFILE g_StatCloseFail; 61 static STAMPROFILE g_StatRead; 62 static STAMPROFILE g_StatReadFail; 63 static STAMPROFILE g_StatWrite; 64 static STAMPROFILE g_StatWriteFail; 65 static STAMPROFILE g_StatLock; 66 static STAMPROFILE g_StatLockFail; 67 static STAMPROFILE g_StatList; 68 static STAMPROFILE g_StatListFail; 69 static STAMPROFILE g_StatReadLink; 70 static STAMPROFILE g_StatReadLinkFail; 71 static STAMPROFILE g_StatMapFolderOld; 72 static STAMPROFILE g_StatMapFolder; 73 static STAMPROFILE g_StatMapFolderFail; 74 static STAMPROFILE g_StatUnmapFolder; 75 static STAMPROFILE g_StatUnmapFolderFail; 76 static STAMPROFILE g_StatInformationFail; 77 static STAMPROFILE g_StatInformationSetFile; 78 static STAMPROFILE g_StatInformationSetFileFail; 79 static STAMPROFILE g_StatInformationSetSize; 80 static STAMPROFILE g_StatInformationSetSizeFail; 81 static STAMPROFILE g_StatInformationGetFile; 82 static STAMPROFILE g_StatInformationGetFileFail; 83 static STAMPROFILE g_StatInformationGetVolume; 84 static STAMPROFILE g_StatInformationGetVolumeFail; 85 static STAMPROFILE g_StatRemove; 86 static STAMPROFILE g_StatRemoveFail; 87 static STAMPROFILE g_StatRename; 88 static STAMPROFILE g_StatRenameFail; 89 static STAMPROFILE g_StatFlush; 90 static STAMPROFILE g_StatFlushFail; 91 static STAMPROFILE g_StatSetUtf8; 92 static STAMPROFILE g_StatSymlink; 93 static STAMPROFILE g_StatSymlinkFail; 94 static STAMPROFILE g_StatSetSymlinks; 95 static STAMPROFILE g_StatQueryMapInfo; 96 static STAMPROFILE g_StatWaitForMappingsChanges; 97 static STAMPROFILE g_StatWaitForMappingsChangesFail; 98 static STAMPROFILE g_StatCancelMappingsChangesWait; 99 static STAMPROFILE g_StatUnknown; 100 /** @} */ 35 101 36 102 … … 73 139 74 140 75 PVBOXHGCMSVCHELPERS g_pHelpers;76 static PPDMLED pStatusLed = NULL;77 141 78 142 static DECLCALLBACK(int) svcUnload (void *) … … 83 147 vbsfFreeHandleTable(); 84 148 149 if (g_pHelpers) 150 HGCMSvcHlpStamDeregister(g_pHelpers, "/HGCM/VBoxSharedFolders/*"); 85 151 return rc; 86 152 } … … 336 402 { 337 403 RT_NOREF1(u32ClientID); 338 int rc = VINF_SUCCESS; 339 404 #ifndef VBOX_WITHOUT_RELEASE_STATISTICS 405 uint64_t tsStart; 406 STAM_GET_TS(tsStart); 407 #endif 340 408 Log(("SharedFolders host service: svcCall: u32ClientID = %u, fn = %u, cParms = %u, pparms = %p\n", u32ClientID, u32Function, cParms, paParms)); 341 409 … … 352 420 #endif 353 421 422 int rc = VINF_SUCCESS; 423 PSTAMPROFILE pStat, pStatFail; 354 424 switch (u32Function) 355 425 { 356 426 case SHFL_FN_QUERY_MAPPINGS: 357 427 { 428 pStat = &g_StatQueryMappings; 429 pStatFail = &g_StatQueryMappingsFail; 358 430 Log(("SharedFolders host service: svcCall: SHFL_FN_QUERY_MAPPINGS\n")); 359 431 … … 415 487 case SHFL_FN_QUERY_MAP_NAME: 416 488 { 489 pStatFail = pStat = &g_StatQueryMapName; 417 490 Log(("SharedFolders host service: svcCall: SHFL_FN_QUERY_MAP_NAME\n")); 418 491 … … 456 529 case SHFL_FN_CREATE: 457 530 { 531 pStat = &g_StatCreate; 532 pStatFail = &g_StatCreateFail; 458 533 Log(("SharedFolders host service: svcCall: SHFL_FN_CREATE\n")); 459 534 … … 491 566 else 492 567 { 568 if (pParms->CreateFlags & SHFL_CF_LOOKUP) 569 { 570 pStat = &g_StatLookup; 571 pStatFail = &g_StatLookupFail; 572 } 573 493 574 /* Execute the function. */ 494 575 rc = vbsfCreate (pClient, root, pPath, cbPath, pParms); … … 506 587 case SHFL_FN_CLOSE: 507 588 { 589 pStat = &g_StatClose; 590 pStatFail = &g_StatCloseFail; 508 591 Log(("SharedFolders host service: svcCall: SHFL_FN_CLOSE\n")); 509 592 … … 554 637 /** Read object content. */ 555 638 case SHFL_FN_READ: 639 pStat = &g_StatRead; 640 pStatFail = &g_StatReadFail; 556 641 Log(("SharedFolders host service: svcCall: SHFL_FN_READ\n")); 557 642 … … 596 681 { 597 682 /* Execute the function. */ 598 if ( pStatusLed)599 { 600 Assert( pStatusLed->u32Magic == PDMLED_MAGIC);601 pStatusLed->Asserted.s.fReading =pStatusLed->Actual.s.fReading = 1;683 if (g_pStatusLed) 684 { 685 Assert(g_pStatusLed->u32Magic == PDMLED_MAGIC); 686 g_pStatusLed->Asserted.s.fReading = g_pStatusLed->Actual.s.fReading = 1; 602 687 } 603 688 604 689 rc = vbsfRead (pClient, root, Handle, offset, &count, pBuffer); 605 if ( pStatusLed)606 pStatusLed->Actual.s.fReading = 0;690 if (g_pStatusLed) 691 g_pStatusLed->Actual.s.fReading = 0; 607 692 608 693 if (RT_SUCCESS(rc)) … … 621 706 /** Write new object content. */ 622 707 case SHFL_FN_WRITE: 708 pStat = &g_StatWrite; 709 pStatFail = &g_StatWriteFail; 623 710 Log(("SharedFolders host service: svcCall: SHFL_FN_WRITE\n")); 624 711 … … 663 750 { 664 751 /* Execute the function. */ 665 if ( pStatusLed)666 { 667 Assert( pStatusLed->u32Magic == PDMLED_MAGIC);668 pStatusLed->Asserted.s.fWriting =pStatusLed->Actual.s.fWriting = 1;752 if (g_pStatusLed) 753 { 754 Assert(g_pStatusLed->u32Magic == PDMLED_MAGIC); 755 g_pStatusLed->Asserted.s.fWriting = g_pStatusLed->Actual.s.fWriting = 1; 669 756 } 670 757 671 758 rc = vbsfWrite (pClient, root, Handle, offset, &count, pBuffer); 672 if ( pStatusLed)673 pStatusLed->Actual.s.fWriting = 0;759 if (g_pStatusLed) 760 g_pStatusLed->Actual.s.fWriting = 0; 674 761 675 762 if (RT_SUCCESS(rc)) … … 688 775 /** Lock/unlock a range in the object. */ 689 776 case SHFL_FN_LOCK: 777 pStat = &g_StatLock; 778 pStatFail = &g_StatLockFail; 690 779 Log(("SharedFolders host service: svcCall: SHFL_FN_LOCK\n")); 691 780 … … 775 864 case SHFL_FN_LIST: 776 865 { 866 pStat = &g_StatList; 867 pStatFail = &g_StatListFail; 777 868 Log(("SharedFolders host service: svcCall: SHFL_FN_LIST\n")); 778 869 … … 817 908 else 818 909 { 819 if ( pStatusLed)820 { 821 Assert( pStatusLed->u32Magic == PDMLED_MAGIC);822 pStatusLed->Asserted.s.fReading =pStatusLed->Actual.s.fReading = 1;910 if (g_pStatusLed) 911 { 912 Assert(g_pStatusLed->u32Magic == PDMLED_MAGIC); 913 g_pStatusLed->Asserted.s.fReading = g_pStatusLed->Actual.s.fReading = 1; 823 914 } 824 915 … … 826 917 rc = vbsfDirList (pClient, root, Handle, pPath, flags, &length, pBuffer, &resumePoint, &cFiles); 827 918 828 if ( pStatusLed)829 pStatusLed->Actual.s.fReading = 0;919 if (g_pStatusLed) 920 g_pStatusLed->Actual.s.fReading = 0; 830 921 831 922 if (rc == VERR_NO_MORE_FILES && cFiles != 0) … … 853 944 case SHFL_FN_READLINK: 854 945 { 946 pStat = &g_StatReadLink; 947 pStatFail = &g_StatReadLinkFail; 855 948 Log(("SharedFolders host service: svcCall: SHFL_FN_READLINK\n")); 856 949 … … 901 994 case SHFL_FN_MAP_FOLDER_OLD: 902 995 { 996 pStatFail = pStat = &g_StatMapFolderOld; 903 997 Log(("SharedFolders host service: svcCall: SHFL_FN_MAP_FOLDER_OLD\n")); 904 998 … … 944 1038 case SHFL_FN_MAP_FOLDER: 945 1039 { 1040 pStat = &g_StatMapFolder; 1041 pStatFail = &g_StatMapFolderFail; 946 1042 Log(("SharedFolders host service: svcCall: SHFL_FN_MAP_FOLDER\n")); 947 1043 if (BIT_FLAG(pClient->fu32Flags, SHFL_CF_UTF8)) … … 1014 1110 case SHFL_FN_UNMAP_FOLDER: 1015 1111 { 1112 pStat = &g_StatUnmapFolder; 1113 pStatFail = &g_StatUnmapFolderFail; 1016 1114 Log(("SharedFolders host service: svcCall: SHFL_FN_UNMAP_FOLDER\n")); 1017 1115 Log(("SharedFolders host service: request to unmap folder handle %u\n", … … 1049 1147 case SHFL_FN_INFORMATION: 1050 1148 { 1149 pStatFail = pStat = &g_StatInformationFail; 1051 1150 Log(("SharedFolders host service: svcCall: SHFL_FN_INFORMATION\n")); 1052 1151 … … 1084 1183 /* Execute the function. */ 1085 1184 if (flags & SHFL_INFO_SET) 1185 { 1086 1186 rc = vbsfSetFSInfo (pClient, root, Handle, flags, &length, pBuffer); 1187 1188 if (flags & SHFL_INFO_FILE) 1189 { 1190 pStat = &g_StatInformationSetFile; 1191 pStatFail = &g_StatInformationSetFileFail; 1192 } 1193 else if (flags & SHFL_INFO_SIZE) 1194 { 1195 pStat = &g_StatInformationSetSize; 1196 pStatFail = &g_StatInformationSetSizeFail; 1197 } 1198 } 1087 1199 else /* SHFL_INFO_GET */ 1200 { 1088 1201 rc = vbsfQueryFSInfo (pClient, root, Handle, flags, &length, pBuffer); 1202 1203 if (flags & SHFL_INFO_FILE) 1204 { 1205 pStat = &g_StatInformationGetFile; 1206 pStatFail = &g_StatInformationGetFileFail; 1207 } 1208 else if (flags & SHFL_INFO_VOLUME) 1209 { 1210 pStat = &g_StatInformationGetVolume; 1211 pStatFail = &g_StatInformationGetVolumeFail; 1212 } 1213 } 1089 1214 1090 1215 if (RT_SUCCESS(rc)) … … 1105 1230 case SHFL_FN_REMOVE: 1106 1231 { 1232 pStat = &g_StatRemove; 1233 pStatFail = &g_StatRemoveFail; 1107 1234 Log(("SharedFolders host service: svcCall: SHFL_FN_REMOVE\n")); 1108 1235 … … 1148 1275 case SHFL_FN_RENAME: 1149 1276 { 1277 pStat = &g_StatRename; 1278 pStatFail = &g_StatRenameFail; 1150 1279 Log(("SharedFolders host service: svcCall: SHFL_FN_RENAME\n")); 1151 1280 … … 1194 1323 case SHFL_FN_FLUSH: 1195 1324 { 1325 pStat = &g_StatFlush; 1326 pStatFail = &g_StatFlushFail; 1196 1327 Log(("SharedFolders host service: svcCall: SHFL_FN_FLUSH\n")); 1197 1328 … … 1241 1372 case SHFL_FN_SET_UTF8: 1242 1373 { 1374 pStatFail = pStat = &g_StatSetUtf8; 1375 1243 1376 pClient->fu32Flags |= SHFL_CF_UTF8; 1244 1377 rc = VINF_SUCCESS; … … 1248 1381 case SHFL_FN_SYMLINK: 1249 1382 { 1383 pStat = &g_StatSymlink; 1384 pStatFail = &g_StatSymlinkFail; 1250 1385 Log(("SharedFolders host service: svnCall: SHFL_FN_SYMLINK\n")); 1386 1251 1387 /* Verify parameter count and types. */ 1252 1388 if (cParms != SHFL_CPARMS_SYMLINK) … … 1295 1431 case SHFL_FN_SET_SYMLINKS: 1296 1432 { 1433 pStatFail = pStat = &g_StatSetSymlinks; 1434 1297 1435 pClient->fu32Flags |= SHFL_CF_SYMLINKS; 1298 1436 rc = VINF_SUCCESS; … … 1302 1440 case SHFL_FN_QUERY_MAP_INFO: 1303 1441 { 1442 pStatFail = pStat = &g_StatQueryMapInfo; 1304 1443 Log(("SharedFolders host service: svnCall: SHFL_FN_QUERY_MAP_INFO\n")); 1305 1444 … … 1326 1465 case SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES: 1327 1466 { 1328 Log(("SharedFolders host service: svnCall: SHFL_FN_WAIT_FOR_CHANGES\n")); 1467 pStat = &g_StatWaitForMappingsChanges; 1468 pStatFail = &g_StatWaitForMappingsChangesFail; 1469 Log(("SharedFolders host service: svnCall: SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES\n")); 1329 1470 1330 1471 /* Validate input: */ … … 1341 1482 case SHFL_FN_CANCEL_MAPPINGS_CHANGES_WAITS: 1342 1483 { 1484 pStatFail = pStat = &g_StatCancelMappingsChangesWait; 1343 1485 Log(("SharedFolders host service: svnCall: SHFL_FN_CANCEL_WAIT_FOR_CHANGES\n")); 1344 1486 … … 1354 1496 default: 1355 1497 { 1498 pStatFail = pStat = &g_StatUnknown; 1356 1499 rc = VERR_NOT_IMPLEMENTED; 1357 1500 break; … … 1369 1512 g_pHelpers->pfnCallComplete (callHandle, rc); 1370 1513 } 1514 1515 #ifndef VBOX_WITHOUT_RELEASE_STATISTICS 1516 /* Statistics: */ 1517 uint64_t cTicks; 1518 STAM_GET_TS(cTicks); 1519 cTicks -= tsStart; 1520 if (RT_SUCCESS(rc)) 1521 STAM_REL_PROFILE_ADD_PERIOD(pStat, cTicks); 1522 else 1523 STAM_REL_PROFILE_ADD_PERIOD(pStatFail, cTicks); 1524 #endif 1371 1525 1372 1526 LogFlow(("\n")); /* Add a new line to differentiate between calls more easily. */ … … 1538 1692 { 1539 1693 /* Execute the function. */ 1540 pStatusLed = pLed;1694 g_pStatusLed = pLed; 1541 1695 rc = VINF_SUCCESS; 1542 1696 } … … 1598 1752 1599 1753 vbsfMappingInit(); 1754 1755 /* Finally, register statistics if everything went well: */ 1756 if (RT_SUCCESS(rc)) 1757 { 1758 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMappings, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAPPINGS successes", "/HGCM/VBoxSharedFolders/FnQueryMappings"); 1759 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMappingsFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAPPINGS failures", "/HGCM/VBoxSharedFolders/FnQueryMappingsFail"); 1760 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMapName, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAP_NAME", "/HGCM/VBoxSharedFolders/FnQueryMapName"); 1761 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCreate, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/CREATE successes", "/HGCM/VBoxSharedFolders/FnCreate"); 1762 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCreateFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/CREATE failures", "/HGCM/VBoxSharedFolders/FnCreateFail"); 1763 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLookup, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/LOOKUP successes", "/HGCM/VBoxSharedFolders/FnLookup"); 1764 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLookupFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/LOOKUP failures", "/HGCM/VBoxSharedFolders/FnLookupFail"); 1765 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatClose, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CLOSE successes", "/HGCM/VBoxSharedFolders/FnClose"); 1766 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCloseFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CLOSE failures", "/HGCM/VBoxSharedFolders/FnCloseFail"); 1767 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRead, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READ successes", "/HGCM/VBoxSharedFolders/FnRead"); 1768 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatReadFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READ failures", "/HGCM/VBoxSharedFolders/FnReadFail"); 1769 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWrite, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WRITE successes", "/HGCM/VBoxSharedFolders/FnWrite"); 1770 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWriteFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WRITE failures", "/HGCM/VBoxSharedFolders/FnWriteFail"); 1771 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLock, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LOCK successes", "/HGCM/VBoxSharedFolders/FnLock"); 1772 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLockFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LOCK failures", "/HGCM/VBoxSharedFolders/FnLockFail"); 1773 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatList, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LIST successes", "/HGCM/VBoxSharedFolders/FnList"); 1774 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatListFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LIST failures", "/HGCM/VBoxSharedFolders/FnListFail"); 1775 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatReadLink, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READLINK successes", "/HGCM/VBoxSharedFolders/FnReadLink"); 1776 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatReadLinkFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READLINK failures", "/HGCM/VBoxSharedFolders/FnReadLinkFail"); 1777 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatMapFolderOld, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_MAP_FOLDER_OLD", "/HGCM/VBoxSharedFolders/FnMapFolderOld"); 1778 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatMapFolder, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_MAP_FOLDER successes", "/HGCM/VBoxSharedFolders/FnMapFolder"); 1779 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatMapFolderFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_MAP_FOLDER failures", "/HGCM/VBoxSharedFolders/FnMapFolderFail"); 1780 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatUnmapFolder, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_UNMAP_FOLDER successes", "/HGCM/VBoxSharedFolders/FnUnmapFolder"); 1781 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatUnmapFolderFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_UNMAP_FOLDER failures", "/HGCM/VBoxSharedFolders/FnUnmapFolderFail"); 1782 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION early failures", "/HGCM/VBoxSharedFolders/FnInformationFail"); 1783 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetFile, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/FILE successes", "/HGCM/VBoxSharedFolders/FnInformationSetFile"); 1784 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetFileFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/FILE failures", "/HGCM/VBoxSharedFolders/FnInformationSetFileFail"); 1785 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetSize, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/SIZE successes", "/HGCM/VBoxSharedFolders/FnInformationSetSize"); 1786 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetSizeFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/SIZE failures", "/HGCM/VBoxSharedFolders/FnInformationSetSizeFail"); 1787 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetFile, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/FILE successes", "/HGCM/VBoxSharedFolders/FnInformationGetFile"); 1788 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetFileFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/FILE failures", "/HGCM/VBoxSharedFolders/FnInformationGetFileFail"); 1789 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetVolume, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/VOLUME successes", "/HGCM/VBoxSharedFolders/FnInformationGetVolume"); 1790 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetVolumeFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/VOLUME failures", "/HGCM/VBoxSharedFolders/FnInformationGetVolumeFail"); 1791 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRemove, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_REMOVE successes", "/HGCM/VBoxSharedFolders/FnRemove"); 1792 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRemoveFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_REMOVE failures", "/HGCM/VBoxSharedFolders/FnRemoveFail"); 1793 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRename, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_RENAME successes", "/HGCM/VBoxSharedFolders/FnRename"); 1794 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRenameFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_RENAME failures", "/HGCM/VBoxSharedFolders/FnRenameFail"); 1795 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatFlush, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_FLUSH successes", "/HGCM/VBoxSharedFolders/FnFlush"); 1796 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatFlushFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_FLUSH failures", "/HGCM/VBoxSharedFolders/FnFlushFail"); 1797 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSetUtf8, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SET_UTF8", "/HGCM/VBoxSharedFolders/FnSetUtf8"); 1798 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSymlink, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SYMLINK successes", "/HGCM/VBoxSharedFolders/FnSymlink"); 1799 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSymlinkFail, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SYMLINK failures", "/HGCM/VBoxSharedFolders/FnSymlinkFail"); 1800 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSetSymlinks, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SET_SYMLINKS", "/HGCM/VBoxSharedFolders/FnSetSymlink"); 1801 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMapInfo, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAP_INFO", "/HGCM/VBoxSharedFolders/FnQueryMapInfo"); 1802 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWaitForMappingsChanges, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES successes", "/HGCM/VBoxSharedFolders/FnWaitForMappingsChanges"); 1803 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWaitForMappingsChangesFail,STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES failures","/HGCM/VBoxSharedFolders/FnWaitForMappingsChangesFail"); 1804 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCancelMappingsChangesWait, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CANCEL_MAPPINGS_CHANGES_WAITS", "/HGCM/VBoxSharedFolders/FnCancelMappingsChangesWaits"); 1805 HGCMSvcHlpStamRegister(g_pHelpers, &g_StatUnknown, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_???", "/HGCM/VBoxSharedFolders/FnUnknown"); 1806 } 1600 1807 } 1601 1808 -
trunk/src/VBox/HostServices/SharedFolders/shfl.h
r75407 r75498 21 21 #include <VBox/hgcmsvc.h> 22 22 23 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS24 23 #include <VBox/log.h> 25 24 -
trunk/src/VBox/HostServices/SharedFolders/shflhandle.cpp
r69500 r75498 1 /* $Id$ */ 1 2 /** @file 2 * 3 * Shared Folders: 4 * Handles helper functions. 3 * Shared Folders Service - Handles helper functions. 5 4 */ 6 5 … … 17 16 */ 18 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS 19 23 #include "shflhandle.h" 20 24 #include <iprt/alloc.h> … … 23 27 24 28 25 /* 29 /********************************************************************************************************************************* 30 * Structures and Typedefs * 31 *********************************************************************************************************************************/ 32 /** 26 33 * Very basic and primitive handle management. Should be sufficient for our needs. 27 34 * Handle allocation can be rather slow, but at least lookup is fast. 28 *29 35 */ 30 36 typedef struct … … 35 41 } SHFLINTHANDLE, *PSHFLINTHANDLE; 36 42 43 44 /********************************************************************************************************************************* 45 * Global Variables * 46 *********************************************************************************************************************************/ 37 47 static SHFLINTHANDLE *g_pHandles = NULL; 38 48 static int32_t gLastHandleIndex = 0; 39 49 static RTCRITSECT gLock; 50 40 51 41 52 int vbsfInitHandleTable() … … 213 224 AssertFailed(); 214 225 } 226 -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r75336 r75498 16 16 */ 17 17 18 /********************************************************************************************************************************* 19 * Header Files * 20 *********************************************************************************************************************************/ 21 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS 18 22 #ifdef UNITTEST 19 23 # include "testcase/tstSharedFolderService.h" … … 44 48 #endif 45 49 50 51 /********************************************************************************************************************************* 52 * Defined Constants And Macros * 53 *********************************************************************************************************************************/ 46 54 #define SHFL_RT_LINK(pClient) ((pClient)->fu32Flags & SHFL_CF_SYMLINKS ? RTPATH_F_ON_LINK : RTPATH_F_FOLLOW_LINK) 55 47 56 48 57 /** -
trunk/src/VBox/HostServices/SharedFolders/vbsfpath.cpp
r69753 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * Shared Folders - guest/host path convertion and verification.3 * Shared Folders Service - guest/host path convertion and verification. 4 4 */ 5 5 … … 16 16 */ 17 17 18 /********************************************************************************************************************************* 19 * Header Files * 20 *********************************************************************************************************************************/ 21 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS 18 22 #ifdef UNITTEST 19 23 # include "testcase/tstSharedFolderService.h" … … 44 48 #endif 45 49 50 51 /********************************************************************************************************************************* 52 * Defined Constants And Macros * 53 *********************************************************************************************************************************/ 46 54 #define SHFL_RT_LINK(pClient) ((pClient)->fu32Flags & SHFL_CF_SYMLINKS ? RTPATH_F_ON_LINK : RTPATH_F_FOLLOW_LINK) 55 47 56 48 57 /** … … 689 698 RTMemFree(pszHostPath); 690 699 } 700 -
trunk/src/VBox/HostServices/SharedFolders/vbsfpathabs.cpp
r66090 r75498 1 1 /* $Id$ */ 2 2 /** @file 3 * Shared Folders - guest/host path convertion and verification.3 * Shared Folders Service - guest/host path convertion and verification. 4 4 */ 5 5 … … 16 16 */ 17 17 18 /********************************************************************************************************************************* 19 * Header Files * 20 *********************************************************************************************************************************/ 21 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS 18 22 #include <iprt/path.h> 19 23 #include <iprt/string.h> 24 20 25 21 26 #if defined(RT_OS_WINDOWS)
Note:
See TracChangeset
for help on using the changeset viewer.