mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
[FORMATTING] Fix tab/space mess by replacing them by 4 spaces. No code change
svn path=/trunk/; revision=23970
This commit is contained in:
parent
1b337150cc
commit
8c22629a9e
4 changed files with 156 additions and 158 deletions
|
@ -16,8 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id$
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
/* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS text-mode setup
|
||||
* FILE: subsys/system/usetup/format.c
|
||||
* PURPOSE: Filesystem format support functions
|
||||
|
@ -35,14 +34,12 @@ PPROGRESSBAR ProgressBar = NULL;
|
|||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
||||
BOOLEAN NTAPI
|
||||
FormatCallback (CALLBACKCOMMAND Command,
|
||||
ULONG Modifier,
|
||||
PVOID Argument)
|
||||
static BOOLEAN NTAPI
|
||||
FormatCallback(
|
||||
IN CALLBACKCOMMAND Command,
|
||||
IN ULONG Modifier,
|
||||
IN PVOID Argument)
|
||||
{
|
||||
// DPRINT1 ("FormatCallback() called\n");
|
||||
|
||||
switch (Command)
|
||||
{
|
||||
case PROGRESS:
|
||||
|
@ -53,49 +50,43 @@ FormatCallback (CALLBACKCOMMAND Command,
|
|||
DPRINT("%lu percent completed\n", *Percent);
|
||||
|
||||
ProgressSetStep(ProgressBar, *Percent);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// case OUTPUT:
|
||||
// {
|
||||
// PTEXTOUTPUT Output;
|
||||
// output = (PTEXTOUTPUT) Argument;
|
||||
// fprintf(stdout, "%s", output->Output);
|
||||
// }
|
||||
// break;
|
||||
/*case OUTPUT:
|
||||
{
|
||||
PTEXTOUTPUT Output;
|
||||
output = (PTEXTOUTPUT) Argument;
|
||||
DPRINT("%s\n", output->Output);
|
||||
break;
|
||||
}*/
|
||||
|
||||
case DONE:
|
||||
{
|
||||
/*PBOOLEAN Success;*/
|
||||
DPRINT("Done\n");
|
||||
// PBOOLEAN Success;
|
||||
// status = (PBOOLEAN) Argument;
|
||||
// if ( *status == FALSE )
|
||||
// {
|
||||
// wprintf(L"FormatEx was unable to complete successfully.\n\n");
|
||||
// Error = TRUE;
|
||||
// }
|
||||
}
|
||||
|
||||
/*Success = (PBOOLEAN)Argument;
|
||||
if (*Success == FALSE)
|
||||
{
|
||||
DPRINT("FormatEx was unable to complete successfully.\n\n");
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
DPRINT("Unknown callback %lu\n", (ULONG)Command);
|
||||
break;
|
||||
}
|
||||
|
||||
// DPRINT1 ("FormatCallback() done\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
FormatPartition (PUNICODE_STRING DriveRoot)
|
||||
FormatPartition(
|
||||
IN PUNICODE_STRING DriveRoot)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
SHORT xScreen;
|
||||
SHORT yScreen;
|
||||
|
||||
CONSOLE_GetScreenSize(&xScreen, &yScreen);
|
||||
|
||||
ProgressBar = CreateProgressBar(6,
|
||||
yScreen - 14,
|
||||
|
@ -106,16 +97,16 @@ FormatPartition (PUNICODE_STRING DriveRoot)
|
|||
ProgressSetStepCount(ProgressBar, 100);
|
||||
|
||||
Status = VfatFormat(DriveRoot,
|
||||
0, /* MediaFlag */
|
||||
FMIFS_HARDDISK, /* MediaFlag */
|
||||
NULL, /* Label */
|
||||
TRUE, /* QuickFormat */
|
||||
0, /* ClusterSize */
|
||||
(PFMIFSCALLBACK)FormatCallback); /* Callback */
|
||||
FormatCallback); /* Callback */
|
||||
|
||||
DestroyProgressBar(ProgressBar);
|
||||
ProgressBar = NULL;
|
||||
|
||||
DPRINT ("VfatFormat() status 0x%.08x\n", Status);
|
||||
DPRINT("FormatEx() finished with status 0x%08lx\n", Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
#define __FORMAT_H__
|
||||
|
||||
NTSTATUS
|
||||
FormatPartition(PUNICODE_STRING DriveRoot);
|
||||
FormatPartition(
|
||||
IN PUNICODE_STRING DriveRoot);
|
||||
|
||||
#endif /* __FILESUP_H__ */
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@
|
|||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
PFILE_SYSTEM_LIST
|
||||
CreateFileSystemList (SHORT Left,
|
||||
SHORT Top,
|
||||
BOOLEAN ForceFormat,
|
||||
FILE_SYSTEM ForceFileSystem)
|
||||
CreateFileSystemList(
|
||||
IN SHORT Left,
|
||||
IN SHORT Top,
|
||||
IN BOOLEAN ForceFormat,
|
||||
IN FILE_SYSTEM ForceFileSystem)
|
||||
{
|
||||
PFILE_SYSTEM_LIST List;
|
||||
|
||||
|
@ -62,16 +63,16 @@ CreateFileSystemList (SHORT Left,
|
|||
return List;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
DestroyFileSystemList (PFILE_SYSTEM_LIST List)
|
||||
DestroyFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List)
|
||||
{
|
||||
RtlFreeHeap(ProcessHeap, 0, List);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
DrawFileSystemList (PFILE_SYSTEM_LIST List)
|
||||
DrawFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List)
|
||||
{
|
||||
COORD coPos;
|
||||
ULONG Written;
|
||||
|
@ -136,9 +137,9 @@ DrawFileSystemList (PFILE_SYSTEM_LIST List)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
ScrollDownFileSystemList (PFILE_SYSTEM_LIST List)
|
||||
ScrollDownFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List)
|
||||
{
|
||||
if ((ULONG)List->CurrentFileSystem < List->FileSystemCount - 1)
|
||||
{
|
||||
|
@ -147,9 +148,9 @@ ScrollDownFileSystemList (PFILE_SYSTEM_LIST List)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
ScrollUpFileSystemList (PFILE_SYSTEM_LIST List)
|
||||
ScrollUpFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List)
|
||||
{
|
||||
if ((ULONG)List->CurrentFileSystem > 0)
|
||||
{
|
||||
|
|
|
@ -45,22 +45,27 @@ typedef struct _FILE_SYSTEM_LIST
|
|||
|
||||
|
||||
PFILE_SYSTEM_LIST
|
||||
CreateFileSystemList (SHORT Left,
|
||||
SHORT Top,
|
||||
BOOLEAN ForceFormat,
|
||||
FILE_SYSTEM ForceFileSystem);
|
||||
CreateFileSystemList(
|
||||
IN SHORT Left,
|
||||
IN SHORT Top,
|
||||
IN BOOLEAN ForceFormat,
|
||||
IN FILE_SYSTEM ForceFileSystem);
|
||||
|
||||
VOID
|
||||
DestroyFileSystemList (PFILE_SYSTEM_LIST List);
|
||||
DestroyFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List);
|
||||
|
||||
VOID
|
||||
DrawFileSystemList (PFILE_SYSTEM_LIST List);
|
||||
DrawFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List);
|
||||
|
||||
VOID
|
||||
ScrollDownFileSystemList (PFILE_SYSTEM_LIST List);
|
||||
ScrollDownFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List);
|
||||
|
||||
VOID
|
||||
ScrollUpFileSystemList (PFILE_SYSTEM_LIST List);
|
||||
ScrollUpFileSystemList(
|
||||
IN PFILE_SYSTEM_LIST List);
|
||||
|
||||
#endif /* __FSLIST_H__ */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue