Author: hpoussin
Date: Sat Oct 3 19:00:29 2009
New Revision: 43268
URL:
http://svn.reactos.org/svn/reactos?rev=43268&view=rev
Log:
[freeldr] Remove (Mach)DiskGetBootDevice, DiskGetBootVolume, DiskGetSystemVolume,
FsRecognizeVolume
This commit breaks ext2 driver in freeldr, which needs to use ArcSeek/ArcRead/Arc* instead
of DiskGetBootVolume/MachDiskReadLogicalSectors
Removed:
trunk/reactos/boot/freeldr/freeldr/fs/fsrec.c
trunk/reactos/boot/freeldr/freeldr/include/fsrec.h
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c
trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
trunk/reactos/boot/freeldr/freeldr/disk/disk.c
trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild
trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
trunk/reactos/boot/freeldr/freeldr/include/disk.h
trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
trunk/reactos/boot/freeldr/freeldr/include/machine.h
trunk/reactos/boot/freeldr/freeldr/machine.c
trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Sat Oct 3 19:00:29
2009
@@ -202,7 +202,6 @@
// Now set default disk handling routines -- we don't need to override
//
MachVtbl.DiskGetBootPath = DiskGetBootPath;
- MachVtbl.DiskGetBootDevice = DiskGetBootDevice;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c [iso-8859-1] Sat Oct 3 19:00:29
2009
@@ -45,7 +45,6 @@
MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
MachVtbl.DiskGetBootPath = DiskGetBootPath;
- MachVtbl.DiskGetBootDevice = DiskGetBootDevice;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c [iso-8859-1] Sat Oct 3
19:00:29 2009
@@ -48,7 +48,6 @@
MachVtbl.PrepareForReactOS = XboxPrepareForReactOS;
MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
MachVtbl.DiskGetBootPath = DiskGetBootPath;
- MachVtbl.DiskGetBootDevice = DiskGetBootDevice;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] Sat Oct 3
19:00:29 2009
@@ -250,10 +250,6 @@
BOOLEAN PpcDiskGetBootPath( char *OutBootPath, unsigned Size ) {
strncpy( OutBootPath, BootPath, Size );
return TRUE;
-}
-
-VOID PpcDiskGetBootDevice( PULONG BootDevice ) {
- BootDevice[0] = BootDevice[1] = 0;
}
BOOLEAN PpcDiskReadLogicalSectors( ULONG DriveNumber, ULONGLONG SectorNumber,
@@ -490,7 +486,6 @@
MachVtbl.DiskNormalizeSystemPath = PpcDiskNormalizeSystemPath;
MachVtbl.DiskGetBootPath = PpcDiskGetBootPath;
- MachVtbl.DiskGetBootDevice = PpcDiskGetBootDevice;
MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors;
MachVtbl.DiskGetPartitionEntry = PpcDiskGetPartitionEntry;
MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry;
Modified: trunk/reactos/boot/freeldr/freeldr/disk/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] Sat Oct 3 19:00:29 2009
@@ -101,231 +101,6 @@
return TRUE;
}
-BOOLEAN DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG
SectorCount, int *FsType)
-{
- PARTITION_TABLE_ENTRY PartitionTableEntry;
- UCHAR VolumeType;
- ULONG ActivePartition;
-
- DPRINTM(DPRINT_FILESYSTEM, "FsOpenVolume() DriveNumber: 0x%x PartitionNumber:
0x%x\n", BootDrive, BootPartition);
-
- // Check and see if it is a floppy drive
- // If so then just assume FAT12 file system type
- if (DiskIsDriveRemovable(BootDrive))
- {
- DPRINTM(DPRINT_FILESYSTEM, "Drive is a floppy diskette drive. Assuming FAT12 file
system.\n");
-
- *DriveNumber = BootDrive;
- *StartSector = 0;
- *SectorCount = 2 * 80 * 18; /* FIXME hardcoded for 1.44 Mb */
- *FsType = FS_FAT;
- return TRUE;
- }
-
- // Check for ISO9660 file system type
- if (BootDrive >= 0x80 && FsRecIsIso9660(BootDrive))
- {
- DPRINTM(DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file
system.\n");
-
- *DriveNumber = BootDrive;
- *StartSector = 0;
- *SectorCount = 0;
- *FsType = FS_ISO9660;
- return TRUE;
- }
-
- // Get the requested partition entry
- if (BootPartition == 0)
- {
- // Partition requested was zero which means the boot partition
- if (! DiskGetActivePartitionEntry(BootDrive, &PartitionTableEntry,
&ActivePartition))
- {
- /* Try partition-less disk */
- *StartSector = 0;
- *SectorCount = 0;
- }
- /* Check for valid partition */
- else if (PartitionTableEntry.SystemIndicator == PARTITION_ENTRY_UNUSED)
- {
- return FALSE;
- }
- else
- {
- *StartSector = PartitionTableEntry.SectorCountBeforePartition;
- *SectorCount = PartitionTableEntry.PartitionSectorCount;
- }
- }
- else if (0xff == BootPartition)
- {
- /* Partition-less disk */
- *StartSector = 0;
- *SectorCount = 0;
- }
- else
- {
- // Get requested partition
- if (! MachDiskGetPartitionEntry(BootDrive, BootPartition, &PartitionTableEntry))
- {
- return FALSE;
- }
- /* Check for valid partition */
- else if (PartitionTableEntry.SystemIndicator == PARTITION_ENTRY_UNUSED)
- {
- return FALSE;
- }
- else
- {
- *StartSector = PartitionTableEntry.SectorCountBeforePartition;
- *SectorCount = PartitionTableEntry.PartitionSectorCount;
- }
- }
-
- // Try to recognize the file system
- if (!FsRecognizeVolume(BootDrive, *StartSector, &VolumeType))
- {
- return FALSE;
- }
-
- *DriveNumber = BootDrive;
-
- switch (VolumeType)
- {
- case PARTITION_FAT_12:
- case PARTITION_FAT_16:
- case PARTITION_HUGE:
- case PARTITION_XINT13:
- case PARTITION_FAT32:
- case PARTITION_FAT32_XINT13:
- *FsType = FS_FAT;
- return TRUE;
- case PARTITION_EXT2:
- *FsType = FS_EXT2;
- return TRUE;
- case PARTITION_NTFS:
- *FsType = FS_NTFS;
- return TRUE;
- default:
- *FsType = 0;
- return FALSE;
- }
-
- return TRUE;
-}
-
-VOID
-DiskGetBootDevice(PULONG BootDevice)
-{
- ((char *)BootDevice)[0] = (char)BootDrive;
- ((char *)BootDevice)[1] = (char)BootPartition;
-}
-
-#define IsRecognizedPartition(P) \
- ((P) == PARTITION_FAT_12 || \
- (P) == PARTITION_FAT_16 || \
- (P) == PARTITION_HUGE || \
- (P) == PARTITION_IFS || \
- (P) == PARTITION_EXT2 || \
- (P) == PARTITION_FAT32 || \
- (P) == PARTITION_FAT32_XINT13 || \
- (P) == PARTITION_XINT13)
-
-#define IsContainerPartition(P) \
- ((P) == PARTITION_EXTENDED || \
- (P) == PARTITION_XINT13_EXTENDED)
-
-BOOLEAN DiskGetSystemVolume(char *SystemPath,
- char *RemainingPath,
- PULONG Device)
-{
- ULONG PartitionNumber;
- PARTITION_TABLE_ENTRY PartitionTableEntry;
- UCHAR VolumeType;
- CHAR BootPath[256];
- unsigned i, RosPartition;
- ULONG DriveNumber;
-
- /*
- * Verify system path
- */
- if (!DissectArcPath(SystemPath, BootPath, &DriveNumber, &PartitionNumber))
- {
- return FALSE;
- }
- if (NULL != RemainingPath)
- {
- strcpy(RemainingPath, BootPath);
- }
-
- /* 0xff -> no partition table present, use whole device */
- if (0xff == PartitionNumber)
- {
- PartitionTableEntry.SectorCountBeforePartition = 0;
- i = 0xff;
- }
- else
- {
- /* recalculate the boot partition for freeldr */
- i = 0;
- RosPartition = 0;
- while (1)
- {
- if (!MachDiskGetPartitionEntry(DriveNumber, ++i, &PartitionTableEntry))
- {
- return FALSE;
- }
- if (!IsContainerPartition(PartitionTableEntry.SystemIndicator) &&
- PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED)
- {
- if (++RosPartition == PartitionNumber)
- {
- break;
- }
- }
- }
- }
-
- /* Check for ISO9660 file system type */
- if (DriveNumber >= 0x80 && FsRecIsIso9660(DriveNumber))
- {
- DPRINTM(DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file
system.\n");
-
- if (NULL != Device)
- {
- ((char *)Device)[0] = (char)DriveNumber;
- ((char *)Device)[1] = (char)i;
- }
- return TRUE;
- }
-
- if (!FsRecognizeVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition,
&VolumeType))
- {
- return FALSE;
- }
-
- if (NULL != Device)
- {
- ((char *)Device)[0] = (char)DriveNumber;
- ((char *)Device)[1] = (char)i;
- }
-
- switch (VolumeType)
- {
- case PARTITION_FAT_12:
- case PARTITION_FAT_16:
- case PARTITION_HUGE:
- case PARTITION_XINT13:
- case PARTITION_FAT32:
- case PARTITION_FAT32_XINT13:
- case PARTITION_EXT2:
- case PARTITION_NTFS:
- return TRUE;
- default:
- return FALSE;
- }
-
- return FALSE;
-}
-
BOOLEAN
DiskGetBootPath(char *BootPath, unsigned Size)
{
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild [iso-8859-1] Sat Oct 3
19:00:29 2009
@@ -31,7 +31,6 @@
<file>ext2.c</file>
<file>fat.c</file>
<file>fs.c</file>
- <file>fsrec.c</file>
<file>iso.c</file>
<file>ntfs.c</file>
</directory>
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/ex…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] Sat Oct 3 19:00:29 2009
@@ -59,6 +59,15 @@
ULONG Ext2GroupCount = 0; // Number of groups in this file system
ULONG Ext2InodesPerBlock = 0; // Number of inodes in one block
ULONG Ext2GroupDescPerBlock = 0; // Number of group descriptors in one block
+
+BOOLEAN DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG
SectorCount, int *FsType)
+{
+ *DriveNumber = 0;
+ *StartSector = 0;
+ *SectorCount = 0;
+ *FsType = 0;
+ return FALSE;
+}
BOOLEAN Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector, ULONGLONG
PartitionSectorCount)
{
Removed: trunk/reactos/boot/freeldr/freeldr/fs/fsrec.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fs…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fsrec.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fsrec.c (removed)
@@ -1,131 +1,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <freeldr.h>
-
-#define NDEBUG
-#include <debug.h>
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// FUNCTIONS
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-/*
- *
- * BOOLEAN FsRecognizeVolume(ULONG DriveNumber, ULONG VolumeStartSector, UCHAR*
VolumeType);
- *
- */
-BOOLEAN FsRecognizeVolume(ULONG DriveNumber, ULONG VolumeStartSector, UCHAR* VolumeType)
-{
-
- DPRINTM(DPRINT_FILESYSTEM, "FsRecognizeVolume() DriveNumber: 0x%x
VolumeStartSector: %d\n", DriveNumber, VolumeStartSector);
-
- if (FsRecIsFat(DriveNumber, VolumeStartSector))
- {
- *VolumeType = PARTITION_FAT32;
- return TRUE;
- }
- else if (FsRecIsNtfs(DriveNumber, VolumeStartSector))
- {
- *VolumeType = PARTITION_NTFS;
- return TRUE;
- }
- else if (FsRecIsExt2(DriveNumber, VolumeStartSector))
- {
- *VolumeType = PARTITION_EXT2;
- return TRUE;
- }
-
- return FALSE;
-}
-
-BOOLEAN FsRecIsIso9660(ULONG DriveNumber)
-{
- PUCHAR Sector = (PUCHAR)DISKREADBUFFER;
-
- if (!MachDiskReadLogicalSectors(DriveNumber, 16, 1, Sector))
- {
- FileSystemError("Failed to read the PVD.");
- return FALSE;
- }
-
- return (Sector[0] == 1 &&
- Sector[1] == 'C' &&
- Sector[2] == 'D' &&
- Sector[3] == '0' &&
- Sector[4] == '0' &&
- Sector[5] == '1');
-}
-
-BOOLEAN FsRecIsExt2(ULONG DriveNumber, ULONG VolumeStartSector)
-{
- PEXT2_SUPER_BLOCK SuperBlock = (PEXT2_SUPER_BLOCK)DISKREADBUFFER;
-
- if (!MachDiskReadLogicalSectors(DriveNumber, VolumeStartSector + 2, 2, SuperBlock))
- {
- FileSystemError("Failed to read the super block.");
- return FALSE;
- }
-
- if (SuperBlock->magic == EXT2_MAGIC)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-BOOLEAN FsRecIsFat(ULONG DriveNumber, ULONG VolumeStartSector)
-{
- PFAT_BOOTSECTOR BootSector = (PFAT_BOOTSECTOR)DISKREADBUFFER;
- PFAT32_BOOTSECTOR BootSector32 = (PFAT32_BOOTSECTOR)DISKREADBUFFER;
- PFATX_BOOTSECTOR BootSectorX = (PFATX_BOOTSECTOR)DISKREADBUFFER;
- if (!MachDiskReadLogicalSectors(DriveNumber, VolumeStartSector, 1, BootSector))
- {
- FileSystemError("Failed to read the boot sector.");
- return FALSE;
- }
-
- if (strncmp(BootSector->FileSystemType, "FAT12 ", 8) == 0 ||
- strncmp(BootSector->FileSystemType, "FAT16 ", 8) == 0 ||
- strncmp(BootSector32->FileSystemType, "FAT32 ", 8) == 0 ||
- strncmp(BootSectorX->FileSystemType, "FATX", 4) == 0)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-BOOLEAN FsRecIsNtfs(ULONG DriveNumber, ULONG VolumeStartSector)
-{
- PNTFS_BOOTSECTOR BootSector = (PNTFS_BOOTSECTOR)DISKREADBUFFER;
- if (!MachDiskReadLogicalSectors(DriveNumber, VolumeStartSector, 1, BootSector))
- {
- FileSystemError("Failed to read the boot sector.");
- return FALSE;
- }
-
- if (RtlEqualMemory(BootSector->SystemId, "NTFS", 4))
- {
- return TRUE;
- }
-
- return FALSE;
-}
Modified: trunk/reactos/boot/freeldr/freeldr/include/disk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] Sat Oct 3 19:00:29
2009
@@ -127,12 +127,7 @@
extern ULONG BootDrive;
extern ULONG BootPartition;
-BOOLEAN DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector,
- PULONGLONG SectorCount, int *FsType);
-BOOLEAN DiskGetSystemVolume(char *SystemPath, char *RemainingPath,
- PULONG Device);
BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
-VOID DiskGetBootDevice(PULONG BootDevice);
BOOLEAN DiskNormalizeSystemPath(char *SystemPath, unsigned Size);
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] Sat Oct 3 19:00:29
2009
@@ -59,7 +59,6 @@
#include <reactos.h>
#include <registry.h>
#include <winldr.h>
-#include <fsrec.h>
/* file system headers */
#include <fs/ext2.h>
#include <fs/fat.h>
Removed: trunk/reactos/boot/freeldr/freeldr/include/fsrec.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/fsrec.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/fsrec.h (removed)
@@ -1,29 +1,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __FSREC_H
-#define __FSREC_H
-
-BOOLEAN FsRecognizeVolume(ULONG DriveNumber, ULONG VolumeStartSector, UCHAR*
VolumeType);
-BOOLEAN FsRecIsIso9660(ULONG DriveNumber);
-BOOLEAN FsRecIsExt2(ULONG DriveNumber, ULONG VolumeStartSector);
-BOOLEAN FsRecIsFat(ULONG DriveNumber, ULONG VolumeStartSector);
-BOOLEAN FsRecIsNtfs(ULONG DriveNumber, ULONG VolumeStartSector);
-
-#endif // #defined __FSREC_H
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sat Oct 3 19:00:29
2009
@@ -63,7 +63,6 @@
ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size);
- VOID (*DiskGetBootDevice)(PULONG BootDevice);
BOOLEAN (*DiskNormalizeSystemPath)(char *SystemPath, unsigned Size);
BOOLEAN (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
BOOLEAN (*DiskGetPartitionEntry)(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
@@ -98,7 +97,6 @@
VOID MachBeep(VOID);
MEMORY_DESCRIPTOR* ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current);
BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size);
-VOID MachDiskGetBootDevice(PULONG BootDevice);
BOOLEAN MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size);
BOOLEAN MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
BOOLEAN MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
@@ -127,7 +125,6 @@
#define MachBeep() MachVtbl.Beep()
#define MachPrepareForReactOS(a) MachVtbl.PrepareForReactOS(a)
#define MachDiskGetBootPath(Path, Size) MachVtbl.DiskGetBootPath((Path), (Size))
-#define MachDiskGetBootDevice(BootDevice) MachVtbl.DiskGetBootDevice(BootDevice)
#define MachDiskNormalizeSystemPath(Path, Size) MachVtbl.DiskNormalizeSystemPath((Path),
(Size))
#define MachDiskReadLogicalSectors(Drive, Start, Count,
Buf) MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf))
#define MachDiskGetPartitionEntry(Drive, Part,
Entry) MachVtbl.DiskGetPartitionEntry((Drive), (Part), (Entry))
Modified: trunk/reactos/boot/freeldr/freeldr/machine.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Sat Oct 3 19:00:29 2009
@@ -37,7 +37,6 @@
#undef MachBeep
#undef MachPrepareForReactOS
#undef MachDiskGetBootPath
-#undef MachDiskGetBootDevice
#undef MachDiskNormalizeSystemPath
#undef MachDiskReadLogicalSectors
#undef MachDiskGetPartitionEntry
@@ -155,12 +154,6 @@
return MachVtbl.DiskGetBootPath(BootPath, Size);
}
-VOID
-MachDiskGetBootDevice(PULONG BootDevice)
-{
- MachVtbl.DiskGetBootDevice(BootDevice);
-}
-
BOOLEAN
MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size)
{
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] Sat Oct 3 19:00:29
2009
@@ -755,14 +755,11 @@
//
RamDiskSwitchFromBios();
- /*
- * Try to get system volume
- */
- if (!DiskGetSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice))
- {
- UiMessageBox("Failed to get system volume.");
- return;
- }
+ /* Get boot path */
+ if (strchr(SystemPath, '\\') != NULL)
+ strcpy(szBootPath, strchr(SystemPath, '\\'));
+ else
+ szBootPath[0] = '\0';
/* append a backslash */
if ((strlen(szBootPath)==0) ||