mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
3a19ee6a96
- Create the beginnings of a "setuplib" library, whose aim is to be shared between the (currently existing) 1st-stage text-mode installer, and the (future) 1st-stage GUI installer. - Finish to split the GenList and PartList codes into their UI part, which remain in usetup, and their algorithmic part, which go into setuplib. - Move SetMountedDeviceValue into the PartList module. - Split the FileSystem list code into its UI and the algorithmic part (which goes into setuplib under the name fsutil.c). * The algo part is meant to be able to manage the filesystems available on the running system, similarly to what is mostly done (in scattered form) in fmifs, format, chkdsk / autochk codes... It also manages the partition filesystem recognition, using OS routines. * The UI part manages the FS list as it appears on screen, showing only the possible FSes that can be used to format the selected partition (a bit similar to what we do in the shell32's drive.c, etc...). - Adapt the calling code to these changes. - Remove some "host" code that was dating back from the dark old times. svn path=/branches/setup_improvements/; revision=74570 svn path=/branches/setup_improvements/; revision=74659
94 lines
2.9 KiB
C
94 lines
2.9 KiB
C
/*
|
|
* ReactOS kernel
|
|
* Copyright (C) 2006 ReactOS Team
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
/* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS text-mode setup
|
|
* FILE: base/setup/usetup/chkdsk.c
|
|
* PURPOSE: Filesystem chkdsk support functions
|
|
* PROGRAMMER: Hervé Poussineau (hpoussin@reactos.org)
|
|
*/
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
#include "usetup.h"
|
|
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
static PPROGRESSBAR ChkdskProgressBar = NULL;
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
static
|
|
BOOLEAN
|
|
NTAPI
|
|
ChkdskCallback(
|
|
IN CALLBACKCOMMAND Command,
|
|
IN ULONG Modifier,
|
|
IN PVOID Argument)
|
|
{
|
|
switch (Command)
|
|
{
|
|
default:
|
|
DPRINT("Unknown callback %lu\n", (ULONG)Command);
|
|
break;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
NTSTATUS
|
|
ChkdskPartition(
|
|
IN PUNICODE_STRING DriveRoot,
|
|
/*IN PFILE_SYSTEM_ITEM FileSystemItem*/
|
|
IN PFILE_SYSTEM FileSystem)
|
|
{
|
|
NTSTATUS Status;
|
|
// PFILE_SYSTEM FileSystem = FileSystemItem->FileSystem;
|
|
|
|
if (!FileSystem || !FileSystem->ChkdskFunc)
|
|
return STATUS_NOT_SUPPORTED;
|
|
|
|
ChkdskProgressBar = CreateProgressBar(6,
|
|
yScreen - 14,
|
|
xScreen - 7,
|
|
yScreen - 10,
|
|
10,
|
|
24,
|
|
TRUE,
|
|
MUIGetString(STRING_CHECKINGDISK));
|
|
|
|
ProgressSetStepCount(ChkdskProgressBar, 100);
|
|
|
|
Status = FileSystem->ChkdskFunc(DriveRoot,
|
|
TRUE, /* FixErrors */
|
|
FALSE, /* Verbose */
|
|
TRUE, /* CheckOnlyIfDirty */
|
|
FALSE, /* ScanDrive */
|
|
ChkdskCallback); /* Callback */
|
|
|
|
DestroyProgressBar(ChkdskProgressBar);
|
|
ChkdskProgressBar = NULL;
|
|
|
|
DPRINT("ChkdskPartition() finished with status 0x%08lx\n", Status);
|
|
|
|
return Status;
|
|
}
|
|
|
|
/* EOF */
|