Changeset 76715 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jan 8, 2019 11:08:12 PM (6 years ago)
- Location:
- trunk/src/VBox/Additions/os2/VBoxSF
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSF.cpp
r76693 r76715 286 286 /* Note! We won't get there while the folder is on the list. */ 287 287 LogRel(("vboxSfOs2ReleaseFolder: Destroying %p [%s]\n", pFolder, pFolder->szName)); 288 vboxSfOs2HostReqUnmapFolderSimple(pFolder-> hHostFolder.root);288 vboxSfOs2HostReqUnmapFolderSimple(pFolder->idHostRoot); 289 289 RT_ZERO(pFolder); 290 290 RTMemFree(pFolder); … … 371 371 pNew->cOpenSearches = 0; 372 372 pNew->cDrives = 0; 373 RT_ZERO(pNew->hHostFolder);373 pNew->idHostRoot = SHFL_ROOT_NIL; 374 374 pNew->hVpb = 0; 375 375 pNew->cbNameAndTag = pName->u16Length + (uint16_t)cbTag; … … 398 398 if (RT_SUCCESS(rc)) 399 399 { 400 pNew-> hHostFolder.root = pReq->Parms.id32Root.u.value32;400 pNew->idHostRoot = pReq->Parms.id32Root.u.value32; 401 401 402 402 RTListAppend(&g_FolderHead, &pNew->ListEntry); … … 1364 1364 pu->Open.Req.StrPath.String.utf16[2] = '\0'; 1365 1365 1366 int vrc = vboxSfOs2HostReqCreate(pFolder , &pu->Open.Req);1366 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, &pu->Open.Req); 1367 1367 LogFlow(("FS32_FSINFO: vboxSfOs2HostReqCreate -> %Rrc Result=%d Handle=%#RX64\n", 1368 1368 vrc, pu->Open.Req.CreateParms.Result, pu->Open.Req.CreateParms.Handle)); … … 1373 1373 1374 1374 RT_ZERO(pu->Info.Req); 1375 vrc = vboxSfOs2HostReqQueryVolInfo(pFolder , &pu->Info.Req, hHandle);1375 vrc = vboxSfOs2HostReqQueryVolInfo(pFolder->idHostRoot, &pu->Info.Req, hHandle); 1376 1376 if (RT_SUCCESS(vrc)) 1377 1377 { … … 1404 1404 } 1405 1405 1406 vrc = vboxSfOs2HostReqClose(pFolder , &pu->Close, hHandle);1406 vrc = vboxSfOs2HostReqClose(pFolder->idHostRoot, &pu->Close, hHandle); 1407 1407 AssertRC(vrc); 1408 1408 } … … 1480 1480 pReq->CreateParms.CreateFlags = SHFL_CF_LOOKUP; 1481 1481 1482 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);1482 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 1483 1483 LogFlow(("FS32_CHDIR: vboxSfOs2HostReqCreate -> %Rrc Result=%d fMode=%#x\n", 1484 1484 vrc, pReq->CreateParms.Result, pReq->CreateParms.Info.Attr.fMode)); … … 1554 1554 | SHFL_CF_ACCESS_READ | SHFL_CF_ACCESS_DENYNONE; 1555 1555 1556 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);1556 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 1557 1557 LogFlow(("FS32_MKDIR: vboxSfOs2HostReqCreate -> %Rrc Result=%d fMode=%#x\n", 1558 1558 vrc, pReq->CreateParms.Result, pReq->CreateParms.Info.Attr.fMode)); … … 1565 1565 { 1566 1566 AssertCompile(RTASSERT_OFFSET_OF(VBOXSFCREATEREQ, CreateParms.Handle) > sizeof(VBOXSFCLOSEREQ)); /* no aliasing issues */ 1567 vrc = vboxSfOs2HostReqClose(pFolder , (VBOXSFCLOSEREQ *)pReq, pReq->CreateParms.Handle);1567 vrc = vboxSfOs2HostReqClose(pFolder->idHostRoot, (VBOXSFCLOSEREQ *)pReq, pReq->CreateParms.Handle); 1568 1568 AssertRC(vrc); 1569 1569 } … … 1620 1620 if (rc == NO_ERROR) 1621 1621 { 1622 int vrc = vboxSfOs2HostReqRemove(pFolder , pReq, SHFL_REMOVE_DIR);1622 int vrc = vboxSfOs2HostReqRemove(pFolder->idHostRoot, pReq, SHFL_REMOVE_DIR); 1623 1623 LogFlow(("FS32_RMDIR: vboxSfOs2HostReqRemove -> %Rrc\n", rc)); 1624 1624 if (RT_SUCCESS(vrc)) … … 1678 1678 * Note! Requires 6.0.0beta2+ or 5.2.24+ host for renaming files. 1679 1679 */ 1680 int vrc = vboxSfOs2HostReqRenameWithSrcBuf(pSrcFolder, pReq, pSrcFolderPath, SHFL_RENAME_FILE | SHFL_RENAME_DIR); 1680 int vrc = vboxSfOs2HostReqRenameWithSrcBuf(pSrcFolder->idHostRoot, pReq, pSrcFolderPath, 1681 SHFL_RENAME_FILE | SHFL_RENAME_DIR); 1681 1682 if (RT_SUCCESS(vrc)) 1682 1683 rc = NO_ERROR; … … 1717 1718 if (rc == NO_ERROR) 1718 1719 { 1719 int vrc = vboxSfOs2HostReqRemove(pFolder , pReq, SHFL_REMOVE_FILE);1720 int vrc = vboxSfOs2HostReqRemove(pFolder->idHostRoot, pReq, SHFL_REMOVE_FILE); 1720 1721 LogFlow(("FS32_DELETE: vboxSfOs2HostReqRemove -> %Rrc\n", rc)); 1721 1722 if (RT_SUCCESS(vrc)) … … 1797 1798 if (pReq) 1798 1799 { 1799 int vrc = vboxSfOs2HostReqSetObjInfoWithBuf(pFolder , pReq, hHostFile, pObjInfoBuf, offObjInfoInAlloc);1800 int vrc = vboxSfOs2HostReqSetObjInfoWithBuf(pFolder->idHostRoot, pReq, hHostFile, pObjInfoBuf, offObjInfoInAlloc); 1800 1801 LogFlow(("vboxSfOs2SetFileInfo: vboxSfOs2HostReqSetObjInfoWithBuf -> %Rrc\n", vrc)); 1801 1802 … … 1828 1829 | SHFL_CF_ACCESS_ATTR_READWRITE | SHFL_CF_ACCESS_DENYNONE | SHFL_CF_ACCESS_NONE; 1829 1830 1830 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);1831 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 1831 1832 LogFlow(("vboxSfOs2SetPathInfoWorker: vboxSfOs2HostReqCreate -> %Rrc Result=%d Handle=%#RX64 fMode=%#x\n", 1832 1833 vrc, pReq->CreateParms.Result, pReq->CreateParms.Handle, pReq->CreateParms.Info.Attr.fMode)); … … 1839 1840 pReq->CreateParms.CreateFlags = SHFL_CF_DIRECTORY | SHFL_CF_ACT_OPEN_IF_EXISTS | SHFL_CF_ACT_FAIL_IF_NEW 1840 1841 | SHFL_CF_ACCESS_ATTR_READWRITE | SHFL_CF_ACCESS_DENYNONE | SHFL_CF_ACCESS_NONE; 1841 vrc = vboxSfOs2HostReqCreate(pFolder , pReq);1842 vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 1842 1843 LogFlow(("vboxSfOs2SetPathInfoWorker: vboxSfOs2HostReqCreate#2 -> %Rrc Result=%d Handle=%#RX64 fMode=%#x\n", 1843 1844 vrc, pReq->CreateParms.Result, pReq->CreateParms.Handle, pReq->CreateParms.Info.Attr.fMode)); … … 1857 1858 1858 1859 AssertCompile(RTASSERT_OFFSET_OF(VBOXSFCREATEREQ, CreateParms.Handle) > sizeof(VBOXSFCLOSEREQ)); /* no aliasing issues */ 1859 vrc = vboxSfOs2HostReqClose(pFolder , (VBOXSFCLOSEREQ *)pReq, pReq->CreateParms.Handle);1860 vrc = vboxSfOs2HostReqClose(pFolder->idHostRoot, (VBOXSFCLOSEREQ *)pReq, pReq->CreateParms.Handle); 1860 1861 AssertRC(vrc); 1861 1862 } … … 1908 1909 pReq->CreateParms.CreateFlags = SHFL_CF_LOOKUP; 1909 1910 1910 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);1911 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 1911 1912 LogFlow(("FS32_FILEATTRIBUTE: vboxSfOs2HostReqCreate -> %Rrc Result=%d fMode=%#x\n", 1912 1913 vrc, pReq->CreateParms.Result, pReq->CreateParms.Info.Attr.fMode)); … … 2213 2214 pReq->CreateParms.CreateFlags = SHFL_CF_LOOKUP; 2214 2215 2215 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);2216 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 2216 2217 LogFlow(("FS32_PATHINFO: vboxSfOs2HostReqCreate -> %Rrc Result=%d fMode=%#x\n", 2217 2218 vrc, pReq->CreateParms.Result, pReq->CreateParms.Info.Attr.fMode)); -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFFile.cpp
r76693 r76715 233 233 * Try open the file. 234 234 */ 235 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);235 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 236 236 LogFlow(("FS32_OPENCREATE: vboxSfOs2HostReqCreate -> %Rrc Result=%d fMode=%#x\n", 237 237 vrc, pReq->CreateParms.Result, pReq->CreateParms.Info.Attr.fMode)); … … 282 282 LogRel(("FS32_OPENCREATE: cbObject=%#RX64 no OPEN_FLAGS_LARGEFILE (%s)\n", pReq->CreateParms.Info.cbObject, pszName)); 283 283 AssertCompile(RTASSERT_OFFSET_OF(VBOXSFCREATEREQ, CreateParms.Handle) > sizeof(VBOXSFCLOSEREQ)); /* no aliasing issues */ 284 vboxSfOs2HostReqClose(pFolder , (VBOXSFCLOSEREQ *)pReq, pReq->CreateParms.Handle);284 vboxSfOs2HostReqClose(pFolder->idHostRoot, (VBOXSFCLOSEREQ *)pReq, pReq->CreateParms.Handle); 285 285 rc = ERROR_ACCESS_DENIED; 286 286 } … … 335 335 RT_NOREF(fIoFlags); 336 336 337 int vrc = vboxSfOs2HostReqCloseSimple(pFolder , pSfFsd->hHostFile);337 int vrc = vboxSfOs2HostReqCloseSimple(pFolder->idHostRoot, pSfFsd->hHostFile); 338 338 AssertRC(vrc); 339 339 … … 374 374 || (pSfFsi->sfi_mode & SFMODE_OPEN_ACCESS) == SFMODE_OPEN_READWRITE) 375 375 { 376 int vrc = vboxSfOs2HostReqFlushSimple(pFolder , pSfFsd->hHostFile);376 int vrc = vboxSfOs2HostReqFlushSimple(pFolder->idHostRoot, pSfFsd->hHostFile); 377 377 if (RT_FAILURE(vrc)) 378 378 { … … 435 435 return ERROR_NOT_ENOUGH_MEMORY; 436 436 437 int vrc = vboxSfOs2HostReqQueryObjInfo(pFolder , pReq, pSfFsd->hHostFile);437 int vrc = vboxSfOs2HostReqQueryObjInfo(pFolder->idHostRoot, pReq, pSfFsd->hHostFile); 438 438 if (RT_SUCCESS(vrc)) 439 439 { … … 813 813 SHFL_FN_INFORMATION, SHFL_CPARMS_INFORMATION, sizeof(*pReq)); 814 814 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 815 pReq->Parms.id32Root.u.value32 = pFolder-> hHostFolder.root;815 pReq->Parms.id32Root.u.value32 = pFolder->idHostRoot; 816 816 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; 817 817 pReq->Parms.u64Handle.u.value64 = pSfFsd->hHostFile; … … 858 858 if (pReq) 859 859 { 860 int vrc = vboxSfOs2HostReqQueryObjInfo(pFolder , pReq, pSfFsd->hHostFile);860 int vrc = vboxSfOs2HostReqQueryObjInfo(pFolder->idHostRoot, pReq, pSfFsd->hHostFile); 861 861 if (RT_SUCCESS(vrc)) 862 862 { … … 1047 1047 * Call the host. 1048 1048 */ 1049 int vrc = vboxSfOs2HostReqSetFileSizeSimple(pFolder , pSfFsd->hHostFile, cbFile);1049 int vrc = vboxSfOs2HostReqSetFileSizeSimple(pFolder->idHostRoot, pSfFsd->hHostFile, cbFile); 1050 1050 if (RT_SUCCESS(vrc)) 1051 1051 { … … 1166 1166 { 1167 1167 APIRET rc; 1168 int vrc = vboxSfOs2HostReqReadEmbedded(pFolder , pReq, pSfFsd->hHostFile, offRead, cbToRead);1168 int vrc = vboxSfOs2HostReqReadEmbedded(pFolder->idHostRoot, pReq, pSfFsd->hHostFile, offRead, cbToRead); 1169 1169 if (RT_SUCCESS(vrc)) 1170 1170 { … … 1223 1223 { 1224 1224 APIRET rc; 1225 int vrc = vboxSfOs2HostReqReadContig(pFolder, pReq, pSfFsd->hHostFile, offRead, cbToRead, pvBuf, GCPhys); 1225 int vrc = vboxSfOs2HostReqReadContig(pFolder->idHostRoot, pReq, pSfFsd->hHostFile, 1226 offRead, cbToRead, pvBuf, GCPhys); 1226 1227 if (RT_SUCCESS(vrc)) 1227 1228 { … … 1265 1266 1266 1267 APIRET rc; 1267 int vrc = vboxSfOs2HostReqReadPgLst(pFolder , pReq, pSfFsd->hHostFile, offRead, cbToRead, cPages);1268 int vrc = vboxSfOs2HostReqReadPgLst(pFolder->idHostRoot, pReq, pSfFsd->hHostFile, offRead, cbToRead, cPages); 1268 1269 if (RT_SUCCESS(vrc)) 1269 1270 { … … 1336 1337 if (rc == NO_ERROR) 1337 1338 { 1338 int vrc = vboxSfOs2HostReqWriteEmbedded(pFolder , pReq, pSfFsd->hHostFile, offWrite, cbToWrite);1339 int vrc = vboxSfOs2HostReqWriteEmbedded(pFolder->idHostRoot, pReq, pSfFsd->hHostFile, offWrite, cbToWrite); 1339 1340 if (RT_SUCCESS(vrc)) 1340 1341 { … … 1393 1394 { 1394 1395 APIRET rc; 1395 int vrc = vboxSfOs2HostReqWriteContig(pFolder, pReq, pSfFsd->hHostFile, offWrite, cbToWrite, pvBuf, GCPhys); 1396 int vrc = vboxSfOs2HostReqWriteContig(pFolder->idHostRoot, pReq, pSfFsd->hHostFile, 1397 offWrite, cbToWrite, pvBuf, GCPhys); 1396 1398 if (RT_SUCCESS(vrc)) 1397 1399 { … … 1431 1433 1432 1434 APIRET rc; 1433 int vrc = vboxSfOs2HostReqWritePgLst(pFolder , pReq, pSfFsd->hHostFile, offWrite, cbToWrite, cPages);1435 int vrc = vboxSfOs2HostReqWritePgLst(pFolder->idHostRoot, pReq, pSfFsd->hHostFile, offWrite, cbToWrite, cPages); 1434 1436 if (RT_SUCCESS(vrc)) 1435 1437 { -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFFind.cpp
r76665 r76715 234 234 { 235 235 pDataBuf->pEntry = pEntry = pDataBuf->pBuf; 236 int vrc = vboxSfOs2HostReqListDir(pFolder , &pDataBuf->Req, pFsFsd->hHostDir, pDataBuf->pFilter,236 int vrc = vboxSfOs2HostReqListDir(pFolder->idHostRoot, &pDataBuf->Req, pFsFsd->hHostDir, pDataBuf->pFilter, 237 237 /*cMaxMatches == 1 ? SHFL_LIST_RETURN_ONE :*/ 0, pDataBuf->pBuf, pDataBuf->cbBuf); 238 238 if (RT_SUCCESS(vrc)) … … 601 601 | SHFL_CF_ACCESS_READ | SHFL_CF_ACCESS_ATTR_READ | SHFL_CF_ACCESS_DENYNONE; 602 602 603 int vrc = vboxSfOs2HostReqCreate(pFolder , pReq);603 int vrc = vboxSfOs2HostReqCreate(pFolder->idHostRoot, pReq); 604 604 LogFlow(("FS32_FINDFIRST: vboxSfOs2HostReqCreate(%ls) -> %Rrc Result=%d fMode=%#x hHandle=%#RX64\n", 605 605 pStrFolderPath->String.utf16, vrc, pReq->CreateParms.Result, pReq->CreateParms.Info.Attr.fMode, … … 649 649 { 650 650 AssertCompile(sizeof(VBOXSFCLOSEREQ) < sizeof(*pReq)); 651 vrc = vboxSfOs2HostReqClose(pFolder , (VBOXSFCLOSEREQ *)pReq, pFsFsd->hHostDir);651 vrc = vboxSfOs2HostReqClose(pFolder->idHostRoot, (VBOXSFCLOSEREQ *)pReq, pFsFsd->hHostDir); 652 652 AssertRC(vrc); 653 653 pFsFsd->u32Magic = ~VBOXSFFS_MAGIC; … … 826 826 if (pFsFsd->hHostDir != SHFL_HANDLE_NIL) 827 827 { 828 int vrc = vboxSfOs2HostReqCloseSimple(pFolder , pFsFsd->hHostDir);828 int vrc = vboxSfOs2HostReqCloseSimple(pFolder->idHostRoot, pFsFsd->hHostDir); 829 829 AssertRC(vrc); 830 830 } -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFInternal.h
r76693 r76715 77 77 78 78 /** The host folder handle. */ 79 VBGLSFMAP hHostFolder;79 SHFLROOT idHostRoot; 80 80 81 81 /** OS/2 volume handle. */ … … 369 369 * SHFL_FN_CREATE request. 370 370 */ 371 DECLINLINE(int) vboxSfOs2HostReqCreate( PVBOXSFFOLDER pFolder, VBOXSFCREATEREQ *pReq)371 DECLINLINE(int) vboxSfOs2HostReqCreate(SHFLROOT idRoot, VBOXSFCREATEREQ *pReq) 372 372 { 373 373 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 377 377 SHFL_FN_CREATE, SHFL_CPARMS_CREATE, cbReq); 378 378 379 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit;380 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;379 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 380 pReq->Parms.id32Root.u.value32 = idRoot; 381 381 382 382 if (g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS) … … 421 421 * SHFL_FN_CLOSE request. 422 422 */ 423 DECLINLINE(int) vboxSfOs2HostReqClose( PVBOXSFFOLDER pFolder, VBOXSFCLOSEREQ *pReq, uint64_t hHostFile)423 DECLINLINE(int) vboxSfOs2HostReqClose(SHFLROOT idRoot, VBOXSFCLOSEREQ *pReq, uint64_t hHostFile) 424 424 { 425 425 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, 426 426 SHFL_FN_CLOSE, SHFL_CPARMS_CLOSE, sizeof(*pReq)); 427 427 428 pReq->Parms.id32Root.type 429 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;430 431 pReq->Parms.u64Handle.type 432 pReq->Parms.u64Handle.u.value64 428 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 429 pReq->Parms.id32Root.u.value32 = idRoot; 430 431 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; 432 pReq->Parms.u64Handle.u.value64 = hHostFile; 433 433 434 434 int vrc = VbglR0HGCMFastCall(g_SfClient.handle, &pReq->Hdr, sizeof(*pReq)); … … 441 441 * SHFL_FN_CLOSE request, allocate request buffer. 442 442 */ 443 DECLINLINE(int) vboxSfOs2HostReqCloseSimple( PVBOXSFFOLDER pFolder, uint64_t hHostFile)443 DECLINLINE(int) vboxSfOs2HostReqCloseSimple(SHFLROOT idRoot, uint64_t hHostFile) 444 444 { 445 445 VBOXSFCLOSEREQ *pReq = (VBOXSFCLOSEREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 446 446 if (pReq) 447 447 { 448 int vrc = vboxSfOs2HostReqClose( pFolder, pReq, hHostFile);448 int vrc = vboxSfOs2HostReqClose(idRoot, pReq, hHostFile); 449 449 VbglR0PhysHeapFree(pReq); 450 450 return vrc; … … 466 466 * SHFL_FN_INFORMATION[SHFL_INFO_VOLUME | SHFL_INFO_GET] request. 467 467 */ 468 DECLINLINE(int) vboxSfOs2HostReqQueryVolInfo( PVBOXSFFOLDER pFolder, VBOXSFVOLINFOREQ *pReq, uint64_t hHostFile)468 DECLINLINE(int) vboxSfOs2HostReqQueryVolInfo(SHFLROOT idRoot, VBOXSFVOLINFOREQ *pReq, uint64_t hHostFile) 469 469 { 470 470 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 474 474 475 475 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 476 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;476 pReq->Parms.id32Root.u.value32 = idRoot; 477 477 478 478 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 518 518 * SHFL_FN_INFORMATION[SHFL_INFO_GET | SHFL_INFO_FILE] request. 519 519 */ 520 DECLINLINE(int) vboxSfOs2HostReqQueryObjInfo( PVBOXSFFOLDER pFolder, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile)520 DECLINLINE(int) vboxSfOs2HostReqQueryObjInfo(SHFLROOT idRoot, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile) 521 521 { 522 522 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 526 526 527 527 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 528 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;528 pReq->Parms.id32Root.u.value32 = idRoot; 529 529 530 530 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 561 561 * SHFL_FN_INFORMATION[SHFL_INFO_SET | SHFL_INFO_FILE] request. 562 562 */ 563 DECLINLINE(int) vboxSfOs2HostReqSetObjInfo( PVBOXSFFOLDER pFolder, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile)563 DECLINLINE(int) vboxSfOs2HostReqSetObjInfo(SHFLROOT idRoot, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile) 564 564 { 565 565 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 569 569 570 570 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 571 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;571 pReq->Parms.id32Root.u.value32 = idRoot; 572 572 573 573 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 614 614 * buffer (on the physical heap). 615 615 */ 616 DECLINLINE(int) vboxSfOs2HostReqSetObjInfoWithBuf( PVBOXSFFOLDER pFolder, VBOXSFOBJINFOWITHBUFREQ *pReq, uint64_t hHostFile,616 DECLINLINE(int) vboxSfOs2HostReqSetObjInfoWithBuf(SHFLROOT idRoot, VBOXSFOBJINFOWITHBUFREQ *pReq, uint64_t hHostFile, 617 617 PSHFLFSOBJINFO pObjInfo, uint32_t offObjInfoInAlloc) 618 618 { … … 621 621 622 622 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 623 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;623 pReq->Parms.id32Root.u.value32 = idRoot; 624 624 625 625 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 669 669 * SHFL_FN_REMOVE request. 670 670 */ 671 DECLINLINE(int) vboxSfOs2HostReqRemove( PVBOXSFFOLDER pFolder, VBOXSFREMOVEREQ *pReq, uint32_t fFlags)671 DECLINLINE(int) vboxSfOs2HostReqRemove(SHFLROOT idRoot, VBOXSFREMOVEREQ *pReq, uint32_t fFlags) 672 672 { 673 673 uint32_t const cbReq = RT_UOFFSETOF(VBOXSFREMOVEREQ, StrPath.String) … … 677 677 678 678 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 679 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;679 pReq->Parms.id32Root.u.value32 = idRoot; 680 680 681 681 if (g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS) … … 716 716 * SHFL_FN_REMOVE request. 717 717 */ 718 DECLINLINE(int) vboxSfOs2HostReqRenameWithSrcBuf( PVBOXSFFOLDER pFolder, VBOXSFRENAMEWITHSRCBUFREQ *pReq,718 DECLINLINE(int) vboxSfOs2HostReqRenameWithSrcBuf(SHFLROOT idRoot, VBOXSFRENAMEWITHSRCBUFREQ *pReq, 719 719 PSHFLSTRING pSrcStr, uint32_t fFlags) 720 720 { … … 725 725 726 726 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 727 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;727 pReq->Parms.id32Root.u.value32 = idRoot; 728 728 729 729 if (g_fHostFeatures & VMMDEV_HVF_HGCM_CONTIGUOUS_PAGE_LIST) … … 782 782 * SHFL_FN_FLUSH request. 783 783 */ 784 DECLINLINE(int) vboxSfOs2HostReqFlush( PVBOXSFFOLDER pFolder, VBOXSFFLUSHREQ *pReq, uint64_t hHostFile)784 DECLINLINE(int) vboxSfOs2HostReqFlush(SHFLROOT idRoot, VBOXSFFLUSHREQ *pReq, uint64_t hHostFile) 785 785 { 786 786 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, 787 787 SHFL_FN_FLUSH, SHFL_CPARMS_FLUSH, sizeof(*pReq)); 788 788 789 pReq->Parms.id32Root.type 790 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;791 792 pReq->Parms.u64Handle.type 793 pReq->Parms.u64Handle.u.value64 789 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 790 pReq->Parms.id32Root.u.value32 = idRoot; 791 792 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; 793 pReq->Parms.u64Handle.u.value64 = hHostFile; 794 794 795 795 int vrc = VbglR0HGCMFastCall(g_SfClient.handle, &pReq->Hdr, sizeof(*pReq)); … … 802 802 * SHFL_FN_FLUSH request, allocate request buffer. 803 803 */ 804 DECLINLINE(int) vboxSfOs2HostReqFlushSimple( PVBOXSFFOLDER pFolder, uint64_t hHostFile)804 DECLINLINE(int) vboxSfOs2HostReqFlushSimple(SHFLROOT idRoot, uint64_t hHostFile) 805 805 { 806 806 VBOXSFFLUSHREQ *pReq = (VBOXSFFLUSHREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 807 807 if (pReq) 808 808 { 809 int vrc = vboxSfOs2HostReqFlush( pFolder, pReq, hHostFile);809 int vrc = vboxSfOs2HostReqFlush(idRoot, pReq, hHostFile); 810 810 VbglR0PhysHeapFree(pReq); 811 811 return vrc; … … 826 826 * SHFL_FN_SET_FILE_SIZE request. 827 827 */ 828 DECLINLINE(int) vboxSfOs2HostReqSetFileSize( PVBOXSFFOLDER pFolder, VBOXSFSETFILESIZEREQ *pReq,828 DECLINLINE(int) vboxSfOs2HostReqSetFileSize(SHFLROOT idRoot, VBOXSFSETFILESIZEREQ *pReq, 829 829 uint64_t hHostFile, uint64_t cbNewSize) 830 830 { … … 832 832 SHFL_FN_SET_FILE_SIZE, SHFL_CPARMS_SET_FILE_SIZE, sizeof(*pReq)); 833 833 834 pReq->Parms.id32Root.type 835 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;836 837 pReq->Parms.u64Handle.type 838 pReq->Parms.u64Handle.u.value64 839 840 pReq->Parms.cb64NewSize.type 841 pReq->Parms.cb64NewSize.u.value64 834 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 835 pReq->Parms.id32Root.u.value32 = idRoot; 836 837 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; 838 pReq->Parms.u64Handle.u.value64 = hHostFile; 839 840 pReq->Parms.cb64NewSize.type = VMMDevHGCMParmType_64bit; 841 pReq->Parms.cb64NewSize.u.value64 = cbNewSize; 842 842 843 843 int vrc = VbglR0HGCMFastCall(g_SfClient.handle, &pReq->Hdr, sizeof(*pReq)); … … 850 850 * SHFL_FN_SET_FILE_SIZE request, allocate request buffer. 851 851 */ 852 DECLINLINE(int) vboxSfOs2HostReqSetFileSizeSimple( PVBOXSFFOLDER pFolder, uint64_t hHostFile, uint64_t cbNewSize)852 DECLINLINE(int) vboxSfOs2HostReqSetFileSizeSimple(SHFLROOT idRoot, uint64_t hHostFile, uint64_t cbNewSize) 853 853 { 854 854 VBOXSFSETFILESIZEREQ *pReq = (VBOXSFSETFILESIZEREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 855 855 if (pReq) 856 856 { 857 int vrc = vboxSfOs2HostReqSetFileSize( pFolder, pReq, hHostFile, cbNewSize);857 int vrc = vboxSfOs2HostReqSetFileSize(idRoot, pReq, hHostFile, cbNewSize); 858 858 VbglR0PhysHeapFree(pReq); 859 859 return vrc; … … 875 875 * SHFL_FN_READ request using embedded data buffer. 876 876 */ 877 DECLINLINE(int) vboxSfOs2HostReqReadEmbedded( PVBOXSFFOLDER pFolder, VBOXSFREADEMBEDDEDREQ *pReq, uint64_t hHostFile,877 DECLINLINE(int) vboxSfOs2HostReqReadEmbedded(SHFLROOT idRoot, VBOXSFREADEMBEDDEDREQ *pReq, uint64_t hHostFile, 878 878 uint64_t offRead, uint32_t cbToRead) 879 879 { … … 884 884 885 885 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 886 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;886 pReq->Parms.id32Root.u.value32 = idRoot; 887 887 888 888 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 928 928 * SHFL_FN_READ request using page list for data buffer (caller populated). 929 929 */ 930 DECLINLINE(int) vboxSfOs2HostReqReadPgLst( PVBOXSFFOLDER pFolder, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile,930 DECLINLINE(int) vboxSfOs2HostReqReadPgLst(SHFLROOT idRoot, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile, 931 931 uint64_t offRead, uint32_t cbToRead, uint32_t cPages) 932 932 { … … 936 936 937 937 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 938 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;938 pReq->Parms.id32Root.u.value32 = idRoot; 939 939 940 940 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 966 966 * SHFL_FN_READ request using a physically contiguous buffer. 967 967 */ 968 DECLINLINE(int) vboxSfOs2HostReqReadContig( PVBOXSFFOLDER pFolder, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile,968 DECLINLINE(int) vboxSfOs2HostReqReadContig(SHFLROOT idRoot, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile, 969 969 uint64_t offRead, uint32_t cbToRead, void *pvBuffer, RTGCPHYS64 PhysBuffer) 970 970 { … … 973 973 974 974 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 975 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;975 pReq->Parms.id32Root.u.value32 = idRoot; 976 976 977 977 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 1021 1021 * SHFL_FN_WRITE request using embedded data buffer. 1022 1022 */ 1023 DECLINLINE(int) vboxSfOs2HostReqWriteEmbedded( PVBOXSFFOLDER pFolder, VBOXSFWRITEEMBEDDEDREQ *pReq, uint64_t hHostFile,1023 DECLINLINE(int) vboxSfOs2HostReqWriteEmbedded(SHFLROOT idRoot, VBOXSFWRITEEMBEDDEDREQ *pReq, uint64_t hHostFile, 1024 1024 uint64_t offWrite, uint32_t cbToWrite) 1025 1025 { … … 1030 1030 1031 1031 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 1032 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;1032 pReq->Parms.id32Root.u.value32 = idRoot; 1033 1033 1034 1034 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 1074 1074 * SHFL_FN_WRITE request using page list for data buffer (caller populated). 1075 1075 */ 1076 DECLINLINE(int) vboxSfOs2HostReqWritePgLst( PVBOXSFFOLDER pFolder, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile,1076 DECLINLINE(int) vboxSfOs2HostReqWritePgLst(SHFLROOT idRoot, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile, 1077 1077 uint64_t offWrite, uint32_t cbToWrite, uint32_t cPages) 1078 1078 { … … 1082 1082 1083 1083 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 1084 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;1084 pReq->Parms.id32Root.u.value32 = idRoot; 1085 1085 1086 1086 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 1112 1112 * SHFL_FN_WRITE request using a physically contiguous buffer. 1113 1113 */ 1114 DECLINLINE(int) vboxSfOs2HostReqWriteContig( PVBOXSFFOLDER pFolder, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile,1114 DECLINLINE(int) vboxSfOs2HostReqWriteContig(SHFLROOT idRoot, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile, 1115 1115 uint64_t offWrite, uint32_t cbToWrite, void const *pvBuffer, RTGCPHYS64 PhysBuffer) 1116 1116 { … … 1119 1119 1120 1120 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 1121 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;1121 pReq->Parms.id32Root.u.value32 = idRoot; 1122 1122 1123 1123 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit; … … 1158 1158 * both allocated on the physical heap. 1159 1159 */ 1160 DECLINLINE(int) vboxSfOs2HostReqListDir( PVBOXSFFOLDER pFolder, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir,1160 DECLINLINE(int) vboxSfOs2HostReqListDir(SHFLROOT idRoot, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir, 1161 1161 PSHFLSTRING pFilter, uint32_t fFlags, PSHFLDIRINFO pBuffer, uint32_t cbBuffer) 1162 1162 { … … 1165 1165 1166 1166 pReq->Parms.id32Root.type = VMMDevHGCMParmType_32bit; 1167 pReq->Parms.id32Root.u.value32 = pFolder->hHostFolder.root;1167 pReq->Parms.id32Root.u.value32 = idRoot; 1168 1168 1169 1169 pReq->Parms.u64Handle.type = VMMDevHGCMParmType_64bit;
Note:
See TracChangeset
for help on using the changeset viewer.