ReactOS  0.4.15-dev-2700-g4b4ffa9
mcb.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for mcb.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOLEAN NTAPI FsRtlAddMcbEntry (IN PMCB Mcb, IN VBN Vbn, IN LBN Lbn, IN ULONG SectorCount)
 
BOOLEAN NTAPI FsRtlGetNextMcbEntry (IN PMCB Mcb, IN ULONG RunIndex, OUT PVBN Vbn, OUT PLBN Lbn, OUT PULONG SectorCount)
 
VOID NTAPI FsRtlInitializeMcb (IN PMCB Mcb, IN POOL_TYPE PoolType)
 
BOOLEAN NTAPI FsRtlLookupLastMcbEntry (IN PMCB Mcb, OUT PVBN Vbn, OUT PLBN Lbn)
 
BOOLEAN NTAPI FsRtlLookupMcbEntry (IN PMCB Mcb, IN VBN Vbn, OUT PLBN Lbn, OUT PULONG SectorCount OPTIONAL, OUT PULONG Index)
 
ULONG NTAPI FsRtlNumberOfRunsInMcb (IN PMCB Mcb)
 
VOID NTAPI FsRtlRemoveMcbEntry (IN PMCB Mcb, IN VBN Vbn, IN ULONG SectorCount)
 
VOID NTAPI FsRtlTruncateMcb (IN PMCB Mcb, IN VBN Vbn)
 
VOID NTAPI FsRtlUninitializeMcb (IN PMCB Mcb)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file mcb.c.

Function Documentation

◆ FsRtlAddMcbEntry()

BOOLEAN NTAPI FsRtlAddMcbEntry ( IN PMCB  Mcb,
IN VBN  Vbn,
IN LBN  Lbn,
IN ULONG  SectorCount 
)

Definition at line 22 of file mcb.c.

26 {
27  /* Call the newer function */
28  return FsRtlAddLargeMcbEntry(&Mcb->
29  DummyFieldThatSizesThisStructureCorrectly,
30  (LONGLONG)Vbn,
31  (LONGLONG)Lbn,
33 }
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
Definition: fsrtlfuncs.h:479
int64_t LONGLONG
Definition: typedefs.h:68
BOOLEAN NTAPI FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG SectorCount)
Definition: largemcb.c:288
ULONG SectorCount
Definition: part_xbox.c:31
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470

◆ FsRtlGetNextMcbEntry()

BOOLEAN NTAPI FsRtlGetNextMcbEntry ( IN PMCB  Mcb,
IN ULONG  RunIndex,
OUT PVBN  Vbn,
OUT PLBN  Lbn,
OUT PULONG  SectorCount 
)

Definition at line 40 of file mcb.c.

45 {
46  BOOLEAN Return = FALSE;
47  LONGLONG llVbn;
48  LONGLONG llLbn;
49  LONGLONG llSectorCount;
50 
51  /* Call the Large version */
53  &Mcb->DummyFieldThatSizesThisStructureCorrectly,
54  RunIndex,
55  &llVbn,
56  &llLbn,
57  &llSectorCount);
58 
59  /* Return the lower 32 bits */
60  *Vbn = (ULONG)llVbn;
61  *Lbn = (ULONG)llLbn;
62  *SectorCount = (ULONG)llSectorCount;
63 
64  /* And return the original value */
65  return Return;
66 }
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
Definition: fsrtlfuncs.h:479
_Must_inspect_result_ _In_ ULONG RunIndex
Definition: fsrtlfuncs.h:538
BOOLEAN NTAPI FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb, IN ULONG RunIndex, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG SectorCount)
Definition: largemcb.c:392
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
int64_t LONGLONG
Definition: typedefs.h:68
ULONG SectorCount
Definition: part_xbox.c:31
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470
unsigned int ULONG
Definition: retypes.h:1

◆ FsRtlInitializeMcb()

VOID NTAPI FsRtlInitializeMcb ( IN PMCB  Mcb,
IN POOL_TYPE  PoolType 
)

Definition at line 73 of file mcb.c.

75 {
76  /* Call the newer function */
77  FsRtlInitializeLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
78  PoolType);
79 }
VOID NTAPI FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb, IN POOL_TYPE PoolType)
Definition: largemcb.c:451
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810

◆ FsRtlLookupLastMcbEntry()

BOOLEAN NTAPI FsRtlLookupLastMcbEntry ( IN PMCB  Mcb,
OUT PVBN  Vbn,
OUT PLBN  Lbn 
)

Definition at line 86 of file mcb.c.

89 {
90  BOOLEAN Return = FALSE;
91  LONGLONG llVbn = 0;
92  LONGLONG llLbn = 0;
93 
94  /* Call the Large version */
96  &Mcb->DummyFieldThatSizesThisStructureCorrectly,
97  &llVbn,
98  &llLbn);
99 
100  /* Return the lower 32-bits */
101  *Vbn = (ULONG)llVbn;
102  *Lbn = (ULONG)llLbn;
103 
104  /* And return the original value */
105  return Return;
106 }
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
Definition: fsrtlfuncs.h:479
#define FALSE
Definition: types.h:117
BOOLEAN NTAPI FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn)
Definition: largemcb.c:718
unsigned char BOOLEAN
int64_t LONGLONG
Definition: typedefs.h:68
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470
unsigned int ULONG
Definition: retypes.h:1

◆ FsRtlLookupMcbEntry()

BOOLEAN NTAPI FsRtlLookupMcbEntry ( IN PMCB  Mcb,
IN VBN  Vbn,
OUT PLBN  Lbn,
OUT PULONG SectorCount  OPTIONAL,
OUT PULONG  Index 
)

Definition at line 113 of file mcb.c.

118 {
119  BOOLEAN Return = FALSE;
120  LONGLONG llLbn;
121  LONGLONG llSectorCount;
122 
123  /* Call the Large version */
124  Return = FsRtlLookupLargeMcbEntry(&Mcb->
125  DummyFieldThatSizesThisStructureCorrectly,
126  (LONGLONG)Vbn,
127  &llLbn,
128  &llSectorCount,
129  NULL,
130  NULL,
131  Index);
132 
133  /* Return the lower 32-bits */
134  *Lbn = (ULONG)llLbn;
135  if (SectorCount) *SectorCount = (ULONG)llSectorCount;
136 
137  /* And return the original value */
138  return Return;
139 }
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
Definition: fsrtlfuncs.h:479
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
int64_t LONGLONG
Definition: typedefs.h:68
_In_ WDFCOLLECTION _In_ ULONG Index
ULONG SectorCount
Definition: part_xbox.c:31
BOOLEAN NTAPI FsRtlLookupLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn OPTIONAL, OUT PLONGLONG SectorCountFromLbn OPTIONAL, OUT PLONGLONG StartingLbn OPTIONAL, OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL, OUT PULONG Index OPTIONAL)
Definition: largemcb.c:560
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
#define NULL
Definition: types.h:112
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470
unsigned int ULONG
Definition: retypes.h:1

◆ FsRtlNumberOfRunsInMcb()

ULONG NTAPI FsRtlNumberOfRunsInMcb ( IN PMCB  Mcb)

Definition at line 146 of file mcb.c.

147 {
148  /* Call the newer function */
150  &Mcb->DummyFieldThatSizesThisStructureCorrectly);
151 }
ULONG NTAPI FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb)
Definition: largemcb.c:765
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343

◆ FsRtlRemoveMcbEntry()

VOID NTAPI FsRtlRemoveMcbEntry ( IN PMCB  Mcb,
IN VBN  Vbn,
IN ULONG  SectorCount 
)

Definition at line 158 of file mcb.c.

161 {
162  /* Call the large function */
163  FsRtlRemoveLargeMcbEntry(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
164  (LONGLONG)Vbn,
166 }
VOID NTAPI FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG SectorCount)
Definition: largemcb.c:905
int64_t LONGLONG
Definition: typedefs.h:68
ULONG SectorCount
Definition: part_xbox.c:31
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470

◆ FsRtlTruncateMcb()

VOID NTAPI FsRtlTruncateMcb ( IN PMCB  Mcb,
IN VBN  Vbn 
)

Definition at line 173 of file mcb.c.

175 {
176  /* Call the newer function */
177  FsRtlTruncateLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly,
178  (LONGLONG)Vbn);
179 }
VOID NTAPI FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb, IN LONGLONG Vbn)
Definition: largemcb.c:1059
int64_t LONGLONG
Definition: typedefs.h:68
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470

◆ FsRtlUninitializeMcb()

VOID NTAPI FsRtlUninitializeMcb ( IN PMCB  Mcb)

Definition at line 186 of file mcb.c.

187 {
188  /* Call the newer function */
189  FsRtlUninitializeLargeMcb(&Mcb->DummyFieldThatSizesThisStructureCorrectly);
190 }
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:343
VOID NTAPI FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb)
Definition: largemcb.c:1096