Author: cgutman
Date: Tue Feb 28 05:10:40 2012
New Revision: 55896
URL:
http://svn.reactos.org/svn/reactos?rev=55896&view=rev
Log:
[EXT2LIB]
- Fix formatting FAT or NTFS volumes into EXT2 by defining ZAP_BOOTBLOCK and fixing a bug
in zap_sector()
[USETUP]
- Enable ext2 as an option in setup
- Formatting and building file copy list works but setup stalls shortly after starting to
copy files (NewCC on)
Modified:
trunk/reactos/base/setup/usetup/native/fslist.c
trunk/reactos/lib/fslib/ext2lib/Mke2fs.c
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 [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/native/fslist.c [iso-8859-1] Tue Feb 28 05:10:40 2012
@@ -5,7 +5,7 @@
IN PFILE_SYSTEM_LIST List)
{
FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk);
- //FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
+ FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
return TRUE;
}
Modified: trunk/reactos/lib/fslib/ext2lib/Mke2fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/ext2lib/Mke2fs.c…
==============================================================================
--- trunk/reactos/lib/fslib/ext2lib/Mke2fs.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/ext2lib/Mke2fs.c [iso-8859-1] Tue Feb 28 05:10:40 2012
@@ -15,6 +15,9 @@
int inode_ratio = 4096;
BOOLEAN bLocked = FALSE;
+
+/* This is needed for the ext2fs driver to mount the volume */
+#define ZAP_BOOTBLOCK
/* FUNCTIONS *************************************************************/
@@ -197,8 +200,6 @@
sect, sect + nsect - 1);
return false;
}
-
- memset(buf, 0, (ULONG)nsect * SECTOR_SIZE);
#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
#define BSD_MAGICDISK (0x57455682UL) /* The disk magic number reversed */
@@ -216,6 +217,8 @@
if ((*magic == BSD_DISKMAGIC) || (*magic == BSD_MAGICDISK))
goto clean_up;
}
+
+ memset(buf, 0, (ULONG)nsect * SECTOR_SIZE);
// Write buf to disk
Ext2WriteDisk( Ext2Sys,
@@ -928,6 +931,7 @@
blocks = Ext2Sb.s_blocks_count;
#ifdef ZAP_BOOTBLOCK
+ DPRINT1("Mke2fs: zeroing volume boot record\n");
zap_sector(&FileSys, 0, 2);
#endif