mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
1e3d5d70e9
svn path=/trunk/; revision=26033
45 lines
1,004 B
C
45 lines
1,004 B
C
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS kernel
|
|
* FILE: services/fs/minix/cache.c
|
|
* PURPOSE: Minix FSD
|
|
* PROGRAMMER: David Welch (welch@mcmail.com)
|
|
* UPDATE HISTORY:
|
|
*/
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
#include <ntddk.h>
|
|
#include <ntifs.h>
|
|
|
|
//#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
#include "minix.h"
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
NTSTATUS MinixRequestCacheBlock(PDEVICE_OBJECT DeviceObject,
|
|
PBCB Bcb,
|
|
ULONG FileOffset,
|
|
PVOID* BaseAddress,
|
|
PCACHE_SEGMENT* CacheSeg)
|
|
{
|
|
BOOLEAN UptoDate;
|
|
|
|
CcRosRequestCacheSegment(Bcb,
|
|
FileOffset,
|
|
BaseAddress,
|
|
&UptoDate,
|
|
CacheSeg);
|
|
if (!UptoDate)
|
|
{
|
|
MinixReadPage(DeviceObject,
|
|
PAGE_ROUND_DOWN(FileOffset),
|
|
BaseAddress);
|
|
}
|
|
BaseAddress = BaseAddress + (FileOffset % PAGE_SIZE);
|
|
|
|
return(STATUS_SUCCESS);
|
|
}
|
|
|