mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
[FREELDR]: DiskGetBootPath can recognize ramdisk now.
svn path=/trunk/; revision=65974
This commit is contained in:
parent
7e2cc1475e
commit
df529736f3
1 changed files with 17 additions and 3 deletions
|
@ -106,11 +106,23 @@ DiskGetBootPath(char *BootPath, unsigned Size)
|
||||||
{
|
{
|
||||||
static char Path[] = "multi(0)disk(0)";
|
static char Path[] = "multi(0)disk(0)";
|
||||||
char Device[4];
|
char Device[4];
|
||||||
char Partition[4];
|
|
||||||
PARTITION_TABLE_ENTRY PartitionEntry;
|
|
||||||
MASTER_BOOT_RECORD MasterBootRecord;
|
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 */
|
/* This is a floppy */
|
||||||
|
|
||||||
|
@ -132,6 +144,8 @@ DiskGetBootPath(char *BootPath, unsigned Size)
|
||||||
else if (DiskReadBootRecord(FrldrBootDrive, 0, &MasterBootRecord))
|
else if (DiskReadBootRecord(FrldrBootDrive, 0, &MasterBootRecord))
|
||||||
{
|
{
|
||||||
ULONG BootPartition;
|
ULONG BootPartition;
|
||||||
|
PARTITION_TABLE_ENTRY PartitionEntry;
|
||||||
|
char Partition[4];
|
||||||
|
|
||||||
/* This is a hard disk */
|
/* This is a hard disk */
|
||||||
if (!DiskGetActivePartitionEntry(FrldrBootDrive, &PartitionEntry, &BootPartition))
|
if (!DiskGetActivePartitionEntry(FrldrBootDrive, &PartitionEntry, &BootPartition))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue