Add support for EXT2 partitions (STILL DISABLED ATM!)

svn path=/trunk/; revision=32300
This commit is contained in:
Hervé Poussineau
2008-02-11 16:52:49 +00:00
parent 532ccf4d6c
commit b99dafb180
5 changed files with 54 additions and 2 deletions
@@ -1766,6 +1766,10 @@ DeletePartitionPage (PINPUT_RECORD Ir)
{
PartType = "FAT32";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2)
{
PartType = "EXT2";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS)
{
PartType = "NTFS"; /* FIXME: Not quite correct! */
@@ -1942,6 +1946,10 @@ SelectFileSystemPage (PINPUT_RECORD Ir)
{
PartType = "FAT32";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2)
{
PartType = "EXT2";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS)
{
PartType = "NTFS"; /* FIXME: Not quite correct! */
@@ -2191,6 +2199,8 @@ FormatPartitionPage (PINPUT_RECORD Ir)
}
}
}
else if (wcscmp(FileSystemList->Selected->FileSystem, L"EXT2") == 0)
PartEntry->PartInfo[0].PartitionType = PARTITION_EXT2;
else if (!FileSystemList->Selected->FormatFunc)
return QUIT_PAGE;
}
@@ -2326,6 +2336,25 @@ FormatPartitionPage (PINPUT_RECORD Ir)
}
}
}
else if (wcscmp(FileSystemList->Selected->FileSystem, L"EXT2") == 0)
{
wcscpy(PathBuffer, SourceRootPath.Buffer);
wcscat(PathBuffer, L"\\loader\\ext2.bin");
DPRINT("Install EXT2 bootcode: %S ==> %S\n", PathBuffer,
DestinationRootPath.Buffer);
Status = InstallFat32BootCodeToDisk(PathBuffer,
DestinationRootPath.Buffer);
if (!NT_SUCCESS(Status))
{
DPRINT1("InstallFat32BootCodeToDisk() failed with status 0x%08lx\n", Status);
/* FIXME: show an error dialog */
DestroyFileSystemList(FileSystemList);
FileSystemList = NULL;
return QUIT_PAGE;
}
}
else if (FileSystemList->Selected->FormatFunc)
{
DestroyFileSystemList(FileSystemList);
@@ -1,6 +1,7 @@
#include "usetup.h"
/* Filesystem headers */
#include <fslib/ext2lib.h>
#include <fslib/vfatlib.h>
#include <fslib/vfatxlib.h>
@@ -9,6 +10,7 @@ NATIVE_CreateFileSystemList(
IN PFILE_SYSTEM_LIST List)
{
FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk);
//FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
return TRUE;
}
+18
View File
@@ -264,6 +264,20 @@ AddPartitionToList (ULONG DiskNumber,
{
PartEntry->FormatState = Unformatted;
}
#endif
PartEntry->FormatState = Preformatted;
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2)
{
#if 0
if (CheckExt2Format())
{
PartEntry->FormatState = Preformatted;
}
else
{
PartEntry->FormatState = Unformatted;
}
#endif
PartEntry->FormatState = Preformatted;
}
@@ -1148,6 +1162,10 @@ PrintPartitionData (PPARTLIST List,
{
PartType = "FAT32";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2)
{
PartType = "EXT2";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS)
{
PartType = "NTFS"; /* FIXME: Not quite correct! */
+4 -2
View File
@@ -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/partlist.h
* PURPOSE: Partition list functions
@@ -27,6 +26,9 @@
#ifndef __PARTLIST_H__
#define __PARTLIST_H__
/* We have to define it there, because it is not in the MS DDK */
#define PARTITION_EXT2 0x83
typedef enum _FORMATSTATE
{
Unformatted,
+1
View File
@@ -12,6 +12,7 @@
<linkerflag>-lgcc</linkerflag>
<library>zlib</library>
<library>inflib</library>
<library>ext2lib</library>
<library>vfatlib</library>
<library>ntdll</library>
<directory name="interface">