ReactOS  0.4.15-dev-2738-gbe65a85
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 }
SHORT xScreen
Definition: consup.c:39
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
VOID DestroyProgressBar(IN OUT PPROGRESSBAR Bar)
Definition: progress.c:339
VOID ProgressSetStepCount(IN PPROGRESSBAR Bar, IN ULONG StepCount)
Definition: progress.c:347
BOOL QuickFormat
Definition: format.c:66
PCSTR MUIGetString(ULONG Number)
Definition: mui.c:230
Status
Definition: gdiplustypes.h:24
#define STRING_FORMATTINGDISK
Definition: mui.h:146
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:715
SHORT yScreen
Definition: consup.c:40
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
#define NULL
Definition: types.h:112
static BOOLEAN NTAPI FormatCallback(IN CALLBACKCOMMAND Command, IN ULONG Modifier, IN PVOID Argument)
Definition: format.c:41
static PPROGRESSBAR FormatProgressBar
Definition: format.c:34
#define DPRINT
Definition: sndvol32.h:71

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 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define TRUE
Definition: types.h:120
Definition: fmifs.h:68
VOID ProgressSetStep(IN PPROGRESSBAR Bar, IN ULONG Step)
Definition: progress.c:368
Definition: shell.h:41
struct TEXTOUTPUT * PTEXTOUTPUT
#define FALSE
Definition: types.h:117
char * PBOOLEAN
Definition: retypes.h:11
Definition: arc.h:85
unsigned int * PULONG
Definition: retypes.h:1
static PPROGRESSBAR FormatProgressBar
Definition: format.c:34
unsigned int ULONG
Definition: retypes.h:1
#define DONE
Definition: rnr20lib.h:14
Definition: fmifs.h:82
#define DPRINT
Definition: sndvol32.h:71

Referenced by DoFormat().

Variable Documentation

◆ FormatProgressBar

PPROGRESSBAR FormatProgressBar = NULL
static

Definition at line 34 of file format.c.

Referenced by DoFormat(), and FormatCallback().