- Timestamp:
- Apr 24, 2019 4:29:00 PM (6 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/SharedFolders/driver
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/file.c
r78279 r78280 238 238 PVOID pbUserBuffer = RxLowIoGetBufferAddress(RxContext); 239 239 240 int v boxRC;240 int vrc; 241 241 242 242 #ifdef LOG_ENABLED … … 293 293 ctx.pfnTransferPages = vbsfTransferPagesRead; 294 294 295 v boxRC= vbsfTransferCommon(&ctx);295 vrc = vbsfTransferCommon(&ctx); 296 296 297 297 ByteCount = ctx.cbData; 298 298 299 Status = VBoxErrorToNTStatus(v boxRC);299 Status = VBoxErrorToNTStatus(vrc); 300 300 301 301 if (Status != STATUS_SUCCESS) … … 363 363 PVOID pbUserBuffer = RxLowIoGetBufferAddress(RxContext); 364 364 365 int v boxRC;365 int vrc; 366 366 367 367 #ifdef LOG_ENABLED … … 398 398 ctx.pfnTransferPages = vbsfTransferPagesWrite; 399 399 400 v boxRC= vbsfTransferCommon(&ctx);400 vrc = vbsfTransferCommon(&ctx); 401 401 402 402 ByteCount = ctx.cbData; 403 403 404 Status = VBoxErrorToNTStatus(v boxRC);404 Status = VBoxErrorToNTStatus(vrc); 405 405 406 406 if (Status != STATUS_SUCCESS) … … 462 462 PLOWIO_CONTEXT LowIoContext = &RxContext->LowIoContext; 463 463 uint32_t fu32Lock = 0; 464 int v boxRC;464 int vrc; 465 465 466 466 Log(("VBOXSF: MRxLocks: Operation %d\n", … … 498 498 fu32Lock |= SHFL_LOCK_WAIT; 499 499 500 v boxRC= VbglR0SfLock(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,501 502 503 Status = VBoxErrorToNTStatus(v boxRC);500 vrc = VbglR0SfLock(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 501 LowIoContext->ParamsFor.Locks.ByteOffset, LowIoContext->ParamsFor.Locks.Length, fu32Lock); 502 503 Status = VBoxErrorToNTStatus(vrc); 504 504 505 505 Log(("VBOXSF: MRxLocks: Returned 0x%08X\n", Status)); … … 526 526 PMRX_VBOX_FOBX pVBoxFobx = VBoxMRxGetFileObjectExtension(capFobx); 527 527 528 int v boxRC;528 int vrc; 529 529 530 530 Log(("VBOXSF: MRxFlush\n")); 531 531 532 532 /* Do the actual flushing of file buffers */ 533 v boxRC= VbglR0SfFlush(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile);534 535 Status = VBoxErrorToNTStatus(v boxRC);533 vrc = VbglR0SfFlush(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile); 534 535 Status = VBoxErrorToNTStatus(vrc); 536 536 537 537 Log(("VBOXSF: MRxFlush: Returned 0x%08X\n", Status)); … … 554 554 PSHFLFSOBJINFO pObjInfo; 555 555 uint32_t cbBuffer; 556 int v boxRC;556 int vrc; 557 557 558 558 Log(("VBOXSF: vbsfSetEndOfFile: New size = %RX64 (%p), pNewAllocationSize = %p\n", … … 572 572 pObjInfo->cbObject = pNewFileSize->QuadPart; 573 573 574 v boxRC= VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,575 576 577 Log(("VBOXSF: vbsfSetEndOfFile: VbglR0SfFsInfo returned %Rrc\n", v boxRC));578 579 Status = VBoxErrorToNTStatus(v boxRC);574 vrc = VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 575 SHFL_INFO_SET | SHFL_INFO_SIZE, &cbBuffer, (PSHFLDIRINFO)pObjInfo); 576 577 Log(("VBOXSF: vbsfSetEndOfFile: VbglR0SfFsInfo returned %Rrc\n", vrc)); 578 579 Status = VBoxErrorToNTStatus(vrc); 580 580 if (Status == STATUS_SUCCESS) 581 581 { -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.c
r76553 r78280 50 50 51 51 LONG cbToCopy; 52 int v boxRC;52 int vrc; 53 53 uint8_t *pHGCMBuffer; 54 54 uint32_t index, fSFFlags, cFiles, u32BufSize; … … 178 178 Log(("VBOXSF: MrxQueryDirectory: CallDirInfo: File = 0x%08x, Flags = 0x%08x, Index = %d, u32BufSize = %d\n", 179 179 pVBoxFobx->hFile, fSFFlags, index, u32BufSize)); 180 v boxRC= VbglR0SfDirInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,181 180 vrc = VbglR0SfDirInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 181 ParsedPath, fSFFlags, index, &u32BufSize, (PSHFLDIRINFO)pHGCMBuffer, &cFiles); 182 182 Log(("VBOXSF: MrxQueryDirectory: u32BufSize after CallDirInfo = %d, rc = %Rrc\n", 183 u32BufSize, v boxRC));184 185 switch (v boxRC)183 u32BufSize, vrc)); 184 185 switch (vrc) 186 186 { 187 187 case VINF_SUCCESS: … … 222 222 223 223 default: 224 Status = VBoxErrorToNTStatus(v boxRC);224 Status = VBoxErrorToNTStatus(vrc); 225 225 Log(("VBOXSF: MrxQueryDirectory: Error %Rrc from CallDirInfo (cFiles=%d)!\n", 226 v boxRC, cFiles));226 vrc, cFiles)); 227 227 break; 228 228 } … … 555 555 uint32_t cbHGCMBuffer; 556 556 uint8_t *pHGCMBuffer; 557 int v boxRC;557 int vrc; 558 558 559 559 Log(("VBOXSF: MrxQueryVolumeInfo: FileFsVolumeInformation\n")); … … 600 600 } 601 601 602 v boxRC= VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,603 604 605 if (v boxRC!= VINF_SUCCESS)606 { 607 Status = VBoxErrorToNTStatus(v boxRC);602 vrc = VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 603 SHFL_INFO_GET | SHFL_INFO_VOLUME, &cbHGCMBuffer, (PSHFLDIRINFO)pHGCMBuffer); 604 605 if (vrc != VINF_SUCCESS) 606 { 607 Status = VBoxErrorToNTStatus(vrc); 608 608 vbsfFreeNonPagedMem(pHGCMBuffer); 609 609 break; … … 731 731 uint32_t cbHGCMBuffer; 732 732 uint8_t *pHGCMBuffer; 733 int v boxRC;733 int vrc; 734 734 PSHFLVOLINFO pShflVolInfo; 735 735 … … 773 773 } 774 774 775 v boxRC= VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,776 777 778 if (v boxRC!= VINF_SUCCESS)779 { 780 Status = VBoxErrorToNTStatus(v boxRC);775 vrc = VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 776 SHFL_INFO_GET | SHFL_INFO_VOLUME, &cbHGCMBuffer, (PSHFLDIRINFO)pHGCMBuffer); 777 778 if (vrc != VINF_SUCCESS) 779 { 780 Status = VBoxErrorToNTStatus(vrc); 781 781 vbsfFreeNonPagedMem(pHGCMBuffer); 782 782 break; … … 939 939 ULONG *pLengthRemaining = (PULONG) & RxContext->Info.LengthRemaining; 940 940 941 int v boxRC= 0;941 int vrc = 0; 942 942 943 943 ULONG cbToCopy = 0; … … 1106 1106 1107 1107 Assert(pVBoxFobx && pNetRootExtension && pDeviceExtension); 1108 v boxRC= VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,1109 1110 1111 if (v boxRC!= VINF_SUCCESS)1112 { 1113 Status = VBoxErrorToNTStatus(v boxRC);1108 vrc = VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 1109 SHFL_INFO_GET | SHFL_INFO_FILE, &cbHGCMBuffer, (PSHFLDIRINFO)pHGCMBuffer); 1110 1111 if (vrc != VINF_SUCCESS) 1112 { 1113 Status = VBoxErrorToNTStatus(vrc); 1114 1114 goto end; 1115 1115 } … … 1352 1352 PVOID pInfoBuffer = (PVOID)RxContext->Info.Buffer; 1353 1353 1354 int v boxRC;1354 int vrc; 1355 1355 1356 1356 uint8_t *pHGCMBuffer = NULL; … … 1437 1437 1438 1438 Assert(pVBoxFobx && pNetRootExtension && pDeviceExtension); 1439 v boxRC= VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,1440 1441 1442 if (v boxRC!= VINF_SUCCESS)1443 { 1444 Status = VBoxErrorToNTStatus(v boxRC);1439 vrc = VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 1440 SHFL_INFO_SET | SHFL_INFO_FILE, &cbBuffer, (PSHFLDIRINFO)pSHFLFileInfo); 1441 1442 if (vrc != VINF_SUCCESS) 1443 { 1444 Status = VBoxErrorToNTStatus(vrc); 1445 1445 goto end; 1446 1446 } -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/net.c
r76553 r78280 166 166 PWCHAR pRootName; 167 167 ULONG RootNameLength; 168 int v boxRC;168 int vrc; 169 169 PSHFLSTRING ParsedPath = 0; 170 170 … … 204 204 } 205 205 206 v boxRC= VbglR0SfMapFolder(&pDeviceExtension->hgcmClient, ParsedPath, &pNetRootExtension->map);206 vrc = VbglR0SfMapFolder(&pDeviceExtension->hgcmClient, ParsedPath, &pNetRootExtension->map); 207 207 vbsfFreeNonPagedMem(ParsedPath); 208 if (v boxRC!= VINF_SUCCESS)208 if (vrc != VINF_SUCCESS) 209 209 { 210 Log(("VBOXSF: MRxCreateVNetRoot: VbglR0SfMapFolder failed with %d\n", v boxRC));210 Log(("VBOXSF: MRxCreateVNetRoot: VbglR0SfMapFolder failed with %d\n", vrc)); 211 211 Status = STATUS_BAD_NETWORK_NAME; 212 212 } … … 261 261 if (pNetRootExtension->phgcmClient) 262 262 { 263 int v boxRC= VbglR0SfUnmapFolder(pNetRootExtension->phgcmClient, &pNetRootExtension->map);264 if (v boxRC!= VINF_SUCCESS)263 int vrc = VbglR0SfUnmapFolder(pNetRootExtension->phgcmClient, &pNetRootExtension->map); 264 if (vrc != VINF_SUCCESS) 265 265 Log(("VBOXSF: MRxFinalizeVNetRoot: VbglR0SfUnmapFolder failed with %d\n", 266 v boxRC));266 vrc)); 267 267 pNetRootExtension->phgcmClient = NULL; 268 268 } -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.c
r78279 r78280 38 38 PMRX_VBOX_NETROOT_EXTENSION pNetRootExtension = VBoxMRxGetNetRootExtension(capFcb->pNetRoot); 39 39 40 int v boxRC= VINF_SUCCESS;40 int vrc = VINF_SUCCESS; 41 41 42 42 /* Various boolean flags. */ … … 263 263 /* Call host. */ 264 264 Log(("VBOXSF: vbsfProcessCreate: VbglR0SfCreate called.\n")); 265 v boxRC= VbglR0SfCreate(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, ParsedPath, pCreateParms);265 vrc = VbglR0SfCreate(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, ParsedPath, pCreateParms); 266 266 267 267 vbsfFreeNonPagedMem(ParsedPath); 268 268 } 269 269 270 Log(("VBOXSF: vbsfProcessCreate: VbglR0SfCreate returns v boxRC= %Rrc, Result = 0x%x\n",271 v boxRC, pCreateParms->Result));272 273 if (RT_FAILURE(v boxRC))270 Log(("VBOXSF: vbsfProcessCreate: VbglR0SfCreate returns vrc = %Rrc, Result = 0x%x\n", 271 vrc, pCreateParms->Result)); 272 273 if (RT_FAILURE(vrc)) 274 274 { 275 275 /* Map some VBoxRC to STATUS codes expected by the system. */ 276 switch (v boxRC)276 switch (vrc) 277 277 { 278 278 case VERR_ALREADY_EXISTS: … … 294 294 { 295 295 *pulCreateAction = FILE_DOES_NOT_EXIST; 296 Status = VBoxErrorToNTStatus(v boxRC);296 Status = VBoxErrorToNTStatus(vrc); 297 297 goto failure; 298 298 } … … 663 663 NTSTATUS Status = STATUS_SUCCESS; 664 664 665 int v boxRC;665 int vrc; 666 666 PSHFLFSOBJINFO pSHFLFileInfo; 667 667 … … 704 704 pSHFLFileInfo->Attr.fMode = NTToVBoxFileAttributes(pInfo->FileAttributes); 705 705 706 v boxRC= VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,707 708 709 if (v boxRC!= VINF_SUCCESS)710 Status = VBoxErrorToNTStatus(v boxRC);706 vrc = VbglR0SfFsInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, 707 SHFL_INFO_SET | SHFL_INFO_FILE, &cbBuffer, (PSHFLDIRINFO)pSHFLFileInfo); 708 709 if (vrc != VINF_SUCCESS) 710 Status = VBoxErrorToNTStatus(vrc); 711 711 712 712 if (pHGCMBuffer) … … 727 727 NTSTATUS Status = STATUS_SUCCESS; 728 728 729 int v boxRC;729 int vrc; 730 730 731 731 if (pVBoxFobx->hFile == SHFL_HANDLE_NIL) … … 750 750 } 751 751 752 v boxRC= VbglR0SfClose(&pDeviceExtension->hgcmClient,753 754 752 vrc = VbglR0SfClose(&pDeviceExtension->hgcmClient, 753 &pNetRootExtension->map, 754 pVBoxFobx->hFile); 755 755 756 756 pVBoxFobx->hFile = SHFL_HANDLE_NIL; 757 757 758 if (v boxRC!= VINF_SUCCESS)759 Status = VBoxErrorToNTStatus(v boxRC);758 if (vrc != VINF_SUCCESS) 759 Status = VBoxErrorToNTStatus(vrc); 760 760 761 761 Log(("VBOXSF: vbsfCloseFileHandle: Returned 0x%08X\n", Status)); … … 827 827 PUNICODE_STRING RemainingName = GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(RxContext); 828 828 829 int v boxRC;829 int vrc; 830 830 PSHFLSTRING ParsedPath = NULL; 831 831 … … 843 843 844 844 /* Call host. */ 845 v boxRC= VbglR0SfRemove(&pDeviceExtension->hgcmClient, &pNetRootExtension->map,846 847 845 vrc = VbglR0SfRemove(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, 846 ParsedPath, 847 (pVBoxFobx->FileStandardInfo.Directory) ? SHFL_REMOVE_DIR : SHFL_REMOVE_FILE); 848 848 849 849 if (ParsedPath) 850 850 vbsfFreeNonPagedMem(ParsedPath); 851 851 852 if (v boxRC== VINF_SUCCESS)852 if (vrc == VINF_SUCCESS) 853 853 SetFlag(capFobx->pSrvOpen->Flags, SRVOPEN_FLAG_FILE_DELETED); 854 854 855 Status = VBoxErrorToNTStatus(v boxRC);856 if (v boxRC!= VINF_SUCCESS)857 Log(("VBOXSF: vbsfRemove: VbglR0SfRemove failed with %Rrc\n", v boxRC));855 Status = VBoxErrorToNTStatus(vrc); 856 if (vrc != VINF_SUCCESS) 857 Log(("VBOXSF: vbsfRemove: VbglR0SfRemove failed with %Rrc\n", vrc)); 858 858 859 859 Log(("VBOXSF: vbsfRemove: Returned 0x%08X\n", Status)); … … 879 879 PUNICODE_STRING RemainingName = GET_ALREADY_PREFIXED_NAME(pSrvOpen, capFcb); 880 880 881 int v boxRC;881 int vrc; 882 882 PSHFLSTRING SrcPath = 0, DestPath = 0; 883 883 ULONG flags; … … 922 922 923 923 Log(("VBOXSF: vbsfRename: Calling VbglR0SfRename\n")); 924 v boxRC= VbglR0SfRename(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, SrcPath, DestPath, flags);924 vrc = VbglR0SfRename(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, SrcPath, DestPath, flags); 925 925 926 926 vbsfFreeNonPagedMem(SrcPath); 927 927 vbsfFreeNonPagedMem(DestPath); 928 928 929 Status = VBoxErrorToNTStatus(v boxRC);930 if (v boxRC!= VINF_SUCCESS)931 Log(("VBOXSF: vbsfRename: VbglR0SfRename failed with %Rrc\n", v boxRC));929 Status = VBoxErrorToNTStatus(vrc); 930 if (vrc != VINF_SUCCESS) 931 Log(("VBOXSF: vbsfRename: VbglR0SfRename failed with %Rrc\n", vrc)); 932 932 933 933 Log(("VBOXSF: vbsfRename: Returned 0x%08X\n", Status)); -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.c
r76553 r78280 406 406 PMRX_VBOX_DEVICE_EXTENSION pDeviceExtension = NULL; 407 407 ULONG i; 408 int v boxRC;408 int vrc; 409 409 VBGLSFCLIENT hgcmClient; 410 410 … … 418 418 419 419 /* Initialize VBox subsystem. */ 420 v boxRC= VbglR0SfInit();421 if (RT_FAILURE(v boxRC))422 { 423 Log(("VBOXSF: DriverEntry: ERROR while initializing VBox subsystem (%Rrc)!\n", v boxRC));420 vrc = VbglR0SfInit(); 421 if (RT_FAILURE(vrc)) 422 { 423 Log(("VBOXSF: DriverEntry: ERROR while initializing VBox subsystem (%Rrc)!\n", vrc)); 424 424 return STATUS_UNSUCCESSFUL; 425 425 } … … 427 427 /* Connect the HGCM client */ 428 428 RT_ZERO(hgcmClient); 429 v boxRC= VbglR0SfConnect(&hgcmClient);430 if (RT_FAILURE(v boxRC))429 vrc = VbglR0SfConnect(&hgcmClient); 430 if (RT_FAILURE(vrc)) 431 431 { 432 432 Log(("VBOXSF: DriverEntry: ERROR while connecting to host (%Rrc)!\n", 433 v boxRC));433 vrc)); 434 434 VbglR0SfTerm(); 435 435 return STATUS_UNSUCCESSFUL; … … 704 704 uint8_t *pu8Out = (uint8_t *)LowIoContext->ParamsFor.IoCtl.pOutputBuffer; 705 705 706 int v boxRC;706 int vrc; 707 707 SHFLMAPPING mappings[_MRX_MAX_DRIVE_LETTERS]; 708 708 uint32_t cMappings = RT_ELEMENTS(mappings); … … 719 719 } 720 720 721 v boxRC= VbglR0SfQueryMappings(&pDeviceExtension->hgcmClient, mappings, &cMappings);722 if (v boxRC== VINF_SUCCESS)721 vrc = VbglR0SfQueryMappings(&pDeviceExtension->hgcmClient, mappings, &cMappings); 722 if (vrc == VINF_SUCCESS) 723 723 { 724 724 __try … … 743 743 else 744 744 { 745 Status = VBoxErrorToNTStatus(v boxRC);745 Status = VBoxErrorToNTStatus(vrc); 746 746 Log(("VBOXSF: MRxDevFcbXXXControlFile: IOCTL_MRX_VBOX_GETGLOBALLIST failed: 0x%08X\n", 747 747 Status)); … … 846 846 PWCHAR pwcRemoteName = (PWCHAR)LowIoContext->ParamsFor.IoCtl.pOutputBuffer; 847 847 848 int v boxRC;848 int vrc; 849 849 PSHFLSTRING pString; 850 850 … … 870 870 *pu8ConnectId)); 871 871 872 v boxRC= VbglR0SfQueryMapName(&pDeviceExtension->hgcmClient,873 (*pu8ConnectId)& ~0x80 /** @todo fix properly */,874 875 if ( v boxRC== VINF_SUCCESS872 vrc = VbglR0SfQueryMapName(&pDeviceExtension->hgcmClient, 873 *pu8ConnectId & ~0x80 /** @todo fix properly */, 874 pString, ShflStringSizeOfBuffer(pString)); 875 if ( vrc == VINF_SUCCESS 876 876 && pString->u16Length < cbRemoteName) 877 877 { -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsfhlp.c
r78279 r78280 104 104 * 105 105 * @returns NT status code 106 * @param v boxRC VBox error code107 * 108 */ 109 NTSTATUS VBoxErrorToNTStatus(int v boxRC)106 * @param vrc VBox status code. 107 * 108 */ 109 NTSTATUS VBoxErrorToNTStatus(int vrc) 110 110 { 111 111 NTSTATUS Status; 112 112 113 switch (v boxRC)113 switch (vrc) 114 114 { 115 115 case VINF_SUCCESS: … … 192 192 Status = STATUS_INVALID_PARAMETER; 193 193 Log(("Unexpected vbox error %Rrc\n", 194 v boxRC));194 vrc)); 195 195 break; 196 196 } -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsfhlp.h
r78279 r78280 34 34 uint32_t VBoxToNTFileAttributes(uint32_t fIprtMode); 35 35 uint32_t NTToVBoxFileAttributes(uint32_t fNtAttribs); 36 37 /** 38 * Convert VBox error code to NT status code 39 * 40 * @returns NT status code 41 * @param vboxRC VBox error code 42 * 43 */ 44 NTSTATUS VBoxErrorToNTStatus(int vboxRC); 36 NTSTATUS VBoxErrorToNTStatus(int vrc); 45 37 46 38 PVOID vbsfAllocNonPagedMem(ULONG ulSize);
Note:
See TracChangeset
for help on using the changeset viewer.