From 5aa541e6ebdadfa605ba0e248640eab9e7b5f007 Mon Sep 17 00:00:00 2001 From: robertmh Date: Tue, 8 Jan 2008 11:38:18 +0000 Subject: [PATCH] 2008-01-08 Robert Millan * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For `! grub_linux_is_bzimage', change order of address comparison to make it more intuitive, and improve "too big zImage" error message. --- ChangeLog | 6 ++++++ loader/i386/pc/linux.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f9fe83ba..f7dc6f2d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-08 Robert Millan + + * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For + `! grub_linux_is_bzimage', change order of address comparison to make + it more intuitive, and improve "too big zImage" error message. + 2008-01-08 Robert Millan * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and diff --git a/loader/i386/pc/linux.c b/loader/i386/pc/linux.c index d66fd2051..0b0c26ccf 100644 --- a/loader/i386/pc/linux.c +++ b/loader/i386/pc/linux.c @@ -146,10 +146,12 @@ grub_rescue_cmd_linux (int argc, char *argv[]) grub_linux_tmp_addr = (char *) GRUB_LINUX_BZIMAGE_ADDR + prot_size; if (! grub_linux_is_bzimage - && prot_size > (grub_size_t) (grub_linux_real_addr - - (char *) GRUB_LINUX_ZIMAGE_ADDR)) + && ((char *) GRUB_LINUX_ZIMAGE_ADDR + prot_size + > (grub_size_t) grub_linux_real_addr)) { - grub_error (GRUB_ERR_BAD_OS, "too big zImage, use bzImage instead"); + grub_error (GRUB_ERR_BAD_OS, "too big zImage (0x%x > 0x%x), use bzImage instead", + (char *) GRUB_LINUX_ZIMAGE_ADDR + prot_size, + (grub_size_t) grub_linux_real_addr); goto fail; }