From afff2765ab334508956f76fb177d7012d650a122 Mon Sep 17 00:00:00 2001 From: Andrew Greenwood Date: Sat, 17 Jan 2009 14:20:47 +0000 Subject: [PATCH] Treat "LiveCD" system path as a prefix rather than an entire path. This allows a custom path to be specified, so FreeLDR can boot multiple ReactOS builds from the same CD. FreeLDR happily does this, ReactOS does not like booting from a livecd path other than \reactos however. Updated livecd.ini to use the new style of livecd system path. svn path=/trunk/; revision=38813 --- reactos/boot/bootdata/livecd.ini | 2 +- reactos/boot/freeldr/freeldr/reactos/reactos.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/boot/bootdata/livecd.ini b/reactos/boot/bootdata/livecd.ini index eccc008398f..d34a5d039b6 100644 --- a/reactos/boot/bootdata/livecd.ini +++ b/reactos/boot/bootdata/livecd.ini @@ -24,5 +24,5 @@ ReactOS="ReactOS" [ReactOS] BootType=ReactOS -SystemPath=LiveCD +SystemPath=LiveCD\reactos Options=/DEBUGPORT=COM1 /SOS diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index 9b388fbe809..d7ea42ba84e 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -574,6 +574,7 @@ LoadAndBootReactOS(PCSTR OperatingSystemName) CHAR name[255]; CHAR value[255]; CHAR SystemPath[255]; + CHAR LivePath[255]; CHAR szKernelName[255]; CHAR szFileName[255]; CHAR MsgBuffer[256]; @@ -704,11 +705,13 @@ LoadAndBootReactOS(PCSTR OperatingSystemName) /* * Special case for Live CD. */ - if (!_stricmp(SystemPath, "LiveCD")) + if (!_strnicmp(SystemPath, "LiveCD", strlen("LiveCD"))) { + /* Use everything following the "LiveCD" string as the path */ + strcpy(LivePath, SystemPath + strlen("LiveCD")); /* Normalize */ MachDiskGetBootPath(SystemPath, sizeof(SystemPath)); - strcat(SystemPath, "\\reactos"); + strcat(SystemPath, LivePath); strcat(strcpy(reactos_kernel_cmdline, SystemPath), " /MININT"); }