Author: hbelusca
Date: Sun Jan 4 17:08:41 2015
New Revision: 65974
URL:
http://svn.reactos.org/svn/reactos?rev=65974&view=rev
Log:
[FREELDR]: DiskGetBootPath can recognize ramdisk now.
Modified:
trunk/reactos/boot/freeldr/freeldr/disk/disk.c
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] Sun Jan 4 17:08:41 2015
@@ -106,11 +106,23 @@
{
static char Path[] = "multi(0)disk(0)";
char Device[4];
- char Partition[4];
- PARTITION_TABLE_ENTRY PartitionEntry;
MASTER_BOOT_RECORD MasterBootRecord;
- if (FrldrBootDrive < 0x80)
+ /* 0x49 is our magic ramdisk drive, so try to detect it first */
+ if (FrldrBootDrive == 0x49)
+ {
+ /* This is the ramdisk. See ArmDiskGetBootPath too... */
+
+ PCCH RamDiskPath = "ramdisk(0)";
+
+ if (Size < sizeof(RamDiskPath))
+ {
+ return FALSE;
+ }
+
+ strcpy(BootPath, RamDiskPath);
+ }
+ else if (FrldrBootDrive < 0x80)
{
/* This is a floppy */
@@ -132,6 +144,8 @@
else if (DiskReadBootRecord(FrldrBootDrive, 0, &MasterBootRecord))
{
ULONG BootPartition;
+ PARTITION_TABLE_ENTRY PartitionEntry;
+ char Partition[4];
/* This is a hard disk */
if (!DiskGetActivePartitionEntry(FrldrBootDrive, &PartitionEntry,
&BootPartition))