ReactOS 0.4.15-dev-8145-ga541a46
format.c File Reference
#include "usetup.h"
#include <debug.h>
Include dependency graph for format.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)
 
NTSTATUS DoFormat (IN PPARTENTRY PartEntry, IN PCWSTR FileSystemName, IN BOOLEAN QuickFormat)
 

Variables

static PPROGRESSBAR FormatProgressBar = NULL
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 31 of file format.c.

Function Documentation

◆ DoFormat()

NTSTATUS DoFormat ( IN PPARTENTRY  PartEntry,
IN PCWSTR  FileSystemName,
IN BOOLEAN  QuickFormat 
)

Definition at line 92 of file format.c.

96{
98
100 yScreen - 14,
101 xScreen - 7,
102 yScreen - 10,
103 10,
104 24,
105 TRUE,
107
109
110 // TODO: Think about which values could be defaulted...
111 Status = FormatPartition(PartEntry,
112 FileSystemName,
113 FMIFS_HARDDISK, /* MediaFlag */
114 NULL, /* Label */
115 QuickFormat, /* QuickFormat */
116 0, /* ClusterSize */
117 FormatCallback); /* Callback */
118
121
122 DPRINT("FormatPartition() finished with status 0x%08lx\n", Status);
123
124 return Status;
125}
LONG NTSTATUS
Definition: precomp.h:26
static PPROGRESSBAR FormatProgressBar
Definition: format.c:34
static BOOLEAN NTAPI FormatCallback(IN CALLBACKCOMMAND Command, IN ULONG Modifier, IN PVOID Argument)
Definition: format.c:41
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
VOID DestroyProgressBar(IN OUT PPROGRESSBAR Bar)
Definition: progress.c:339
BOOL QuickFormat
Definition: format.c:66
SHORT yScreen
Definition: consup.c:40
SHORT xScreen
Definition: consup.c:39
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
@ FMIFS_HARDDISK
Definition: fmifs.h:51
Status
Definition: gdiplustypes.h:25
NTSTATUS FormatPartition(IN PPARTENTRY PartEntry, IN PCWSTR FileSystemName, IN FMIFS_MEDIA_FLAG MediaFlag, IN PCWSTR Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: fsutil.c:802
#define DPRINT
Definition: sndvol32.h:73
PCSTR MUIGetString(ULONG Number)
Definition: mui.c:251
#define STRING_FORMATTINGPART
Definition: mui.h:168

Referenced by FormatPartitionPage().

◆ FormatCallback()

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

Definition at line 41 of file format.c.

45{
46 switch (Command)
47 {
48 case PROGRESS:
49 {
50 PULONG Percent;
51
52 Percent = (PULONG)Argument;
53 DPRINT("%lu percent completed\n", *Percent);
54
56 break;
57 }
58
59#if 0
60 case OUTPUT:
61 {
63 output = (PTEXTOUTPUT) Argument;
64 DPRINT("%s\n", output->Output);
65 break;
66 }
67#endif
68
69 case DONE:
70 {
71 // PBOOLEAN Success;
72 DPRINT("Done\n");
73#if 0
74 Success = (PBOOLEAN)Argument;
75 if (*Success == FALSE)
76 {
77 DPRINT("FormatEx was unable to complete successfully.\n\n");
78 }
79#endif
80 break;
81 }
82
83 default:
84 DPRINT("Unknown callback %lu\n", (ULONG)Command);
85 break;
86 }
87
88 return TRUE;
89}
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:82
@ PROGRESS
Definition: fmifs.h:68
#define DONE
Definition: rnr20lib.h:14
@ Output
Definition: arc.h:85
Definition: shell.h:41
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59

Referenced by DoFormat().

Variable Documentation

◆ FormatProgressBar

PPROGRESSBAR FormatProgressBar = NULL
static

Definition at line 34 of file format.c.

Referenced by DoFormat(), and FormatCallback().