ReactOS 0.4.16-dev-297-gc569aee
fmtchk.c File Reference
#include "usetup.h"
#include <debug.h>
Include dependency graph for fmtchk.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

static BOOLEAN NTAPI FormatCallback (_In_ CALLBACKCOMMAND Command, _In_ ULONG Modifier, _In_ PVOID Argument)
 
VOID StartFormat (_Inout_ PFORMAT_VOLUME_INFO FmtInfo, _In_ PFILE_SYSTEM_ITEM SelectedFileSystem)
 
VOID EndFormat (_In_ NTSTATUS Status)
 
static BOOLEAN NTAPI ChkdskCallback (_In_ CALLBACKCOMMAND Command, _In_ ULONG Modifier, _In_ PVOID Argument)
 
VOID StartCheck (_Inout_ PCHECK_VOLUME_INFO ChkInfo)
 
VOID EndCheck (_In_ NTSTATUS Status)
 

Variables

static PPROGRESSBAR ProgressBar = NULL
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file fmtchk.c.

Function Documentation

◆ ChkdskCallback()

static BOOLEAN NTAPI ChkdskCallback ( _In_ CALLBACKCOMMAND  Command,
_In_ ULONG  Modifier,
_In_ PVOID  Argument 
)
static

Definition at line 111 of file fmtchk.c.

115{
116 switch (Command)
117 {
118 default:
119 DPRINT("Unknown callback %lu\n", (ULONG)Command);
120 break;
121 }
122
123 return TRUE;
124}
#define TRUE
Definition: types.h:120
#define DPRINT
Definition: sndvol32.h:73
Definition: shell.h:41
uint32_t ULONG
Definition: typedefs.h:59

◆ EndCheck()

VOID EndCheck ( _In_ NTSTATUS  Status)

Definition at line 150 of file fmtchk.c.

152{
155
156 DPRINT("ChkdskPartition() finished with status 0x%08lx\n", Status);
157}
VOID DestroyProgressBar(IN OUT PPROGRESSBAR Bar)
Definition: progress.c:339
#define NULL
Definition: types.h:112
static PPROGRESSBAR ProgressBar
Definition: fmtchk.c:17
Status
Definition: gdiplustypes.h:25

Referenced by DoChecking(), and FsVolCallback().

◆ EndFormat()

VOID EndFormat ( _In_ NTSTATUS  Status)

Definition at line 97 of file fmtchk.c.

99{
102
103 DPRINT("FormatPartition() finished with status 0x%08lx\n", Status);
104}

Referenced by DoFormatting(), FsVolCallback(), and FsVolCommitOpsQueue().

◆ FormatCallback()

static BOOLEAN NTAPI FormatCallback ( _In_ CALLBACKCOMMAND  Command,
_In_ ULONG  Modifier,
_In_ PVOID  Argument 
)
static

Definition at line 24 of file fmtchk.c.

28{
29 switch (Command)
30 {
31 case PROGRESS:
32 {
33 PULONG Percent = (PULONG)Argument;
34 DPRINT("%lu percent completed\n", *Percent);
36 break;
37 }
38
39#if 0
40 case OUTPUT:
41 {
42 PTEXTOUTPUT output = (PTEXTOUTPUT)Argument;
43 DPRINT("%s\n", output->Output);
44 break;
45 }
46#endif
47
48 case DONE:
49 {
50#if 0
51 PBOOLEAN Success = (PBOOLEAN)Argument;
52 if (*Success == FALSE)
53 {
54 DPRINT("FormatEx was unable to complete successfully.\n\n");
55 }
56#endif
57 DPRINT("Done\n");
58 break;
59 }
60
61 default:
62 DPRINT("Unknown callback %lu\n", (ULONG)Command);
63 break;
64 }
65
66 return TRUE;
67}
VOID ProgressSetStep(IN PPROGRESSBAR Bar, IN ULONG Step)
Definition: progress.c:368
#define FALSE
Definition: types.h:117
@ Success
Definition: eventcreate.c:712
struct TEXTOUTPUT * PTEXTOUTPUT
@ OUTPUT
Definition: fmifs.h:96
@ PROGRESS
Definition: fmifs.h:82
#define DONE
Definition: rnr20lib.h:14
PCHAR Output
Definition: fmifs.h:33
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53

Referenced by StartFormat().

◆ StartCheck()

VOID StartCheck ( _Inout_ PCHECK_VOLUME_INFO  ChkInfo)

Definition at line 127 of file fmtchk.c.

129{
130 // TODO: Think about which values could be defaulted...
131 ChkInfo->FixErrors = TRUE;
132 ChkInfo->Verbose = FALSE;
133 ChkInfo->CheckOnlyIfDirty = TRUE;
134 ChkInfo->ScanDrive = FALSE;
135 ChkInfo->Callback = ChkdskCallback;
136
138 yScreen - 14,
139 xScreen - 7,
140 yScreen - 10,
141 10,
142 24,
143 TRUE,
145
147}
VOID ProgressSetStepCount(IN PPROGRESSBAR Bar, IN ULONG StepCount)
Definition: progress.c:347
PPROGRESSBAR CreateProgressBar(IN SHORT Left, IN SHORT Top, IN SHORT Right, IN SHORT Bottom, IN SHORT TextTop, IN SHORT TextRight, IN BOOLEAN DoubleEdge, IN PCSTR DescriptionText OPTIONAL)
Definition: progress.c:317
SHORT yScreen
Definition: consup.c:40
SHORT xScreen
Definition: consup.c:39
PCSTR MUIGetString(ULONG Number)
Definition: mui.c:251
#define STRING_CHECKINGDISK
Definition: mui.h:169
PFMIFSCALLBACK ChkdskCallback
Definition: vfatlib.c:43

Referenced by FsVolCallback().

◆ StartFormat()

VOID StartFormat ( _Inout_ PFORMAT_VOLUME_INFO  FmtInfo,
_In_ PFILE_SYSTEM_ITEM  SelectedFileSystem 
)

Definition at line 70 of file fmtchk.c.

73{
74 ASSERT(SelectedFileSystem && SelectedFileSystem->FileSystem);
75
76 // TODO: Think about which values could be defaulted...
77 FmtInfo->FileSystemName = SelectedFileSystem->FileSystem;
78 FmtInfo->MediaFlag = FMIFS_HARDDISK;
79 FmtInfo->Label = NULL;
80 FmtInfo->QuickFormat = SelectedFileSystem->QuickFormat;
81 FmtInfo->ClusterSize = 0;
82 FmtInfo->Callback = FormatCallback;
83
85 yScreen - 14,
86 xScreen - 7,
87 yScreen - 10,
88 10,
89 24,
90 TRUE,
92
94}
@ FMIFS_HARDDISK
Definition: fmifs.h:65
static BOOLEAN NTAPI FormatCallback(_In_ CALLBACKCOMMAND Command, _In_ ULONG Modifier, _In_ PVOID Argument)
Definition: fmtchk.c:24
#define ASSERT(a)
Definition: mode.c:44
#define STRING_FORMATTINGPART
Definition: mui.h:168

Referenced by FsVolCallback().

Variable Documentation

◆ ProgressBar