From f77a8c24709523ab1074b6272cf8dafe0f5de7d9 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 17 Oct 2010 00:25:23 +0200 Subject: [PATCH] * util/grub-setup.c (setup): Don't clean blocklists before readability verfification. --- ChangeLog | 5 +++++ util/grub-setup.c | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fa6586d1..731abcb0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-17 Vladimir Serbinenko + + * util/grub-setup.c (setup): Don't clean blocklists before readability + verfification. + 2010-10-16 Vladimir Serbinenko * docs/grub.texi (Installation): Document embedding zone. Remove diff --git a/util/grub-setup.c b/util/grub-setup.c index 920d867f2..ab0098468 100644 --- a/util/grub-setup.c +++ b/util/grub-setup.c @@ -319,18 +319,6 @@ setup (const char *dir, } #endif - /* Clean out the blocklists. */ - block = first_block; - while (block->len) - { - grub_memset (block, 0, sizeof (block)); - - block--; - - if ((char *) block <= core_img) - grub_util_error ("No terminator in the core image"); - } - #ifdef GRUB_MACHINE_PCBIOS { grub_partition_map_t dest_partmap = NULL; @@ -434,6 +422,18 @@ setup (const char *dir, goto unable_to_embed; } + /* Clean out the blocklists. */ + block = first_block; + while (block->len) + { + grub_memset (block, 0, sizeof (block)); + + block--; + + if ((char *) block <= core_img) + grub_util_error ("No terminator in the core image"); + } + save_first_sector (sectors[0] + grub_partition_get_start (container), 0, GRUB_DISK_SECTOR_SIZE);