mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[USETUP]
- Use defines instead of hardcoded values for partition type IDs. - Add some support for installing ReactOS on EXT2 partitions. - Add few code that will be needed when we support NTFS installation. - Refactor InstallFatBootcodeToPartition and its auxiliary functions. CORE-4870 svn path=/trunk/; revision=70675
This commit is contained in:
+682
-321
File diff suppressed because it is too large
Load Diff
@@ -26,70 +26,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
NTSTATUS
|
||||
CreateFreeLoaderIniForDos(
|
||||
PWCHAR IniPath,
|
||||
PWCHAR ArcPath);
|
||||
|
||||
NTSTATUS
|
||||
CreateFreeLoaderIniForReactOS(
|
||||
PWCHAR IniPath,
|
||||
PWCHAR ArcPath);
|
||||
|
||||
NTSTATUS
|
||||
UpdateFreeLoaderIni(
|
||||
PWCHAR IniPath,
|
||||
PWCHAR ArcPath);
|
||||
|
||||
NTSTATUS
|
||||
SaveCurrentBootSector(
|
||||
PWSTR RootPath,
|
||||
PWSTR DstPath);
|
||||
|
||||
NTSTATUS
|
||||
InstallFat16BootCodeToFile(
|
||||
PWSTR SrcPath,
|
||||
PWSTR DstPath,
|
||||
PWSTR RootPath);
|
||||
|
||||
NTSTATUS
|
||||
InstallFat32BootCodeToFile(
|
||||
PWSTR SrcPath,
|
||||
PWSTR DstPath,
|
||||
PWSTR RootPath);
|
||||
|
||||
NTSTATUS
|
||||
InstallMbrBootCodeToDisk(
|
||||
PWSTR SrcPath,
|
||||
PWSTR RootPath);
|
||||
|
||||
NTSTATUS
|
||||
InstallFat16BootCodeToDisk(
|
||||
PWSTR SrcPath,
|
||||
PWSTR RootPath);
|
||||
|
||||
NTSTATUS
|
||||
InstallFat32BootCodeToDisk(
|
||||
PWSTR SrcPath,
|
||||
PWSTR RootPath);
|
||||
|
||||
NTSTATUS
|
||||
UpdateBootIni(
|
||||
PWSTR BootIniPath,
|
||||
PWSTR EntryName,
|
||||
PWSTR EntryValue);
|
||||
|
||||
BOOLEAN
|
||||
CheckInstallFatBootcodeToPartition(
|
||||
PUNICODE_STRING SystemRootPath);
|
||||
|
||||
NTSTATUS
|
||||
InstallFatBootcodeToPartition(
|
||||
PUNICODE_STRING SystemRootPath,
|
||||
PUNICODE_STRING SourceRootPath,
|
||||
PUNICODE_STRING DestinationArcPath,
|
||||
UCHAR PartitionType);
|
||||
|
||||
NTSTATUS
|
||||
InstallVBRToPartition(
|
||||
PUNICODE_STRING SystemRootPath,
|
||||
|
||||
@@ -354,7 +354,7 @@ SetupCopyFile(
|
||||
|
||||
RegionSize = (ULONG)PAGE_ROUND_UP(FileStandard.EndOfFile.u.LowPart);
|
||||
IoStatusBlock.Status = 0;
|
||||
ByteOffset.QuadPart = 0;
|
||||
ByteOffset.QuadPart = 0ULL;
|
||||
Status = NtWriteFile(FileHandleDest,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -2951,6 +2951,14 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||
{
|
||||
PartEntry->PartitionType = PARTITION_EXT2;
|
||||
|
||||
DiskEntry->Dirty = TRUE;
|
||||
DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex].PartitionType = PartEntry->PartitionType;
|
||||
DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex].RewritePartition = TRUE;
|
||||
}
|
||||
else if (wcscmp(PartEntry->FileSystem->FileSystemName, L"NTFS") == 0)
|
||||
{
|
||||
PartEntry->PartitionType = PARTITION_IFS;
|
||||
|
||||
DiskEntry->Dirty = TRUE;
|
||||
DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex].PartitionType = PartEntry->PartitionType;
|
||||
DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex].RewritePartition = TRUE;
|
||||
@@ -3149,7 +3157,6 @@ CheckFileSystemPage(PINPUT_RECORD Ir)
|
||||
DPRINT("ChkdskPartition() failed with status 0x%08lx\n", Status);
|
||||
sprintf(Buffer, "Setup failed to verify the selected partition.\n"
|
||||
"(Status 0x%08lx).\n", Status);
|
||||
|
||||
PopupError(Buffer,
|
||||
MUIGetString(STRING_REBOOTCOMPUTER),
|
||||
Ir, POPUP_WAIT_ENTER);
|
||||
@@ -3986,7 +3993,6 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||
}
|
||||
|
||||
/* Create the default hives */
|
||||
#ifdef __REACTOS__
|
||||
Status = NtInitializeRegistry(CM_BOOT_FLAG_SETUP);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
@@ -3994,9 +4000,6 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||
MUIDisplayError(ERROR_CREATE_HIVE, Ir, POPUP_WAIT_ENTER);
|
||||
return QUIT_PAGE;
|
||||
}
|
||||
#else
|
||||
RegInitializeRegistry();
|
||||
#endif
|
||||
|
||||
/* Update registry */
|
||||
CONSOLE_SetStatusText(MUIGetString(STRING_REGHIVEUPDATE));
|
||||
@@ -4165,22 +4168,24 @@ BootLoaderPage(PINPUT_RECORD Ir)
|
||||
DPRINT("Error: active partition invalid (unused)\n");
|
||||
InstallOnFloppy = TRUE;
|
||||
}
|
||||
else if (PartitionType == 0x0A)
|
||||
else if (PartitionType == PARTITION_OS2BOOTMGR)
|
||||
{
|
||||
/* OS/2 boot manager partition */
|
||||
DPRINT("Found OS/2 boot manager partition\n");
|
||||
InstallOnFloppy = TRUE;
|
||||
}
|
||||
else if (PartitionType == 0x83)
|
||||
else if (PartitionType == PARTITION_EXT2)
|
||||
{
|
||||
/* Linux ext2 partition */
|
||||
DPRINT("Found Linux ext2 partition\n");
|
||||
InstallOnFloppy = TRUE;
|
||||
InstallOnFloppy = FALSE;
|
||||
}
|
||||
else if (PartitionType == PARTITION_IFS)
|
||||
{
|
||||
/* NTFS partition */
|
||||
DPRINT("Found NTFS partition\n");
|
||||
|
||||
// FIXME: Make it FALSE when we'll support NTFS installation!
|
||||
InstallOnFloppy = TRUE;
|
||||
}
|
||||
else if ((PartitionType == PARTITION_FAT_12) ||
|
||||
|
||||
@@ -7,6 +7,7 @@ NATIVE_CreateFileSystemList(
|
||||
FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk);
|
||||
#if 0
|
||||
FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
|
||||
FS_AddProvider(List, L"NTFS", NtfsFormat, NtfsChkdsk);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
/* We have to define it there, because it is not in the MS DDK */
|
||||
#define PARTITION_EXT2 0x83
|
||||
|
||||
typedef enum _FORMATSTATE
|
||||
{
|
||||
Unformatted,
|
||||
|
||||
@@ -53,8 +53,10 @@
|
||||
#include <ndk/setypes.h>
|
||||
|
||||
/* Filesystem headers */
|
||||
#include <fslib/ext2lib.h>
|
||||
#include <reactos/rosioctl.h>
|
||||
#include <fslib/vfatlib.h>
|
||||
#include <fslib/ext2lib.h>
|
||||
// #include <fslib/ntfslib.h>
|
||||
|
||||
/* Internal Headers */
|
||||
#include "interface/consup.h"
|
||||
|
||||
Reference in New Issue
Block a user