Author: hpoussin
Date: Mon Feb 11 19:52:49 2008
New Revision: 32300
URL:
http://svn.reactos.org/svn/reactos?rev=32300&view=rev
Log:
Add support for EXT2 partitions (STILL DISABLED ATM!)
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/native/fslist.c
trunk/reactos/base/setup/usetup/partlist.c
trunk/reactos/base/setup/usetup/partlist.h
trunk/reactos/base/setup/usetup/usetup.rbuild
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c Mon Feb 11 19:52:49 2008
@@ -1766,6 +1766,10 @@
{
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! */
@@ -1941,6 +1945,10 @@
(PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32_XINT13))
{
PartType = "FAT32";
+ }
+ else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2)
+ {
+ PartType = "EXT2";
}
else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS)
{
@@ -2191,6 +2199,8 @@
}
}
}
+ 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 @@
}
}
}
+ 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);
Modified: trunk/reactos/base/setup/usetup/native/fslist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/native/f…
==============================================================================
--- trunk/reactos/base/setup/usetup/native/fslist.c (original)
+++ trunk/reactos/base/setup/usetup/native/fslist.c Mon Feb 11 19:52:49 2008
@@ -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 @@
IN PFILE_SYSTEM_LIST List)
{
FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk);
+ //FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
return TRUE;
}
Modified: trunk/reactos/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.c (original)
+++ trunk/reactos/base/setup/usetup/partlist.c Mon Feb 11 19:52:49 2008
@@ -257,6 +257,20 @@
{
#if 0
if (CheckFatFormat())
+ {
+ PartEntry->FormatState = Preformatted;
+ }
+ else
+ {
+ PartEntry->FormatState = Unformatted;
+ }
+#endif
+ PartEntry->FormatState = Preformatted;
+ }
+ else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2)
+ {
+#if 0
+ if (CheckExt2Format())
{
PartEntry->FormatState = Preformatted;
}
@@ -1148,6 +1162,10 @@
{
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! */
Modified: trunk/reactos/base/setup/usetup/partlist.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.h (original)
+++ trunk/reactos/base/setup/usetup/partlist.h Mon Feb 11 19:52:49 2008
@@ -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
@@ -26,6 +25,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
{
Modified: trunk/reactos/base/setup/usetup/usetup.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.r…
==============================================================================
--- trunk/reactos/base/setup/usetup/usetup.rbuild (original)
+++ trunk/reactos/base/setup/usetup/usetup.rbuild Mon Feb 11 19:52:49 2008
@@ -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">