mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
- Added support for special value "LiveCD" of SystemPath option
for loading ReactOS. It uses the known boot drive information as the boot path. svn path=/trunk/; revision=9457
This commit is contained in:
parent
1c9e1c3a8b
commit
17983ae6be
3 changed files with 59 additions and 38 deletions
|
@ -1,3 +1,9 @@
|
|||
Changes in v1.8.20 (21/05/2004) (navaraf)
|
||||
|
||||
- Added support for special value "LiveCD" of SystemPath option
|
||||
for loading ReactOS. It uses the known boot drive information
|
||||
as the boot path.
|
||||
|
||||
Changes in v1.8.19 (12/20/2003) (ekohl)
|
||||
|
||||
- Detect PS/2 Port and Pointer Device (Mouse).
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
/* just some stuff */
|
||||
#define VERSION "FreeLoader v1.8.19"
|
||||
#define VERSION "FreeLoader v1.8.20"
|
||||
#define COPYRIGHT "Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>"
|
||||
#define AUTHOR_EMAIL "<brianp@sginet.com>"
|
||||
#define BY_AUTHOR "by Brian Palmer"
|
||||
|
@ -36,7 +36,7 @@
|
|||
//
|
||||
#define FREELOADER_MAJOR_VERSION 1
|
||||
#define FREELOADER_MINOR_VERSION 8
|
||||
#define FREELOADER_PATCH_VERSION 19
|
||||
#define FREELOADER_PATCH_VERSION 20
|
||||
|
||||
|
||||
#ifndef ASM
|
||||
|
|
|
@ -515,48 +515,63 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
|||
}
|
||||
|
||||
/*
|
||||
* Verify system path
|
||||
* Special case for Live CD.
|
||||
*/
|
||||
if (!DissectArcPath(value, szBootPath, &BootDrive, &BootPartition))
|
||||
if (!stricmp(value, "LiveCD"))
|
||||
{
|
||||
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
|
||||
UiMessageBox(MsgBuffer);
|
||||
return;
|
||||
}
|
||||
strcpy(szBootPath, "\\reactos");
|
||||
|
||||
/* set boot drive and partition */
|
||||
/* Set kernel command line */
|
||||
sprintf(multiboot_kernel_cmdline,
|
||||
"multi(0)disk(0)cdrom(%u)\\reactos",
|
||||
(unsigned int)BootDrive);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Verify system path
|
||||
*/
|
||||
if (!DissectArcPath(value, szBootPath, &BootDrive, &BootPartition))
|
||||
{
|
||||
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
|
||||
UiMessageBox(MsgBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* recalculate the boot partition for freeldr */
|
||||
i = 0;
|
||||
rosPartition = 0;
|
||||
while (1)
|
||||
{
|
||||
if (!DiskGetPartitionEntry(BootDrive, ++i, &PartitionTableEntry))
|
||||
{
|
||||
BootPartition = 0;
|
||||
break;
|
||||
}
|
||||
if (IsRecognizedPartition(PartitionTableEntry.SystemIndicator))
|
||||
{
|
||||
if (++rosPartition == BootPartition)
|
||||
{
|
||||
BootPartition = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BootPartition == 0)
|
||||
{
|
||||
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
|
||||
UiMessageBox(MsgBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy ARC path into kernel command line */
|
||||
strcpy(multiboot_kernel_cmdline, value);
|
||||
}
|
||||
|
||||
/* Set boot drive and partition */
|
||||
((char *)(&mb_info.boot_device))[0] = (char)BootDrive;
|
||||
((char *)(&mb_info.boot_device))[1] = (char)BootPartition;
|
||||
|
||||
/* recalculate the boot partition for freeldr */
|
||||
i = 0;
|
||||
rosPartition = 0;
|
||||
while (1)
|
||||
{
|
||||
if (!DiskGetPartitionEntry(BootDrive, ++i, &PartitionTableEntry))
|
||||
{
|
||||
BootPartition = 0;
|
||||
break;
|
||||
}
|
||||
if (IsRecognizedPartition(PartitionTableEntry.SystemIndicator))
|
||||
{
|
||||
if (++rosPartition == BootPartition)
|
||||
{
|
||||
BootPartition = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BootPartition == 0)
|
||||
{
|
||||
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
|
||||
UiMessageBox(MsgBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy ARC path into kernel command line */
|
||||
strcpy(multiboot_kernel_cmdline, value);
|
||||
|
||||
/*
|
||||
* Read the optional kernel parameters (if any)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue