ReactOS  0.4.15-dev-2947-g59e1b78
chkdsk.c
Go to the documentation of this file.
1 /*
2  * ReactOS kernel
3  * Copyright (C) 2006 ReactOS Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 /*
20  * COPYRIGHT: See COPYING in the top level directory
21  * PROJECT: ReactOS text-mode setup
22  * FILE: base/setup/usetup/chkdsk.c
23  * PURPOSE: Filesystem chkdsk support functions
24  * PROGRAMMER: Hervé Poussineau (hpoussin@reactos.org)
25  */
26 
27 /* INCLUDES *****************************************************************/
28 
29 #include "usetup.h"
30 
31 #define NDEBUG
32 #include <debug.h>
33 
35 
36 /* FUNCTIONS ****************************************************************/
37 
38 static
39 BOOLEAN
40 NTAPI
43  IN ULONG Modifier,
44  IN PVOID Argument)
45 {
46  switch (Command)
47  {
48  default:
49  DPRINT("Unknown callback %lu\n", (ULONG)Command);
50  break;
51  }
52 
53  return TRUE;
54 }
55 
58  IN PPARTENTRY PartEntry)
59 {
61 
63  yScreen - 14,
64  xScreen - 7,
65  yScreen - 10,
66  10,
67  24,
68  TRUE,
70 
72 
73  // TODO: Think about which values could be defaulted...
74  Status = ChkdskPartition(PartEntry,
75  TRUE, /* FixErrors */
76  FALSE, /* Verbose */
77  TRUE, /* CheckOnlyIfDirty */
78  FALSE, /* ScanDrive */
79  ChkdskCallback); /* Callback */
80 
83 
84  DPRINT("ChkdskPartition() finished with status 0x%08lx\n", Status);
85 
86  return Status;
87 }
88 
89 /* EOF */
#define STRING_CHECKINGDISK
Definition: mui.h:147
#define IN
Definition: typedefs.h:39
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
Definition: shell.h:41
CALLBACKCOMMAND
Definition: fmifs.h:66
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
VOID ProgressSetStepCount(IN PPROGRESSBAR Bar, IN ULONG StepCount)
Definition: progress.c:347
unsigned char BOOLEAN
PCSTR MUIGetString(ULONG Number)
Definition: mui.c:230
Status
Definition: gdiplustypes.h:24
static PPROGRESSBAR ChkdskProgressBar
Definition: chkdsk.c:34
static BOOLEAN NTAPI ChkdskCallback(IN CALLBACKCOMMAND Command, IN ULONG Modifier, IN PVOID Argument)
Definition: chkdsk.c:41
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
NTSTATUS ChkdskPartition(IN PPARTENTRY PartEntry, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PFMIFSCALLBACK Callback)
Definition: fsutil.c:670
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS DoChkdsk(IN PPARTENTRY PartEntry)
Definition: chkdsk.c:57
#define DPRINT
Definition: sndvol32.h:71