Changeset 76716 in vbox for trunk/include
- Timestamp:
- Jan 8, 2019 11:36:02 PM (6 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLibSharedFoldersInline.h
r76715 r76716 1 /* *$Id$ */1 /* $Id$ */ 2 2 /** @file 3 * VBox SF - OS/2 Shared Folder IFS, Internal Header.3 * VBoxGuestLib - Shared Folders Host Request Helpers (ring-0). 4 4 */ 5 5 6 6 /* 7 * Copyright ( c) 2007 knut st. osmundsen <[email protected]>7 * Copyright (C) 2006-2019 Oracle Corporation 8 8 * 9 9 * Permission is hereby granted, free of charge, to any person … … 22 22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 23 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 25 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 26 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING … … 29 29 */ 30 30 31 #ifndef GA_INCLUDED_SRC_os2_VBoxSF_VBoxSFInternal_h32 #define GA_INCLUDED_SRC_os2_VBoxSF_VBoxSFInternal_h31 #ifndef VBOX_INCLUDED_VBoxGuestLibSharedFoldersInline_h 32 #define VBOX_INCLUDED_VBoxGuestLibSharedFoldersInline_h 33 33 #ifndef RT_WITHOUT_PRAGMA_ONCE 34 34 # pragma once 35 35 #endif 36 36 37 38 #define INCL_BASE39 #define INCL_ERROR40 #define INCL_LONGLONG41 #define OS2EMX_PLAIN_CHAR42 #include <os2ddk/bsekee.h>43 #include <os2ddk/devhlp.h>44 #include <os2ddk/unikern.h>45 #include <os2ddk/fsd.h>46 #undef RT_MAX47 48 37 #include <iprt/types.h> 49 38 #include <iprt/assert.h> 50 #include <iprt/list.h> 39 #include <VBox/shflsvc.h> 40 #include <VBox/VBoxGuest.h> 41 #include <VBox/VBoxGuestLib.h> 51 42 #include <VBox/VBoxGuestLibSharedFolders.h> 52 #include <VBox/VBoxGuest.h> 53 54 55 /** Allocation header used by RTMemAlloc. 56 * This should be subtracted from round numbers. */ 57 #define ALLOC_HDR_SIZE (0x10 + 4) 58 59 60 /** 61 * A shared folder 62 */ 63 typedef struct VBOXSFFOLDER 64 { 65 /** For the shared folder list. */ 66 RTLISTNODE ListEntry; 67 /** Magic number (VBOXSFFOLDER_MAGIC). */ 68 uint32_t u32Magic; 69 /** Number of active references to this folder. */ 70 uint32_t volatile cRefs; 71 /** Number of open files referencing this folder. */ 72 uint32_t volatile cOpenFiles; 73 /** Number of open searches referencing this folder. */ 74 uint32_t volatile cOpenSearches; 75 /** Number of drives this is attached to. */ 76 uint8_t volatile cDrives; 77 78 /** The host folder handle. */ 79 SHFLROOT idHostRoot; 80 81 /** OS/2 volume handle. */ 82 USHORT hVpb; 83 84 /** The length of the name and tag, including zero terminators and such. */ 85 uint16_t cbNameAndTag; 86 /** The length of the folder name. */ 87 uint8_t cchName; 88 /** The shared folder name. If there is a tag it follows as a second string. */ 89 char szName[RT_FLEXIBLE_ARRAY]; 90 } VBOXSFFOLDER; 91 /** Pointer to a shared folder. */ 92 typedef VBOXSFFOLDER *PVBOXSFFOLDER; 93 /** Magic value for VBOXSFVP (Neal Town Stephenson). */ 94 #define VBOXSFFOLDER_MAGIC UINT32_C(0x19591031) 95 96 /** The shared mutex protecting folders list, drives and the connection. */ 97 extern MutexLock_t g_MtxFolders; 98 /** List of active folder (PVBOXSFFOLDER). */ 99 extern RTLISTANCHOR g_FolderHead; 100 101 102 /** 103 * VBoxSF Volume Parameter Structure. 104 * 105 * @remarks Overlays the 36 byte VPFSD structure (fsd.h). 106 * @note No self pointer as the kernel may reallocate these. 107 */ 108 typedef struct VBOXSFVP 109 { 110 /** Magic value (VBOXSFVP_MAGIC). */ 111 uint32_t u32Magic; 112 /** The folder. */ 113 PVBOXSFFOLDER pFolder; 114 } VBOXSFVP; 115 AssertCompile(sizeof(VBOXSFVP) <= sizeof(VPFSD)); 116 /** Pointer to a VBOXSFVP struct. */ 117 typedef VBOXSFVP *PVBOXSFVP; 118 /** Magic value for VBOXSFVP (Laurence van Cott Niven). */ 119 #define VBOXSFVP_MAGIC UINT32_C(0x19380430) 120 121 122 /** 123 * VBoxSF Current Directory Structure. 124 * 125 * @remark Overlays the 8 byte CDFSD structure (fsd.h). 126 */ 127 typedef struct VBOXSFCD 128 { 129 uint32_t u32Dummy; 130 } VBOXSFCD; 131 AssertCompile(sizeof(VBOXSFCD) <= sizeof(CDFSD)); 132 /** Pointer to a VBOXSFCD struct. */ 133 typedef VBOXSFCD *PVBOXSFCD; 134 135 136 /** 137 * VBoxSF System File Structure. 138 * 139 * @remark Overlays the 30 byte SFFSD structure (fsd.h). 140 */ 141 typedef struct VBOXSFSYFI 142 { 143 /** Magic value (VBOXSFSYFI_MAGIC). */ 144 uint32_t u32Magic; 145 /** Self pointer for quick 16:16 to flat translation. */ 146 struct VBOXSFSYFI *pSelf; 147 /** The host file handle. */ 148 SHFLHANDLE hHostFile; 149 /** The shared folder (referenced). */ 150 PVBOXSFFOLDER pFolder; 151 } VBOXSFSYFI; 152 AssertCompile(sizeof(VBOXSFSYFI) <= sizeof(SFFSD)); 153 /** Pointer to a VBOXSFSYFI struct. */ 154 typedef VBOXSFSYFI *PVBOXSFSYFI; 155 /** Magic value for VBOXSFSYFI (Jon Ellis Meacham). */ 156 #define VBOXSFSYFI_MAGIC UINT32_C(0x19690520) 157 158 159 /** Request structure for vboxSfOs2HostReqListDir. */ 160 typedef struct VBOXSFLISTDIRREQ 161 { 162 VBGLIOCIDCHGCMFASTCALL Hdr; 163 VMMDevHGCMCall Call; 164 VBoxSFParmList Parms; 165 HGCMPageListInfo StrPgLst; 166 HGCMPageListInfo BufPgLst; 167 } VBOXSFLISTDIRREQ; 168 169 /** 170 * More file search data (on physical heap). 171 */ 172 typedef struct VBOXSFFSBUF /**< @todo rename as is no longer buffer. */ 173 { 174 /** The request (must be first). */ 175 VBOXSFLISTDIRREQ Req; 176 /** A magic number (VBOXSFFSBUF_MAGIC). */ 177 uint32_t u32Magic; 178 /** The filter string (full path), NULL if all files are request. */ 179 PSHFLSTRING pFilter; 180 /** Size of the buffer for directory entries. */ 181 uint32_t cbBuf; 182 /** Buffer for directory entries on the physical heap. */ 183 PSHFLDIRINFO pBuf; 184 /** Must have attributes (shifted down DOS attributes). */ 185 uint8_t fMustHaveAttribs; 186 /** Non-matching attributes (shifted down DOS attributes). */ 187 uint8_t fExcludedAttribs; 188 /** Set if FF_ATTR_LONG_FILENAME. */ 189 bool fLongFilenames : 1; 190 uint8_t bPadding1; 191 /** The local time offset to use for this search. */ 192 int16_t cMinLocalTimeDelta; 193 uint8_t abPadding2[2]; 194 /** Number of valid bytes in the buffer. */ 195 uint32_t cbValid; 196 /** Number of entries left in the buffer. */ 197 uint32_t cEntriesLeft; 198 /** The next entry. */ 199 PSHFLDIRINFO pEntry; 200 //uint32_t uPadding3; 201 /** Staging area for staging a full FILEFINDBUF4L (+ 32 safe bytes). */ 202 uint8_t abStaging[RT_ALIGN_32(sizeof(FILEFINDBUF4L) + 32, 8)]; 203 } VBOXSFFSBUF; 204 /** Pointer to a file search buffer. */ 205 typedef VBOXSFFSBUF *PVBOXSFFSBUF; 206 /** Magic number for VBOXSFFSBUF (Robert Anson Heinlein). */ 207 #define VBOXSFFSBUF_MAGIC UINT32_C(0x19070707) 208 209 210 /** 211 * VBoxSF File Search Structure. 212 * 213 * @remark Overlays the 24 byte FSFSD structure (fsd.h). 214 * @note No self pointer as the kernel may reallocate these. 215 */ 216 typedef struct VBOXSFFS 217 { 218 /** Magic value (VBOXSFFS_MAGIC). */ 219 uint32_t u32Magic; 220 /** The last file position position. */ 221 uint32_t offLastFile; 222 /** The host directory handle. */ 223 SHFLHANDLE hHostDir; 224 /** The shared folder (referenced). */ 225 PVBOXSFFOLDER pFolder; 226 /** Search data buffer. */ 227 PVBOXSFFSBUF pBuf; 228 } VBOXSFFS; 229 AssertCompile(sizeof(VBOXSFFS) <= sizeof(FSFSD)); 230 /** Pointer to a VBOXSFFS struct. */ 231 typedef VBOXSFFS *PVBOXSFFS; 232 /** Magic number for VBOXSFFS (Isaak Azimov). */ 233 #define VBOXSFFS_MAGIC UINT32_C(0x19200102) 234 235 236 extern VBGLSFCLIENT g_SfClient; 237 extern uint32_t g_fHostFeatures; 238 239 void vboxSfOs2InitFileBuffers(void); 240 PSHFLSTRING vboxSfOs2StrAlloc(size_t cwcLength); 241 PSHFLSTRING vboxSfOs2StrDup(PCSHFLSTRING pSrc); 242 void vboxSfOs2StrFree(PSHFLSTRING pStr); 243 244 APIRET vboxSfOs2ResolvePath(const char *pszPath, PVBOXSFCD pCdFsd, LONG offCurDirEnd, 245 PVBOXSFFOLDER *ppFolder, PSHFLSTRING *ppStrFolderPath); 246 APIRET vboxSfOs2ResolvePathEx(const char *pszPath, PVBOXSFCD pCdFsd, LONG offCurDirEnd, uint32_t offStrInBuf, 247 PVBOXSFFOLDER *ppFolder, void **ppvBuf); 248 void vboxSfOs2ReleasePathAndFolder(PSHFLSTRING pStrPath, PVBOXSFFOLDER pFolder); 249 void vboxSfOs2ReleaseFolder(PVBOXSFFOLDER pFolder); 250 APIRET vboxSfOs2ConvertStatusToOs2(int vrc, APIRET rcDefault); 251 int16_t vboxSfOs2GetLocalTimeDelta(void); 252 void vboxSfOs2DateTimeFromTimeSpec(FDATE *pDosDate, FTIME *pDosTime, RTTIMESPEC SrcTimeSpec, int16_t cMinLocalTimeDelta); 253 PRTTIMESPEC vboxSfOs2DateTimeToTimeSpec(FDATE DosDate, FTIME DosTime, int16_t cMinLocalTimeDelta, PRTTIMESPEC pDstTimeSpec); 254 APIRET vboxSfOs2FileStatusFromObjInfo(PBYTE pbDst, ULONG cbDst, ULONG uLevel, SHFLFSOBJINFO const *pSrc); 255 APIRET vboxSfOs2SetInfoCommonWorker(PVBOXSFFOLDER pFolder, SHFLHANDLE hHostFile, ULONG fAttribs, 256 PFILESTATUS pTimestamps, PSHFLFSOBJINFO pObjInfoBuf, uint32_t offObjInfoInAlloc); 257 APIRET vboxSfOs2MakeEmptyEaList(PEAOP pEaOp, ULONG uLevel); 258 APIRET vboxSfOs2MakeEmptyEaListEx(PEAOP pEaOp, ULONG uLevel, uint32_t *pcbWritten, ULONG *poffError); 259 260 DECLASM(PVBOXSFVP) Fsh32GetVolParams(USHORT hVbp, PVPFSI *ppVpFsi /*optional*/); 261 262 263 /** @name Host request helpers 43 #include <VBox/VMMDev.h> 44 #include <iprt/errcore.h> 45 46 47 /** @defgroup grp_vboxguest_lib_r0_sf_inline Shared Folders Host Request Helpers 48 * @ingroup grp_vboxguest_lib_r0 264 49 * 265 50 * @todo generalize these and put back into VbglR0Sf. … … 267 52 * @{ */ 268 53 269 #include <iprt/err.h> 270 271 /** Request structure for vboxSfOs2HostReqMapFolderWithBuf. */ 54 /** VMMDEV_HVF_XXX (set during init). */ 55 extern uint32_t g_fHostFeatures; 56 extern VBGLSFCLIENT g_SfClient; /**< Move this into the parameters. */ 57 58 /** Request structure for VbglR0SfHostReqMapFolderWithBuf. */ 272 59 typedef struct VBOXSFMAPFOLDERWITHBUFREQ 273 60 { … … 281 68 * SHFL_FN_MAP_FOLDER request. 282 69 */ 283 DECLINLINE(int) vboxSfOs2HostReqMapFolderWithBuf(VBOXSFMAPFOLDERWITHBUFREQ *pReq, PSHFLSTRING pStrName,284 70 DECLINLINE(int) VbglR0SfHostReqMapFolderWithBuf(VBOXSFMAPFOLDERWITHBUFREQ *pReq, PSHFLSTRING pStrName, 71 RTUTF16 wcDelimiter, bool fCaseSensitive) 285 72 { 286 73 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 334 121 * SHFL_FN_UNMAP_FOLDER request. 335 122 */ 336 DECLINLINE(int) vboxSfOs2HostReqUnmapFolderSimple(uint32_t idRoot)123 DECLINLINE(int) VbglR0SfHostReqUnmapFolderSimple(uint32_t idRoot) 337 124 { 338 125 VBOXSFUNMAPFOLDERREQ *pReq = (VBOXSFUNMAPFOLDERREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); … … 356 143 357 144 358 /** Request structure for vboxSfOs2HostReqCreate. */145 /** Request structure for VbglR0SfHostReqCreate. */ 359 146 typedef struct VBOXSFCREATEREQ 360 147 { … … 369 156 * SHFL_FN_CREATE request. 370 157 */ 371 DECLINLINE(int) vboxSfOs2HostReqCreate(SHFLROOT idRoot, VBOXSFCREATEREQ *pReq)158 DECLINLINE(int) VbglR0SfHostReqCreate(SHFLROOT idRoot, VBOXSFCREATEREQ *pReq) 372 159 { 373 160 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 410 197 411 198 412 /** Request structure for vboxSfOs2HostReqClose. */199 /** Request structure for VbglR0SfHostReqClose. */ 413 200 typedef struct VBOXSFCLOSEREQ 414 201 { … … 421 208 * SHFL_FN_CLOSE request. 422 209 */ 423 DECLINLINE(int) vboxSfOs2HostReqClose(SHFLROOT idRoot, VBOXSFCLOSEREQ *pReq, uint64_t hHostFile)210 DECLINLINE(int) VbglR0SfHostReqClose(SHFLROOT idRoot, VBOXSFCLOSEREQ *pReq, uint64_t hHostFile) 424 211 { 425 212 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 441 228 * SHFL_FN_CLOSE request, allocate request buffer. 442 229 */ 443 DECLINLINE(int) vboxSfOs2HostReqCloseSimple(SHFLROOT idRoot, uint64_t hHostFile)230 DECLINLINE(int) VbglR0SfHostReqCloseSimple(SHFLROOT idRoot, uint64_t hHostFile) 444 231 { 445 232 VBOXSFCLOSEREQ *pReq = (VBOXSFCLOSEREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 446 233 if (pReq) 447 234 { 448 int vrc = vboxSfOs2HostReqClose(idRoot, pReq, hHostFile);235 int vrc = VbglR0SfHostReqClose(idRoot, pReq, hHostFile); 449 236 VbglR0PhysHeapFree(pReq); 450 237 return vrc; … … 454 241 455 242 456 /** Request structure for vboxSfOs2HostReqQueryVolInfo. */243 /** Request structure for VbglR0SfHostReqQueryVolInfo. */ 457 244 typedef struct VBOXSFVOLINFOREQ 458 245 { … … 466 253 * SHFL_FN_INFORMATION[SHFL_INFO_VOLUME | SHFL_INFO_GET] request. 467 254 */ 468 DECLINLINE(int) vboxSfOs2HostReqQueryVolInfo(SHFLROOT idRoot, VBOXSFVOLINFOREQ *pReq, uint64_t hHostFile)255 DECLINLINE(int) VbglR0SfHostReqQueryVolInfo(SHFLROOT idRoot, VBOXSFVOLINFOREQ *pReq, uint64_t hHostFile) 469 256 { 470 257 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 506 293 507 294 508 /** Request structure for vboxSfOs2HostReqSetObjInfo & vboxSfOs2HostReqQueryObjInfo. */295 /** Request structure for VbglR0SfHostReqSetObjInfo & VbglR0SfHostReqQueryObjInfo. */ 509 296 typedef struct VBOXSFOBJINFOREQ 510 297 { … … 518 305 * SHFL_FN_INFORMATION[SHFL_INFO_GET | SHFL_INFO_FILE] request. 519 306 */ 520 DECLINLINE(int) vboxSfOs2HostReqQueryObjInfo(SHFLROOT idRoot, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile)307 DECLINLINE(int) VbglR0SfHostReqQueryObjInfo(SHFLROOT idRoot, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile) 521 308 { 522 309 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 561 348 * SHFL_FN_INFORMATION[SHFL_INFO_SET | SHFL_INFO_FILE] request. 562 349 */ 563 DECLINLINE(int) vboxSfOs2HostReqSetObjInfo(SHFLROOT idRoot, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile)350 DECLINLINE(int) VbglR0SfHostReqSetObjInfo(SHFLROOT idRoot, VBOXSFOBJINFOREQ *pReq, uint64_t hHostFile) 564 351 { 565 352 uint32_t const cbReq = g_fHostFeatures & VMMDEV_HVF_HGCM_EMBEDDED_BUFFERS … … 601 388 602 389 603 /** Request structure for vboxSfOs2HostReqSetObjInfo. */390 /** Request structure for VbglR0SfHostReqSetObjInfo. */ 604 391 typedef struct VBOXSFOBJINFOWITHBUFREQ 605 392 { … … 614 401 * buffer (on the physical heap). 615 402 */ 616 DECLINLINE(int) vboxSfOs2HostReqSetObjInfoWithBuf(SHFLROOT idRoot, VBOXSFOBJINFOWITHBUFREQ *pReq, uint64_t hHostFile,617 403 DECLINLINE(int) VbglR0SfHostReqSetObjInfoWithBuf(SHFLROOT idRoot, VBOXSFOBJINFOWITHBUFREQ *pReq, uint64_t hHostFile, 404 PSHFLFSOBJINFO pObjInfo, uint32_t offObjInfoInAlloc) 618 405 { 619 406 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 657 444 658 445 659 /** Request structure for vboxSfOs2HostReqRemove. */446 /** Request structure for VbglR0SfHostReqRemove. */ 660 447 typedef struct VBOXSFREMOVEREQ 661 448 { … … 669 456 * SHFL_FN_REMOVE request. 670 457 */ 671 DECLINLINE(int) vboxSfOs2HostReqRemove(SHFLROOT idRoot, VBOXSFREMOVEREQ *pReq, uint32_t fFlags)458 DECLINLINE(int) VbglR0SfHostReqRemove(SHFLROOT idRoot, VBOXSFREMOVEREQ *pReq, uint32_t fFlags) 672 459 { 673 460 uint32_t const cbReq = RT_UOFFSETOF(VBOXSFREMOVEREQ, StrPath.String) … … 716 503 * SHFL_FN_REMOVE request. 717 504 */ 718 DECLINLINE(int) vboxSfOs2HostReqRenameWithSrcBuf(SHFLROOT idRoot, VBOXSFRENAMEWITHSRCBUFREQ *pReq,719 505 DECLINLINE(int) VbglR0SfHostReqRenameWithSrcBuf(SHFLROOT idRoot, VBOXSFRENAMEWITHSRCBUFREQ *pReq, 506 PSHFLSTRING pSrcStr, uint32_t fFlags) 720 507 { 721 508 uint32_t const cbReq = RT_UOFFSETOF(VBOXSFRENAMEWITHSRCBUFREQ, StrDstPath.String) … … 771 558 772 559 773 /** Request structure for vboxSfOs2HostReqFlush. */560 /** Request structure for VbglR0SfHostReqFlush. */ 774 561 typedef struct VBOXSFFLUSHREQ 775 562 { … … 782 569 * SHFL_FN_FLUSH request. 783 570 */ 784 DECLINLINE(int) vboxSfOs2HostReqFlush(SHFLROOT idRoot, VBOXSFFLUSHREQ *pReq, uint64_t hHostFile)571 DECLINLINE(int) VbglR0SfHostReqFlush(SHFLROOT idRoot, VBOXSFFLUSHREQ *pReq, uint64_t hHostFile) 785 572 { 786 573 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 802 589 * SHFL_FN_FLUSH request, allocate request buffer. 803 590 */ 804 DECLINLINE(int) vboxSfOs2HostReqFlushSimple(SHFLROOT idRoot, uint64_t hHostFile)591 DECLINLINE(int) VbglR0SfHostReqFlushSimple(SHFLROOT idRoot, uint64_t hHostFile) 805 592 { 806 593 VBOXSFFLUSHREQ *pReq = (VBOXSFFLUSHREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 807 594 if (pReq) 808 595 { 809 int vrc = vboxSfOs2HostReqFlush(idRoot, pReq, hHostFile);596 int vrc = VbglR0SfHostReqFlush(idRoot, pReq, hHostFile); 810 597 VbglR0PhysHeapFree(pReq); 811 598 return vrc; … … 815 602 816 603 817 /** Request structure for vboxSfOs2HostReqSetFileSize. */604 /** Request structure for VbglR0SfHostReqSetFileSize. */ 818 605 typedef struct VBOXSFSETFILESIZEREQ 819 606 { … … 826 613 * SHFL_FN_SET_FILE_SIZE request. 827 614 */ 828 DECLINLINE(int) vboxSfOs2HostReqSetFileSize(SHFLROOT idRoot, VBOXSFSETFILESIZEREQ *pReq, 829 uint64_t hHostFile, uint64_t cbNewSize) 615 DECLINLINE(int) VbglR0SfHostReqSetFileSize(SHFLROOT idRoot, VBOXSFSETFILESIZEREQ *pReq, uint64_t hHostFile, uint64_t cbNewSize) 830 616 { 831 617 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 850 636 * SHFL_FN_SET_FILE_SIZE request, allocate request buffer. 851 637 */ 852 DECLINLINE(int) vboxSfOs2HostReqSetFileSizeSimple(SHFLROOT idRoot, uint64_t hHostFile, uint64_t cbNewSize)638 DECLINLINE(int) VbglR0SfHostReqSetFileSizeSimple(SHFLROOT idRoot, uint64_t hHostFile, uint64_t cbNewSize) 853 639 { 854 640 VBOXSFSETFILESIZEREQ *pReq = (VBOXSFSETFILESIZEREQ *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 855 641 if (pReq) 856 642 { 857 int vrc = vboxSfOs2HostReqSetFileSize(idRoot, pReq, hHostFile, cbNewSize);643 int vrc = VbglR0SfHostReqSetFileSize(idRoot, pReq, hHostFile, cbNewSize); 858 644 VbglR0PhysHeapFree(pReq); 859 645 return vrc; … … 863 649 864 650 865 /** Request structure for vboxSfOs2HostReqReadEmbedded. */651 /** Request structure for VbglR0SfHostReqReadEmbedded. */ 866 652 typedef struct VBOXSFREADEMBEDDEDREQ 867 653 { … … 875 661 * SHFL_FN_READ request using embedded data buffer. 876 662 */ 877 DECLINLINE(int) vboxSfOs2HostReqReadEmbedded(SHFLROOT idRoot, VBOXSFREADEMBEDDEDREQ *pReq, uint64_t hHostFile,878 663 DECLINLINE(int) VbglR0SfHostReqReadEmbedded(SHFLROOT idRoot, VBOXSFREADEMBEDDEDREQ *pReq, uint64_t hHostFile, 664 uint64_t offRead, uint32_t cbToRead) 879 665 { 880 666 uint32_t const cbReq = RT_UOFFSETOF(VBOXSFREADEMBEDDEDREQ, abData[0]) … … 916 702 917 703 918 /** Request structure for vboxSfOs2HostReqRead & vboxSfOs2HostReqReadContig. */704 /** Request structure for vboxSfOs2HostReqRead & VbglR0SfHostReqReadContig. */ 919 705 typedef struct VBOXSFREADPGLSTREQ 920 706 { … … 928 714 * SHFL_FN_READ request using page list for data buffer (caller populated). 929 715 */ 930 DECLINLINE(int) vboxSfOs2HostReqReadPgLst(SHFLROOT idRoot, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile,931 716 DECLINLINE(int) VbglR0SfHostReqReadPgLst(SHFLROOT idRoot, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile, 717 uint64_t offRead, uint32_t cbToRead, uint32_t cPages) 932 718 { 933 719 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 966 752 * SHFL_FN_READ request using a physically contiguous buffer. 967 753 */ 968 DECLINLINE(int) vboxSfOs2HostReqReadContig(SHFLROOT idRoot, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile,754 DECLINLINE(int) VbglR0SfHostReqReadContig(SHFLROOT idRoot, VBOXSFREADPGLSTREQ *pReq, uint64_t hHostFile, 969 755 uint64_t offRead, uint32_t cbToRead, void *pvBuffer, RTGCPHYS64 PhysBuffer) 970 756 { … … 1009 795 1010 796 1011 /** Request structure for vboxSfOs2HostReqWriteEmbedded. */797 /** Request structure for VbglR0SfHostReqWriteEmbedded. */ 1012 798 typedef struct VBOXSFWRITEEMBEDDEDREQ 1013 799 { … … 1021 807 * SHFL_FN_WRITE request using embedded data buffer. 1022 808 */ 1023 DECLINLINE(int) vboxSfOs2HostReqWriteEmbedded(SHFLROOT idRoot, VBOXSFWRITEEMBEDDEDREQ *pReq, uint64_t hHostFile,1024 809 DECLINLINE(int) VbglR0SfHostReqWriteEmbedded(SHFLROOT idRoot, VBOXSFWRITEEMBEDDEDREQ *pReq, uint64_t hHostFile, 810 uint64_t offWrite, uint32_t cbToWrite) 1025 811 { 1026 812 uint32_t const cbReq = RT_UOFFSETOF(VBOXSFWRITEEMBEDDEDREQ, abData[0]) … … 1062 848 1063 849 1064 /** Request structure for vboxSfOs2HostReqWrite and vboxSfOs2HostReqWriteContig. */850 /** Request structure for vboxSfOs2HostReqWrite and VbglR0SfHostReqWriteContig. */ 1065 851 typedef struct VBOXSFWRITEPGLSTREQ 1066 852 { … … 1074 860 * SHFL_FN_WRITE request using page list for data buffer (caller populated). 1075 861 */ 1076 DECLINLINE(int) vboxSfOs2HostReqWritePgLst(SHFLROOT idRoot, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile,1077 862 DECLINLINE(int) VbglR0SfHostReqWritePgLst(SHFLROOT idRoot, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile, 863 uint64_t offWrite, uint32_t cbToWrite, uint32_t cPages) 1078 864 { 1079 865 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 1112 898 * SHFL_FN_WRITE request using a physically contiguous buffer. 1113 899 */ 1114 DECLINLINE(int) vboxSfOs2HostReqWriteContig(SHFLROOT idRoot, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile,1115 900 DECLINLINE(int) VbglR0SfHostReqWriteContig(SHFLROOT idRoot, VBOXSFWRITEPGLSTREQ *pReq, uint64_t hHostFile, 901 uint64_t offWrite, uint32_t cbToWrite, void const *pvBuffer, RTGCPHYS64 PhysBuffer) 1116 902 { 1117 903 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 1153 939 } 1154 940 941 /** Request structure for vboxSfOs2HostReqListDir. */ 942 typedef struct VBOXSFLISTDIRREQ 943 { 944 VBGLIOCIDCHGCMFASTCALL Hdr; 945 VMMDevHGCMCall Call; 946 VBoxSFParmList Parms; 947 HGCMPageListInfo StrPgLst; 948 HGCMPageListInfo BufPgLst; 949 } VBOXSFLISTDIRREQ; 1155 950 1156 951 /** … … 1158 953 * both allocated on the physical heap. 1159 954 */ 1160 DECLINLINE(int) vboxSfOs2HostReqListDir(SHFLROOT idRoot, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir,1161 955 DECLINLINE(int) VbglR0SfHostReqListDir(SHFLROOT idRoot, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir, 956 PSHFLSTRING pFilter, uint32_t fFlags, PSHFLDIRINFO pBuffer, uint32_t cbBuffer) 1162 957 { 1163 958 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 1232 1027 /** @} */ 1233 1028 1234 #endif /* ! GA_INCLUDED_SRC_os2_VBoxSF_VBoxSFInternal_h */1235 1029 #endif /* !VBOX_INCLUDED_VBoxGuestLibSharedFoldersInline_h */ 1030
Note:
See TracChangeset
for help on using the changeset viewer.