read.c revision 78a072e1b56619e3230735ae073668311232ec94
/*++
Copyright (c) 1989 - 1999 Microsoft Corporation
Module Name:
Abstract:
This module implements the mini redirector call down routines pertaining to read
of file system objects.
--*/
#include "precomp.h"
#include "rdbss_vbox.h"
#pragma hdrstop
/*++
Routine Description:
This routine handles network read requests.
Arguments:
RxContext - the RDBSS context
Return Value:
NTSTATUS - The return status for the operation
--*/
{
#ifndef VBOX
#endif
//
// NB: This should be done by the wrapper ! It does this
// only if READCACHING is enabled on the FCB !!
//
#else
#endif
{
//
// If the read starts beyond End of File, return EOF.
//
if (ByteOffset >= FileSize)
{
Log(("VBOXSF: VBoxMRxRead: End of File\n", 0 ));
goto Exit;
}
//
// If the read extends beyond EOF, truncate the read
//
{
}
}
Assert((OriginalDataMdl != NULL && (RxMdlIsLocked(OriginalDataMdl) || RxMdlSourceIsNonPaged(OriginalDataMdl))) || (OriginalDataMdl == NULL && LowIoContext->ParamsFor.ReadWrite.ByteCount == 0));
{
AssertFailed();
return STATUS_INVALID_PARAMETER;
}
/* @todo async io !!!! */
if (SynchronousIo)
{
int vboxRC;
/* Do the actual reading */
#ifdef VBOX_FAKE_IO_READ_WRITE
#else
vboxRC = vboxCallRead(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, ByteOffset, &ByteCount, (uint8_t *)pbUserBuffer, true /* locked */);
#endif
if (Status != STATUS_SUCCESS)
ByteCount = 0; /* Nothing read */
Log(("VBOXSF: VBoxMRxRead: This I/O is sync!\n"));
/* Never call RxLowIoCompletion here!! */
}
else
{
Log(("VBOXSF: VBoxMRxRead: This I/O is async!\n"));
}
Log(("VBOXSF: VBoxMRxRead: Status = %x Info = %x\n",RxContext->IoStatusBlock.Status,RxContext->IoStatusBlock.Information));
Exit:
return (Status);
}
{
Log(("VBOXSF: VBoxMRxReadWorker: calling the worker\n"));
}
#ifdef VBOX_ASYNC_RW
{
if (Status == STATUS_SUCCESS)
{
}
return Status;
}
#else
{
}
#endif /* !VBOX_ASYNC_RW */