Changeset 78326 in vbox for trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.cpp
- Timestamp:
- Apr 26, 2019 2:45:38 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.cpp
r78321 r78326 141 141 142 142 /* Initialize create parameters. */ 143 pCreateParms = (SHFLCREATEPARMS *)vbsf AllocNonPagedMem(sizeof(SHFLCREATEPARMS));143 pCreateParms = (SHFLCREATEPARMS *)vbsfNtAllocNonPagedMem(sizeof(SHFLCREATEPARMS)); 144 144 if (!pCreateParms) 145 145 { … … 265 265 if (!bf.SlashHack) 266 266 { 267 Status = vbsf ShflStringFromUnicodeAlloc(&ParsedPath, RemainingName->Buffer, RemainingName->Length);267 Status = vbsfNtShflStringFromUnicodeAlloc(&ParsedPath, RemainingName->Buffer, RemainingName->Length); 268 268 if (Status != STATUS_SUCCESS) 269 269 goto failure; … … 272 272 { 273 273 /* Add back the slash we had to hide from RDBSS. */ 274 Status = vbsf ShflStringFromUnicodeAlloc(&ParsedPath, NULL, RemainingName->Length + sizeof(RTUTF16));274 Status = vbsfNtShflStringFromUnicodeAlloc(&ParsedPath, NULL, RemainingName->Length + sizeof(RTUTF16)); 275 275 if (Status != STATUS_SUCCESS) 276 276 goto failure; … … 288 288 vrc = VbglR0SfCreate(&g_SfClient, &pNetRootExtension->map, ParsedPath, pCreateParms); 289 289 290 vbsf FreeNonPagedMem(ParsedPath);290 vbsfNtFreeNonPagedMem(ParsedPath); 291 291 } 292 292 … … 321 321 { 322 322 *pulCreateAction = FILE_DOES_NOT_EXIST; 323 Status = VBoxErrorToNTStatus(vrc);323 Status = vbsfNtVBoxStatusToNt(vrc); 324 324 goto failure; 325 325 } … … 436 436 *pInfo = pCreateParms->Info; 437 437 438 vbsf FreeNonPagedMem(pCreateParms);438 vbsfNtFreeNonPagedMem(pCreateParms); 439 439 440 440 return Status; … … 452 452 453 453 if (pCreateParms) 454 vbsf FreeNonPagedMem(pCreateParms);454 vbsfNtFreeNonPagedMem(pCreateParms); 455 455 456 456 return Status; … … 689 689 690 690 cbBuffer = sizeof(SHFLFSOBJINFO); 691 pHGCMBuffer = (uint8_t *)vbsf AllocNonPagedMem(cbBuffer);691 pHGCMBuffer = (uint8_t *)vbsfNtAllocNonPagedMem(cbBuffer); 692 692 if (!pHGCMBuffer) 693 693 { … … 714 714 715 715 if (vrc != VINF_SUCCESS) 716 Status = VBoxErrorToNTStatus(vrc);716 Status = vbsfNtVBoxStatusToNt(vrc); 717 717 718 718 if (pHGCMBuffer) 719 vbsf FreeNonPagedMem(pHGCMBuffer);719 vbsfNtFreeNonPagedMem(pHGCMBuffer); 720 720 721 721 Log(("VBOXSF: vbsfSetFileInfo: Returned 0x%08X\n", Status)); … … 761 761 762 762 if (vrc != VINF_SUCCESS) 763 Status = VBoxErrorToNTStatus(vrc);763 Status = vbsfNtVBoxStatusToNt(vrc); 764 764 765 765 Log(("VBOXSF: vbsfCloseFileHandle: Returned 0x%08X\n", Status)); … … 811 811 /* Remove file or directory if delete action is pending. */ 812 812 if (capFcb->OpenCount == 0) 813 Status = vbsf Remove(RxContext);813 Status = vbsfNtRemove(RxContext); 814 814 } 815 815 … … 817 817 } 818 818 819 NTSTATUS vbsf Remove(IN PRX_CONTEXT RxContext)819 NTSTATUS vbsfNtRemove(IN PRX_CONTEXT RxContext) 820 820 { 821 821 NTSTATUS Status = STATUS_SUCCESS; … … 832 832 PSHFLSTRING ParsedPath = NULL; 833 833 834 Log(("VBOXSF: vbsf Remove: Delete %.*ls. open count = %d\n",834 Log(("VBOXSF: vbsfNtRemove: Delete %.*ls. open count = %d\n", 835 835 RemainingName->Length / sizeof(WCHAR), RemainingName->Buffer, capFcb->OpenCount)); 836 836 … … 839 839 vbsfCloseFileHandle(pNetRootExtension, pVBoxFobx); 840 840 841 Log(("VBOXSF: vbsf Remove: RemainingName->Length %d\n", RemainingName->Length));842 Status = vbsf ShflStringFromUnicodeAlloc(&ParsedPath, RemainingName->Buffer, RemainingName->Length);841 Log(("VBOXSF: vbsfNtRemove: RemainingName->Length %d\n", RemainingName->Length)); 842 Status = vbsfNtShflStringFromUnicodeAlloc(&ParsedPath, RemainingName->Buffer, RemainingName->Length); 843 843 if (Status != STATUS_SUCCESS) 844 844 return Status; … … 850 850 851 851 if (ParsedPath) 852 vbsf FreeNonPagedMem(ParsedPath);852 vbsfNtFreeNonPagedMem(ParsedPath); 853 853 854 854 if (vrc == VINF_SUCCESS) 855 855 SetFlag(capFobx->pSrvOpen->Flags, SRVOPEN_FLAG_FILE_DELETED); 856 856 857 Status = VBoxErrorToNTStatus(vrc);857 Status = vbsfNtVBoxStatusToNt(vrc); 858 858 if (vrc != VINF_SUCCESS) 859 Log(("VBOXSF: vbsf Remove: VbglR0SfRemove failed with %Rrc\n", vrc));860 861 Log(("VBOXSF: vbsf Remove: Returned 0x%08X\n", Status));859 Log(("VBOXSF: vbsfNtRemove: VbglR0SfRemove failed with %Rrc\n", vrc)); 860 861 Log(("VBOXSF: vbsfNtRemove: Returned 0x%08X\n", Status)); 862 862 return Status; 863 863 } 864 864 865 NTSTATUS vbsf Rename(IN PRX_CONTEXT RxContext,865 NTSTATUS vbsfNtRename(IN PRX_CONTEXT RxContext, 866 866 IN FILE_INFORMATION_CLASS FileInformationClass, 867 867 IN PVOID pBuffer, … … 888 888 Assert(FileInformationClass == FileRenameInformation); 889 889 890 Log(("VBOXSF: vbsf Rename: FileName = %.*ls\n",890 Log(("VBOXSF: vbsfNtRename: FileName = %.*ls\n", 891 891 RenameInformation->FileNameLength / sizeof(WCHAR), &RenameInformation->FileName[0])); 892 892 … … 898 898 SetFlag(pSrvOpen->Flags, SRVOPEN_FLAG_FILE_RENAMED); 899 899 900 Log(("VBOXSF: vbsf Rename: RenameInformation->FileNameLength = %d\n", RenameInformation->FileNameLength));901 Status = vbsf ShflStringFromUnicodeAlloc(&DestPath, RenameInformation->FileName, (uint16_t)RenameInformation->FileNameLength);900 Log(("VBOXSF: vbsfNtRename: RenameInformation->FileNameLength = %d\n", RenameInformation->FileNameLength)); 901 Status = vbsfNtShflStringFromUnicodeAlloc(&DestPath, RenameInformation->FileName, (uint16_t)RenameInformation->FileNameLength); 902 902 if (Status != STATUS_SUCCESS) 903 903 return Status; 904 904 905 Log(("VBOXSF: vbsf Rename: Destination path = %.*ls\n",905 Log(("VBOXSF: vbsfNtRename: Destination path = %.*ls\n", 906 906 DestPath->u16Length / sizeof(WCHAR), &DestPath->String.ucs2[0])); 907 907 908 Log(("VBOXSF: vbsf Rename: RemainingName->Length = %d\n", RemainingName->Length));909 Status = vbsf ShflStringFromUnicodeAlloc(&SrcPath, RemainingName->Buffer, RemainingName->Length);908 Log(("VBOXSF: vbsfNtRename: RemainingName->Length = %d\n", RemainingName->Length)); 909 Status = vbsfNtShflStringFromUnicodeAlloc(&SrcPath, RemainingName->Buffer, RemainingName->Length); 910 910 if (Status != STATUS_SUCCESS) 911 911 { 912 vbsf FreeNonPagedMem(DestPath);912 vbsfNtFreeNonPagedMem(DestPath); 913 913 return Status; 914 914 } 915 915 916 Log(("VBOXSF: vbsf Rename: Source path = %.*ls\n",916 Log(("VBOXSF: vbsfNtRename: Source path = %.*ls\n", 917 917 SrcPath->u16Length / sizeof(WCHAR), &SrcPath->String.ucs2[0])); 918 918 … … 922 922 flags |= SHFL_RENAME_REPLACE_IF_EXISTS; 923 923 924 Log(("VBOXSF: vbsf Rename: Calling VbglR0SfRename\n"));924 Log(("VBOXSF: vbsfNtRename: Calling VbglR0SfRename\n")); 925 925 vrc = VbglR0SfRename(&g_SfClient, &pNetRootExtension->map, SrcPath, DestPath, flags); 926 926 927 vbsf FreeNonPagedMem(SrcPath);928 vbsf FreeNonPagedMem(DestPath);929 930 Status = VBoxErrorToNTStatus(vrc);927 vbsfNtFreeNonPagedMem(SrcPath); 928 vbsfNtFreeNonPagedMem(DestPath); 929 930 Status = vbsfNtVBoxStatusToNt(vrc); 931 931 if (vrc != VINF_SUCCESS) 932 Log(("VBOXSF: vbsf Rename: VbglR0SfRename failed with %Rrc\n", vrc));933 934 Log(("VBOXSF: vbsf Rename: Returned 0x%08X\n", Status));932 Log(("VBOXSF: vbsfNtRename: VbglR0SfRename failed with %Rrc\n", vrc)); 933 934 Log(("VBOXSF: vbsfNtRename: Returned 0x%08X\n", Status)); 935 935 return Status; 936 936 }
Note:
See TracChangeset
for help on using the changeset viewer.