From 249f9c7ce29582d0f13694700107b793345dd224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 28 Jan 2015 23:23:48 +0000 Subject: [PATCH] [FREELDR]: Reset FrldrBootDrive before chainloading in some cases (when the boot drive is going to change), because ChainLoadBiosBootSectorCode uses FrldrBootDrive for the boot drive. An alternative would be to pass this boot drive as a parameter to ChainLoadBiosBootSectorCode... Fixes FreeLdr booting to another drive. svn path=/trunk/; revision=66106 --- reactos/boot/freeldr/freeldr/arch/i386/miscboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c b/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c index 2df7ab53376..328c065b0c3 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c @@ -154,6 +154,7 @@ LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem, // result in a read error. //DiskStopFloppyMotor(); //DisableA20(); + FrldrBootDrive = DriveNumber; ChainLoadBiosBootSectorCode(); } @@ -211,5 +212,6 @@ LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, // result in a read error. //DiskStopFloppyMotor(); //DisableA20(); + FrldrBootDrive = DriveNumber; ChainLoadBiosBootSectorCode(); }