mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/fslib/vfatlib/vfatlib.c (VfatFormat): Set hidden sectors. * ntoskrnl/io/xhaldrv.c (xHalIoWritePartitionTable): Implement support for primary partitions. * subsys/system/usetup/partlist.c (CreateSelectedPartition): Compute hidden sectors. * subsys/system/usetup/usetup.c (SelectPartitionPage, DrawFileSystemList, FormatPartitionPage): Don't use conditional define ENABLE_FORMAT. (CreateFileSystemList): Don't draw "Keep current file system" option if formatting is needed. (SelectFileSystemPage): Figure out if partition must be formatted. * subsys/system/usetup/usetup.h (ENABLE_FORMAT): Remove. (FILE_SYSTEM_LIST): Add ForceFormat field. svn path=/trunk/; revision=4675
This commit is contained in:
parent
67e99cf820
commit
0c6f80f830
6 changed files with 130 additions and 64 deletions
|
@ -1,3 +1,19 @@
|
||||||
|
2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||||
|
|
||||||
|
* lib/fslib/vfatlib/vfatlib.c (VfatFormat): Set hidden sectors.
|
||||||
|
* ntoskrnl/io/xhaldrv.c (xHalIoWritePartitionTable): Implement support
|
||||||
|
for primary partitions.
|
||||||
|
* subsys/system/usetup/partlist.c (CreateSelectedPartition): Compute
|
||||||
|
hidden sectors.
|
||||||
|
* subsys/system/usetup/usetup.c (SelectPartitionPage,
|
||||||
|
DrawFileSystemList, FormatPartitionPage): Don't use conditional define
|
||||||
|
ENABLE_FORMAT.
|
||||||
|
(CreateFileSystemList): Don't draw "Keep current file system" option if
|
||||||
|
formatting is needed.
|
||||||
|
(SelectFileSystemPage): Figure out if partition must be formatted.
|
||||||
|
* subsys/system/usetup/usetup.h (ENABLE_FORMAT): Remove.
|
||||||
|
(FILE_SYSTEM_LIST): Add ForceFormat field.
|
||||||
|
|
||||||
2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||||
|
|
||||||
* lib/user32/windows/font.c (TEXT_PathEllipsify, TEXT_Reprefix): Fix
|
* lib/user32/windows/font.c (TEXT_PathEllipsify, TEXT_Reprefix): Fix
|
||||||
|
|
|
@ -427,7 +427,7 @@ VfatFormat(
|
||||||
BootSector.FATSectors = 0;
|
BootSector.FATSectors = 0;
|
||||||
BootSector.SectorsPerTrack = DiskGeometry.SectorsPerTrack;
|
BootSector.SectorsPerTrack = DiskGeometry.SectorsPerTrack;
|
||||||
BootSector.Heads = DiskGeometry.TracksPerCylinder;
|
BootSector.Heads = DiskGeometry.TracksPerCylinder;
|
||||||
BootSector.HiddenSectors = 63; /* FIXME: */
|
BootSector.HiddenSectors = PartitionInfo.HiddenSectors;
|
||||||
BootSector.SectorsHuge = PartitionInfo.PartitionLength.QuadPart >>
|
BootSector.SectorsHuge = PartitionInfo.PartitionLength.QuadPart >>
|
||||||
GetShiftCount(BootSector.BytesPerSector); /* Use shifting to avoid 64-bit division */
|
GetShiftCount(BootSector.BytesPerSector); /* Use shifting to avoid 64-bit division */
|
||||||
BootSector.FATSectors32 = 0; /* Set later */
|
BootSector.FATSectors32 = 0; /* Set later */
|
||||||
|
@ -436,7 +436,7 @@ VfatFormat(
|
||||||
BootSector.RootCluster = 2;
|
BootSector.RootCluster = 2;
|
||||||
BootSector.FSInfoSector = 1;
|
BootSector.FSInfoSector = 1;
|
||||||
BootSector.BootBackup = 6;
|
BootSector.BootBackup = 6;
|
||||||
BootSector.Drive = 0xff; /* No BIOS boot drive available */ //0x80; /* FIXME: */
|
BootSector.Drive = 0xff; /* No BIOS boot drive available */
|
||||||
BootSector.ExtBootSignature = 0x29;
|
BootSector.ExtBootSignature = 0x29;
|
||||||
BootSector.VolumeID = 0x45768798; /* FIXME: */
|
BootSector.VolumeID = 0x45768798; /* FIXME: */
|
||||||
if ((Label == NULL) || (Label->Buffer == NULL))
|
if ((Label == NULL) || (Label->Buffer == NULL))
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
/* $Id: xhaldrv.c,v 1.31 2003/04/28 21:15:07 ekohl Exp $
|
/* $Id: xhaldrv.c,v 1.32 2003/05/11 18:31:09 chorns Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/io/xhaldrv.c
|
* FILE: ntoskrnl/io/xhaldrv.c
|
||||||
* PURPOSE: Hal drive routines
|
* PURPOSE: Hal drive routines
|
||||||
* PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
|
* PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
|
||||||
|
* Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
* Created 19/06/2000
|
* Created 19/06/2000
|
||||||
*/
|
*/
|
||||||
|
@ -831,7 +832,8 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
||||||
(((PartitionSector->Partition[i].StartingSector) & 0xc0) << 2) +
|
(((PartitionSector->Partition[i].StartingSector) & 0xc0) << 2) +
|
||||||
PartitionSector->Partition[i].StartingCylinder,
|
PartitionSector->Partition[i].StartingCylinder,
|
||||||
PartitionSector->Partition[i].EndingHead,
|
PartitionSector->Partition[i].EndingHead,
|
||||||
PartitionSector->Partition[i].EndingSector,
|
PartitionSector->Partition[i].EndingSector & 0x3f,
|
||||||
|
(((PartitionSector->Partition[i].EndingSector) & 0xc0) << 2) +
|
||||||
PartitionSector->Partition[i].EndingCylinder,
|
PartitionSector->Partition[i].EndingCylinder,
|
||||||
PartitionSector->Partition[i].StartingBlock,
|
PartitionSector->Partition[i].StartingBlock,
|
||||||
PartitionSector->Partition[i].SectorCount);
|
PartitionSector->Partition[i].SectorCount);
|
||||||
|
@ -949,10 +951,22 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
DPRINT("xHalIoWritePartitionTable(%p %lu %lu %p)\n",
|
ULONG StartBlock;
|
||||||
|
ULONG SectorCount;
|
||||||
|
ULONG StartCylinder;
|
||||||
|
ULONG StartSector;
|
||||||
|
ULONG StartHead;
|
||||||
|
ULONG EndCylinder;
|
||||||
|
ULONG EndSector;
|
||||||
|
ULONG EndHead;
|
||||||
|
ULONG lba;
|
||||||
|
ULONG x;
|
||||||
|
|
||||||
|
DPRINT("xHalIoWritePartitionTable(%p %lu %lu %lu %p)\n",
|
||||||
DeviceObject,
|
DeviceObject,
|
||||||
SectorSize,
|
SectorSize,
|
||||||
SectorsPerTrack,
|
SectorsPerTrack,
|
||||||
|
NumberOfHeads,
|
||||||
PartitionBuffer);
|
PartitionBuffer);
|
||||||
|
|
||||||
assert(DeviceObject);
|
assert(DeviceObject);
|
||||||
|
@ -1005,16 +1019,17 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("WARNING: Only 'BootFlags' is implemented\n");
|
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < PartitionBuffer->PartitionCount; i++)
|
for (i = 0; i < PartitionBuffer->PartitionCount; i++)
|
||||||
{
|
{
|
||||||
//= PartitionBuffer->PartitionEntry[i].StartingOffset;
|
if (PartitionBuffer->PartitionEntry[i].PartitionType != PARTITION_ENTRY_UNUSED)
|
||||||
//= PartitionBuffer->PartitionEntry[i].PartitionLength;
|
{
|
||||||
//= PartitionBuffer->PartitionEntry[i].HiddenSectors;
|
/*
|
||||||
//= PartitionBuffer->PartitionEntry[i].PartitionType;
|
* CHS formulas:
|
||||||
//= PartitionBuffer->PartitionEntry[i].PartitionType;
|
* x = LBA DIV SectorsPerTrack
|
||||||
|
* cylinder = x DIV NumberOfHeads
|
||||||
|
* head = x MOD NumberOfHeads
|
||||||
|
* sector = (LBA MOD SectorsPerTrack) + 1
|
||||||
|
*/
|
||||||
|
|
||||||
if (PartitionBuffer->PartitionEntry[i].BootIndicator)
|
if (PartitionBuffer->PartitionEntry[i].BootIndicator)
|
||||||
{
|
{
|
||||||
|
@ -1025,8 +1040,54 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
PartitionSector->Partition[i].BootFlags &= ~0x80;
|
PartitionSector->Partition[i].BootFlags &= ~0x80;
|
||||||
}
|
}
|
||||||
|
|
||||||
//= PartitionBuffer->PartitionEntry[i].RecognizedPartition;
|
PartitionSector->Partition[i].PartitionType = PartitionBuffer->PartitionEntry[i].PartitionType;
|
||||||
//= PartitionBuffer->PartitionEntry[i].RewritePartition;
|
|
||||||
|
/* Compute starting CHS values */
|
||||||
|
lba = (PartitionBuffer->PartitionEntry[i].StartingOffset.QuadPart / SectorSize);
|
||||||
|
StartBlock = lba; /* Save this for later */
|
||||||
|
x = lba / SectorsPerTrack;
|
||||||
|
StartCylinder = x / NumberOfHeads;
|
||||||
|
StartHead = x % NumberOfHeads;
|
||||||
|
StartSector = (lba % SectorsPerTrack) + 1;
|
||||||
|
DPRINT("StartingOffset (LBA:%d C:%d H:%d S:%d)\n", lba, StartCylinder, StartHead, StartSector);
|
||||||
|
|
||||||
|
/* Compute ending CHS values */
|
||||||
|
lba = (PartitionBuffer->PartitionEntry[i].StartingOffset.QuadPart
|
||||||
|
+ (PartitionBuffer->PartitionEntry[i].PartitionLength.QuadPart - 1)) / SectorSize;
|
||||||
|
SectorCount = lba - StartBlock; /* Save this for later */
|
||||||
|
x = lba / SectorsPerTrack;
|
||||||
|
EndCylinder = x / NumberOfHeads;
|
||||||
|
EndHead = x % NumberOfHeads;
|
||||||
|
EndSector = (lba % SectorsPerTrack) + 1;
|
||||||
|
DPRINT("EndingOffset (LBA:%d C:%d H:%d S:%d)\n", lba, EndCylinder, EndHead, EndSector);
|
||||||
|
|
||||||
|
/* Set startsector and sectorcount */
|
||||||
|
PartitionSector->Partition[i].StartingBlock = StartBlock;
|
||||||
|
PartitionSector->Partition[i].SectorCount = SectorCount;
|
||||||
|
|
||||||
|
/* Set starting CHS values */
|
||||||
|
PartitionSector->Partition[i].StartingCylinder = StartCylinder & 0xff;
|
||||||
|
PartitionSector->Partition[i].StartingHead = StartHead;
|
||||||
|
PartitionSector->Partition[i].StartingSector = ((StartCylinder & 0x0300) >> 2) + (StartSector & 0x3f);
|
||||||
|
|
||||||
|
/* Set ending CHS values */
|
||||||
|
PartitionSector->Partition[i].EndingCylinder = EndCylinder & 0xff;
|
||||||
|
PartitionSector->Partition[i].EndingHead = EndHead;
|
||||||
|
PartitionSector->Partition[i].EndingSector = ((EndCylinder & 0x0300) >> 2) + (EndSector & 0x3f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PartitionSector->Partition[i].BootFlags = 0;
|
||||||
|
PartitionSector->Partition[i].PartitionType = PARTITION_ENTRY_UNUSED;
|
||||||
|
PartitionSector->Partition[i].StartingHead = 0;
|
||||||
|
PartitionSector->Partition[i].StartingSector = 0;
|
||||||
|
PartitionSector->Partition[i].StartingCylinder = 0;
|
||||||
|
PartitionSector->Partition[i].EndingHead = 0;
|
||||||
|
PartitionSector->Partition[i].EndingSector = 0;
|
||||||
|
PartitionSector->Partition[i].EndingCylinder = 0;
|
||||||
|
PartitionSector->Partition[i].StartingBlock = 0;
|
||||||
|
PartitionSector->Partition[i].SectorCount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1054,7 +1115,8 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
(((PartitionSector->Partition[i].StartingSector) & 0xc0) << 2) +
|
(((PartitionSector->Partition[i].StartingSector) & 0xc0) << 2) +
|
||||||
PartitionSector->Partition[i].StartingCylinder,
|
PartitionSector->Partition[i].StartingCylinder,
|
||||||
PartitionSector->Partition[i].EndingHead,
|
PartitionSector->Partition[i].EndingHead,
|
||||||
PartitionSector->Partition[i].EndingSector,
|
PartitionSector->Partition[i].EndingSector & 0x3f,
|
||||||
|
(((PartitionSector->Partition[i].EndingSector) & 0xc0) << 2) +
|
||||||
PartitionSector->Partition[i].EndingCylinder,
|
PartitionSector->Partition[i].EndingCylinder,
|
||||||
PartitionSector->Partition[i].StartingBlock,
|
PartitionSector->Partition[i].StartingBlock,
|
||||||
PartitionSector->Partition[i].SectorCount);
|
PartitionSector->Partition[i].SectorCount);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: partlist.c,v 1.9 2003/04/28 19:44:13 chorns Exp $
|
/* $Id: partlist.c,v 1.10 2003/05/11 18:31:09 chorns Exp $
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS text-mode setup
|
* PROJECT: ReactOS text-mode setup
|
||||||
* FILE: subsys/system/usetup/partlist.c
|
* FILE: subsys/system/usetup/partlist.c
|
||||||
|
@ -1245,9 +1245,11 @@ CreateSelectedPartition(PPARTLIST List,
|
||||||
|
|
||||||
li.QuadPart = PartEntry->StartingOffset;
|
li.QuadPart = PartEntry->StartingOffset;
|
||||||
LayoutBuffer->PartitionEntry[PartEntryNumber].StartingOffset = li;
|
LayoutBuffer->PartitionEntry[PartEntryNumber].StartingOffset = li;
|
||||||
|
/* FIXME: Adjust PartitionLength so the partition will end on the last sector of a track */
|
||||||
li.QuadPart = NewPartSize;
|
li.QuadPart = NewPartSize;
|
||||||
LayoutBuffer->PartitionEntry[PartEntryNumber].PartitionLength = li;
|
LayoutBuffer->PartitionEntry[PartEntryNumber].PartitionLength = li;
|
||||||
LayoutBuffer->PartitionEntry[PartEntryNumber].HiddenSectors = 0; /* FIXME: ? */
|
LayoutBuffer->PartitionEntry[PartEntryNumber].HiddenSectors =
|
||||||
|
PartEntry->StartingOffset / DiskEntry->BytesPerSector;
|
||||||
LayoutBuffer->PartitionEntry[PartEntryNumber].PartitionType = PartType;
|
LayoutBuffer->PartitionEntry[PartEntryNumber].PartitionType = PartType;
|
||||||
LayoutBuffer->PartitionEntry[PartEntryNumber].RecognizedPartition = TRUE;
|
LayoutBuffer->PartitionEntry[PartEntryNumber].RecognizedPartition = TRUE;
|
||||||
LayoutBuffer->PartitionEntry[PartEntryNumber].RewritePartition = TRUE;
|
LayoutBuffer->PartitionEntry[PartEntryNumber].RewritePartition = TRUE;
|
||||||
|
|
|
@ -812,20 +812,16 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
}
|
}
|
||||||
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_C) /* C */
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_C) /* C */
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_FORMAT
|
|
||||||
/* Don't destroy the parition list here */;
|
/* Don't destroy the parition list here */;
|
||||||
return(CREATE_PARTITION_PAGE);
|
return(CREATE_PARTITION_PAGE);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_D) /* D */
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_D) /* D */
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_FORMAT
|
|
||||||
if (ConfirmDeletePartition(Ir) == TRUE)
|
if (ConfirmDeletePartition(Ir) == TRUE)
|
||||||
{
|
{
|
||||||
(BOOLEAN) DeleteSelectedPartition(CurrentPartitionList);
|
(BOOLEAN) DeleteSelectedPartition(CurrentPartitionList);
|
||||||
}
|
}
|
||||||
return(SELECT_PARTITION_PAGE);
|
return(SELECT_PARTITION_PAGE);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Update status text */
|
/* FIXME: Update status text */
|
||||||
|
@ -1151,11 +1147,8 @@ CreateFileSystemList(SHORT Left,
|
||||||
List->Left = Left;
|
List->Left = Left;
|
||||||
List->Top = Top;
|
List->Top = Top;
|
||||||
|
|
||||||
#ifdef ENABLE_FORMAT
|
List->ForceFormat = ForceFormat;
|
||||||
List->FileSystemCount = 1;
|
List->FileSystemCount = 1;
|
||||||
#else
|
|
||||||
List->FileSystemCount = 0;
|
|
||||||
#endif
|
|
||||||
if (ForceFormat)
|
if (ForceFormat)
|
||||||
{
|
{
|
||||||
List->CurrentFileSystem = ForceFileSystem;
|
List->CurrentFileSystem = ForceFileSystem;
|
||||||
|
@ -1185,7 +1178,6 @@ DrawFileSystemList(PFILE_SYSTEM_LIST List)
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
#ifdef ENABLE_FORMAT
|
|
||||||
coPos.X = List->Left;
|
coPos.X = List->Left;
|
||||||
coPos.Y = List->Top + index;
|
coPos.Y = List->Top + index;
|
||||||
FillConsoleOutputAttribute(0x17,
|
FillConsoleOutputAttribute(0x17,
|
||||||
|
@ -1206,8 +1198,9 @@ DrawFileSystemList(PFILE_SYSTEM_LIST List)
|
||||||
SetTextXY(List->Left, List->Top + index, " Format partition as FAT file system ");
|
SetTextXY(List->Left, List->Top + index, " Format partition as FAT file system ");
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
if (!List->ForceFormat)
|
||||||
|
{
|
||||||
coPos.X = List->Left;
|
coPos.X = List->Left;
|
||||||
coPos.Y = List->Top + index;
|
coPos.Y = List->Top + index;
|
||||||
FillConsoleOutputAttribute(0x17,
|
FillConsoleOutputAttribute(0x17,
|
||||||
|
@ -1228,6 +1221,7 @@ DrawFileSystemList(PFILE_SYSTEM_LIST List)
|
||||||
SetTextXY(List->Left, List->Top + index, " Keep current file system (no changes) ");
|
SetTextXY(List->Left, List->Top + index, " Keep current file system (no changes) ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
|
@ -1256,6 +1250,7 @@ static PAGE_NUMBER
|
||||||
SelectFileSystemPage(PINPUT_RECORD Ir)
|
SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
PFILE_SYSTEM_LIST FileSystemList;
|
PFILE_SYSTEM_LIST FileSystemList;
|
||||||
|
BOOLEAN ForceFormat;
|
||||||
ULONGLONG DiskSize;
|
ULONGLONG DiskSize;
|
||||||
ULONGLONG PartSize;
|
ULONGLONG PartSize;
|
||||||
PCHAR DiskUnit;
|
PCHAR DiskUnit;
|
||||||
|
@ -1342,7 +1337,8 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
SetTextXY(8, 21, "\xfa Press ENTER to format the partition.");
|
SetTextXY(8, 21, "\xfa Press ENTER to format the partition.");
|
||||||
SetTextXY(8, 23, "\xfa Press ESC to select another partition.");
|
SetTextXY(8, 23, "\xfa Press ESC to select another partition.");
|
||||||
|
|
||||||
FileSystemList = CreateFileSystemList(6, 26, FALSE, FsKeep);
|
ForceFormat = (PartData.PartType == PARTITION_ENTRY_UNUSED);
|
||||||
|
FileSystemList = CreateFileSystemList(6, 26, ForceFormat, FsFat);
|
||||||
if (FileSystemList == NULL)
|
if (FileSystemList == NULL)
|
||||||
{
|
{
|
||||||
/* FIXME: show an error dialog */
|
/* FIXME: show an error dialog */
|
||||||
|
@ -1429,11 +1425,9 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
switch (CurrentFileSystemList->CurrentFileSystem)
|
switch (CurrentFileSystemList->CurrentFileSystem)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_FORMAT
|
|
||||||
case FsFat:
|
case FsFat:
|
||||||
PartType = PARTITION_FAT32_XINT13;
|
PartType = PARTITION_FAT32_XINT13;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case FsKeep:
|
case FsKeep:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1453,7 +1447,6 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
switch (CurrentFileSystemList->CurrentFileSystem)
|
switch (CurrentFileSystemList->CurrentFileSystem)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_FORMAT
|
|
||||||
case FsFat:
|
case FsFat:
|
||||||
Status = FormatPartition(&DestinationRootPath);
|
Status = FormatPartition(&DestinationRootPath);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -1463,7 +1456,6 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||||
return(QUIT_PAGE);
|
return(QUIT_PAGE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case FsKeep:
|
case FsKeep:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
#ifndef __USETUP_H__
|
#ifndef __USETUP_H__
|
||||||
#define __USETUP_H__
|
#define __USETUP_H__
|
||||||
|
|
||||||
// Define to allow creating a new partition and format it
|
|
||||||
//#define ENABLE_FORMAT
|
|
||||||
|
|
||||||
#define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
#define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||||
#define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
|
#define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
|
||||||
|
|
||||||
|
@ -38,18 +35,15 @@
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_FORMAT
|
|
||||||
FsFat = 0,
|
FsFat = 0,
|
||||||
FsKeep = 1
|
FsKeep = 1
|
||||||
#else
|
|
||||||
FsKeep = 0
|
|
||||||
#endif
|
|
||||||
} FILE_SYSTEM;
|
} FILE_SYSTEM;
|
||||||
|
|
||||||
typedef struct _FILE_SYSTEM_LIST
|
typedef struct _FILE_SYSTEM_LIST
|
||||||
{
|
{
|
||||||
SHORT Left;
|
SHORT Left;
|
||||||
SHORT Top;
|
SHORT Top;
|
||||||
|
BOOLEAN ForceFormat;
|
||||||
FILE_SYSTEM CurrentFileSystem;
|
FILE_SYSTEM CurrentFileSystem;
|
||||||
ULONG FileSystemCount;
|
ULONG FileSystemCount;
|
||||||
} FILE_SYSTEM_LIST, *PFILE_SYSTEM_LIST;
|
} FILE_SYSTEM_LIST, *PFILE_SYSTEM_LIST;
|
||||||
|
|
Loading…
Reference in a new issue