diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index 1c952542b81..e561f97b2ea 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -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); diff --git a/reactos/base/setup/usetup/native/fslist.c b/reactos/base/setup/usetup/native/fslist.c index 8a5db604ac4..b3ce5d452a3 100644 --- a/reactos/base/setup/usetup/native/fslist.c +++ b/reactos/base/setup/usetup/native/fslist.c @@ -1,6 +1,7 @@ #include "usetup.h" /* Filesystem headers */ +#include #include #include @@ -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; } diff --git a/reactos/base/setup/usetup/partlist.c b/reactos/base/setup/usetup/partlist.c index c5a1848e8e3..266e0e03474 100644 --- a/reactos/base/setup/usetup/partlist.c +++ b/reactos/base/setup/usetup/partlist.c @@ -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! */ diff --git a/reactos/base/setup/usetup/partlist.h b/reactos/base/setup/usetup/partlist.h index 0e605c09017..05e2bd60fa3 100644 --- a/reactos/base/setup/usetup/partlist.h +++ b/reactos/base/setup/usetup/partlist.h @@ -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, diff --git a/reactos/base/setup/usetup/usetup.rbuild b/reactos/base/setup/usetup/usetup.rbuild index 6d35eca2b6e..bece1aacfb6 100644 --- a/reactos/base/setup/usetup/usetup.rbuild +++ b/reactos/base/setup/usetup/usetup.rbuild @@ -12,6 +12,7 @@ -lgcc zlib inflib + ext2lib vfatlib ntdll