ReactOS  0.4.14-dev-57-g333b8f1
filter.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for filter.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOLEAN NTAPI FsRtlIsTotalDeviceFailure (IN NTSTATUS NtStatus)
 
BOOLEAN NTAPI FsRtlIsNtstatusExpected (IN NTSTATUS NtStatus)
 
NTSTATUS NTAPI FsRtlNormalizeNtstatus (IN NTSTATUS NtStatusToNormalize, IN NTSTATUS NormalizedNtStatus)
 
PVOID NTAPI FsRtlAllocatePool (IN POOL_TYPE PoolType, IN ULONG NumberOfBytes)
 
PVOID NTAPI FsRtlAllocatePoolWithQuota (IN POOL_TYPE PoolType, IN ULONG NumberOfBytes)
 
PVOID NTAPI FsRtlAllocatePoolWithQuotaTag (IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
 
PVOID NTAPI FsRtlAllocatePoolWithTag (IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file filter.c.

Function Documentation

◆ FsRtlAllocatePool()

PVOID NTAPI FsRtlAllocatePool ( IN POOL_TYPE  PoolType,
IN ULONG  NumberOfBytes 
)

Definition at line 116 of file filter.c.

118 {
119  PVOID Address;
120 
123  IFS_POOL_TAG);
124 
125  if (NULL == Address)
126  {
128  }
129 
130  return Address;
131 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define ExRaiseStatus
Definition: ntoskrnl.h:95
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
#define IFS_POOL_TAG
Definition: tag.h:52
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444

◆ FsRtlAllocatePoolWithQuota()

PVOID NTAPI FsRtlAllocatePoolWithQuota ( IN POOL_TYPE  PoolType,
IN ULONG  NumberOfBytes 
)

Definition at line 152 of file filter.c.

154 {
155  PVOID Address;
156 
159  IFS_POOL_TAG);
160  if (NULL == Address)
161  {
163  }
164  return Address;
165 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
PVOID NTAPI ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
Definition: expool.c:2939
#define ExRaiseStatus
Definition: ntoskrnl.h:95
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
#define IFS_POOL_TAG
Definition: tag.h:52
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444

◆ FsRtlAllocatePoolWithQuotaTag()

PVOID NTAPI FsRtlAllocatePoolWithQuotaTag ( IN POOL_TYPE  PoolType,
IN ULONG  NumberOfBytes,
IN ULONG  Tag 
)

Definition at line 189 of file filter.c.

192 {
193  PVOID Address;
194 
197  Tag);
198 
199  if (NULL == Address)
200  {
202  }
203 
204  return Address;
205 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
PVOID NTAPI ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
Definition: expool.c:2939
#define ExRaiseStatus
Definition: ntoskrnl.h:95
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444

Referenced by FatBufferUserBuffer().

◆ FsRtlAllocatePoolWithTag()

PVOID NTAPI FsRtlAllocatePoolWithTag ( IN POOL_TYPE  PoolType,
IN ULONG  NumberOfBytes,
IN ULONG  Tag 
)

Definition at line 229 of file filter.c.

232 {
233  PVOID Address;
234 
237  Tag);
238 
239  if (NULL == Address)
240  {
242  }
243 
244  return Address;
245 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define ExRaiseStatus
Definition: ntoskrnl.h:95
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444

Referenced by _Requires_lock_held_(), _Success_(), CdAddAllocationFromDirent(), CdAllocateFcbTable(), CdCreateIrpContext(), CdInitializeEnumeration(), CdInitializeVcb(), CdMapPathTableBlock(), CdUpdateDirentName(), CdUpdatePathEntryName(), FatAllocateCcb(), FatAllocateFcb(), FatAppendPackedEa(), FatCommonSetEa(), FatConstructNamesInFcb(), FatCreateFcb(), FatEnsureStringBufferEnough(), FatExamineFatEntries(), FatPinEaRange(), FatPreallocateCloseContext(), FatRepinBcb(), FatScanForDataTrack(), FatSetFullNameInFcb(), FatSetRenameInfo(), FatSetupAllocationSupport(), FatVerifyLookupFatEntry(), and FsRtlInitSystem().

◆ FsRtlIsNtstatusExpected()

◆ FsRtlIsTotalDeviceFailure()

BOOLEAN NTAPI FsRtlIsTotalDeviceFailure ( IN NTSTATUS  NtStatus)

Definition at line 37 of file filter.c.

38 {
39  return((NT_SUCCESS(NtStatus)) ||
40  (STATUS_CRC_ERROR == NtStatus) ||
41  (STATUS_DEVICE_DATA_ERROR == NtStatus) ? FALSE : TRUE);
42 }
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_CRC_ERROR
Definition: udferr_usr.h:153
#define STATUS_DEVICE_DATA_ERROR
Definition: udferr_usr.h:159

Referenced by _Requires_lock_held_(), FatPagingFileErrorHandler(), and IopMountVolume().

◆ FsRtlNormalizeNtstatus()

NTSTATUS NTAPI FsRtlNormalizeNtstatus ( IN NTSTATUS  NtStatusToNormalize,
IN NTSTATUS  NormalizedNtStatus 
)

Definition at line 90 of file filter.c.

92 {
93  return(TRUE == FsRtlIsNtstatusExpected(NtStatusToNormalize)) ?
94  NtStatusToNormalize : NormalizedNtStatus;
95 }
BOOLEAN NTAPI FsRtlIsNtstatusExpected(IN NTSTATUS NtStatus)
Definition: filter.c:61
#define TRUE
Definition: types.h:120

Referenced by _Requires_lock_held_(), and CdRaiseStatusEx().