mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Implemented VfatGetUserBuffer and VfatLockUserBuffer.
svn path=/trunk/; revision=2913
This commit is contained in:
parent
cc92156f65
commit
2ca90e6988
1 changed files with 35 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: misc.c,v 1.1 2001/11/02 22:44:34 hbirr Exp $
|
/* $Id: misc.c,v 1.2 2002/05/05 20:19:45 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -205,5 +205,39 @@ NTSTATUS VfatQueueRequest(PVFAT_IRP_CONTEXT IrpContext)
|
||||||
return STATUS_PENDING;
|
return STATUS_PENDING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PVOID VfatGetUserBuffer(IN PIRP Irp)
|
||||||
|
{
|
||||||
|
assert(Irp);
|
||||||
|
|
||||||
|
if (Irp->MdlAddress)
|
||||||
|
{
|
||||||
|
return MmGetSystemAddressForMdl(Irp->MdlAddress);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Irp->UserBuffer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS VfatLockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation)
|
||||||
|
{
|
||||||
|
assert(Irp);
|
||||||
|
|
||||||
|
if (Irp->MdlAddress)
|
||||||
|
{
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
IoAllocateMdl(Irp->UserBuffer, Length, FALSE, FALSE, Irp);
|
||||||
|
|
||||||
|
if (!Irp->MdlAddress)
|
||||||
|
{
|
||||||
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
}
|
||||||
|
|
||||||
|
MmProbeAndLockPages(Irp->MdlAddress, Irp->RequestorMode, Operation);
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue