VirtualBox

Ignore:
Timestamp:
Apr 26, 2019 2:45:38 PM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: Cleaned up the vbsfhlp.cpp code, removing a few unused functions and such. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/file.cpp

    r78321 r78326  
    302302    ByteCount = ctx.cbData;
    303303
    304     Status = VBoxErrorToNTStatus(vrc);
     304    Status = vbsfNtVBoxStatusToNt(vrc);
    305305
    306306    if (Status != STATUS_SUCCESS)
     
    418418    ByteCount = ctx.cbData;
    419419
    420     Status = VBoxErrorToNTStatus(vrc);
     420    Status = vbsfNtVBoxStatusToNt(vrc);
    421421
    422422    if (Status != STATUS_SUCCESS)
     
    516516                       LowIoContext->ParamsFor.Locks.ByteOffset, LowIoContext->ParamsFor.Locks.Length, fu32Lock);
    517517
    518     Status = VBoxErrorToNTStatus(vrc);
     518    Status = vbsfNtVBoxStatusToNt(vrc);
    519519
    520520    Log(("VBOXSF: MRxLocks: Returned 0x%08X\n", Status));
     
    547547    vrc = VbglR0SfFlush(&g_SfClient, &pNetRootExtension->map, pVBoxFobx->hFile);
    548548
    549     Status = VBoxErrorToNTStatus(vrc);
     549    Status = vbsfNtVBoxStatusToNt(vrc);
    550550
    551551    Log(("VBOXSF: MRxFlush: Returned 0x%08X\n", Status));
     
    553553}
    554554
    555 NTSTATUS vbsfSetEndOfFile(IN OUT struct _RX_CONTEXT * RxContext,
     555NTSTATUS vbsfNtSetEndOfFile(IN OUT struct _RX_CONTEXT * RxContext,
    556556                          IN OUT PLARGE_INTEGER pNewFileSize,
    557557                          OUT PLARGE_INTEGER pNewAllocationSize)
     
    569569    int vrc;
    570570
    571     Log(("VBOXSF: vbsfSetEndOfFile: New size = %RX64 (%p), pNewAllocationSize = %p\n",
     571    Log(("VBOXSF: vbsfNtSetEndOfFile: New size = %RX64 (%p), pNewAllocationSize = %p\n",
    572572         pNewFileSize->QuadPart, pNewFileSize, pNewAllocationSize));
    573573
     
    575575
    576576    cbBuffer = sizeof(SHFLFSOBJINFO);
    577     pObjInfo = (SHFLFSOBJINFO *)vbsfAllocNonPagedMem(cbBuffer);
     577    pObjInfo = (SHFLFSOBJINFO *)vbsfNtAllocNonPagedMem(cbBuffer);
    578578    if (!pObjInfo)
    579579    {
     
    588588                         SHFL_INFO_SET | SHFL_INFO_SIZE, &cbBuffer, (PSHFLDIRINFO)pObjInfo);
    589589
    590     Log(("VBOXSF: vbsfSetEndOfFile: VbglR0SfFsInfo returned %Rrc\n", vrc));
    591 
    592     Status = VBoxErrorToNTStatus(vrc);
     590    Log(("VBOXSF: vbsfNtSetEndOfFile: VbglR0SfFsInfo returned %Rrc\n", vrc));
     591
     592    Status = vbsfNtVBoxStatusToNt(vrc);
    593593    if (Status == STATUS_SUCCESS)
    594594    {
    595         Log(("VBOXSF: vbsfSetEndOfFile: VbglR0SfFsInfo new allocation size = %RX64\n",
     595        Log(("VBOXSF: vbsfNtSetEndOfFile: VbglR0SfFsInfo new allocation size = %RX64\n",
    596596             pObjInfo->cbAllocated));
    597597
     
    601601
    602602    if (pObjInfo)
    603         vbsfFreeNonPagedMem(pObjInfo);
    604 
    605     Log(("VBOXSF: vbsfSetEndOfFile: Returned 0x%08X\n", Status));
     603        vbsfNtFreeNonPagedMem(pObjInfo);
     604
     605    Log(("VBOXSF: vbsfNtSetEndOfFile: Returned 0x%08X\n", Status));
    606606    return Status;
    607607}
     
    618618    RT_NOREF(RxContext);
    619619
    620     /* Note: On Windows hosts vbsfSetEndOfFile returns ACCESS_DENIED if the file has been
     620    /* Note: On Windows hosts vbsfNtSetEndOfFile returns ACCESS_DENIED if the file has been
    621621     *       opened in APPEND mode. Writes to a file will extend it anyway, therefore it is
    622622     *       better to not call the host at all and tell the caller that the file was extended.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette