From 234328552802a698c7dc66c0d5f204975cd62a64 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 16 Jan 2010 16:36:42 +0100 Subject: [PATCH] Don't pass biosdev if not booted from BIOS disk --- loader/i386/multiboot_mbi.c | 3 +++ loader/i386/multiboot_mbi2.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/loader/i386/multiboot_mbi.c b/loader/i386/multiboot_mbi.c index 9c45b3352..3e63b3456 100644 --- a/loader/i386/multiboot_mbi.c +++ b/loader/i386/multiboot_mbi.c @@ -417,6 +417,9 @@ grub_multiboot_set_bootdev (void) biosdev = 0xffffffff; #endif + if (biosdev == 0xffffffff) + return; + dev = grub_device_open (0); if (dev && dev->disk && dev->disk->partition) { diff --git a/loader/i386/multiboot_mbi2.c b/loader/i386/multiboot_mbi2.c index 031d4c0eb..de234727b 100644 --- a/loader/i386/multiboot_mbi2.c +++ b/loader/i386/multiboot_mbi2.c @@ -442,6 +442,9 @@ grub_multiboot_set_bootdev (void) biosdev = 0xffffffff; #endif + if (biosdev == 0xffffffff) + return; + dev = grub_device_open (0); if (dev && dev->disk && dev->disk->partition) {