]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Sat, 27 May 2006 21:09:25 +0000 (21:09 +0000)
committerokuji <okuji@localhost>
Sat, 27 May 2006 21:09:25 +0000 (21:09 +0000)
        * commands/blocklist.c: New file.

        * DISTLIST: Added commands/blocklist.c.

        * term/efi/console.c (grub_console_highlight_color): Use a lighter
        color for the background, and a daker color for the foreground.
        (grub_console_checkkey): Return READ_KEY.
        (grub_console_cls): Set the background to
        GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.

        * kern/efi/efi.c (grub_efi_exit_boot_services): New function.

        * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
        the size of "padding5", "hd0_drive_info" and "hd1_drive_info".

        * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
        prototype.

        * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
        BG. The spec is wrong again.

        * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
        prototype.
        [GRUB_UTIL] (grub_blocklist_fini): Likewise.

        * conf/i386-pc.rmk (grub_emu_SOURCES): Added
        commands/blocklist.c.
        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

        * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
        (blocklist_mod_SOURCES): New variable.
        (blocklist_mod_CFLAGS): Likewise.
        (blocklist_mod_LDFLAGS): Likewise.

15 files changed:
ChangeLog
DISTLIST
commands/blocklist.c [new file with mode: 0644]
conf/common.mk
conf/common.rmk
conf/i386-pc.mk
conf/i386-pc.rmk
conf/powerpc-ieee1275.mk
conf/powerpc-ieee1275.rmk
include/grub/efi/api.h
include/grub/efi/efi.h
include/grub/i386/linux.h
include/grub/normal.h
kern/efi/efi.c
term/efi/console.c

index 29c9468b5ddc01a8528d7fb53d7ad46d26b01244..7d450c4ece23ff21fa647d2f129297c39ab4cf8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * commands/blocklist.c: New file.
+
+       * DISTLIST: Added commands/blocklist.c.
+
+       * term/efi/console.c (grub_console_highlight_color): Use a lighter
+       color for the background, and a daker color for the foreground.
+       (grub_console_checkkey): Return READ_KEY.
+       (grub_console_cls): Set the background to
+       GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
+
+       * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
+
+       * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
+       the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
+
+       * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
+       prototype.
+
+       * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
+       BG. The spec is wrong again.
+
+       * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
+       prototype.
+       [GRUB_UTIL] (grub_blocklist_fini): Likewise.
+
+       * conf/i386-pc.rmk (grub_emu_SOURCES): Added
+       commands/blocklist.c.
+       * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
+       
+       * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
+       (blocklist_mod_SOURCES): New variable.
+       (blocklist_mod_CFLAGS): Likewise.
+       (blocklist_mod_LDFLAGS): Likewise.
+
 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
 
        * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
index 725fd14cd9056641d6db187263f6120a9623db13..431da8f5dd373a213ae9c3e3e33ad35e1bcaddc9 100644 (file)
--- a/DISTLIST
+++ b/DISTLIST
@@ -31,6 +31,7 @@ boot/i386/pc/boot.S
 boot/i386/pc/diskboot.S
 boot/i386/pc/pxeboot.S
 commands/boot.c
+commands/blocklist.c
 commands/cat.c
 commands/cmp.c
 commands/configfile.c
diff --git a/commands/blocklist.c b/commands/blocklist.c
new file mode 100644 (file)
index 0000000..ec8233a
--- /dev/null
@@ -0,0 +1,114 @@
+/* blocklist.c - print the block list of a file */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2006  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/arg.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/disk.h>
+
+static grub_err_t
+grub_cmd_blocklist (struct grub_arg_list *state __attribute__ ((unused)),
+                   int argc, char **args)
+{
+  grub_file_t file;
+  char buf[GRUB_DISK_SECTOR_SIZE];
+  unsigned long start_sector = 0;
+  unsigned num_sectors = 0;
+  int num_entries = 0;
+  auto void read_blocklist (unsigned long sector, unsigned offset,
+                           unsigned length);
+  auto void print_blocklist (unsigned long sector, unsigned num,
+                            unsigned offset, unsigned length);
+  
+  void read_blocklist (unsigned long sector, unsigned offset,
+                      unsigned length)
+    {
+      if (num_sectors > 0)
+       {
+         if (start_sector + num_sectors == sector
+             && offset == 0 && length == GRUB_DISK_SECTOR_SIZE)
+           {
+             num_sectors++;
+             return;
+           }
+         
+         print_blocklist (start_sector, num_sectors, 0, 0);
+         num_sectors = 0;
+       }
+
+      if (offset == 0 && length == GRUB_DISK_SECTOR_SIZE)
+       {
+         start_sector = sector;
+         num_sectors++;
+       }
+      else
+       print_blocklist (sector, 0, offset, length);
+    }
+  
+  void print_blocklist (unsigned long sector, unsigned num,
+                       unsigned offset, unsigned length)
+    {
+      if (num_entries++)
+       grub_printf (",");
+
+      grub_printf ("%lu", sector);
+      if (num > 0)
+       grub_printf ("+%u", num);
+      if (offset != 0 || length != 0)
+       grub_printf ("[%u-%u]", offset, offset + length);
+    }
+  
+  if (argc < 1)
+    return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+
+  file = grub_file_open (args[0]);
+  if (! file)
+    return grub_errno;
+
+  file->read_hook = read_blocklist;
+
+  while (grub_file_read (file, buf, sizeof (buf)) > 0)
+    ;
+
+  if (num_sectors > 0)
+    print_blocklist (start_sector, num_sectors, 0, 0);
+  
+  grub_file_close (file);
+
+  return grub_errno;
+}
+
+\f
+GRUB_MOD_INIT(blocklist)
+{
+  (void) mod;                  /* To stop warning. */
+  grub_register_command ("blocklist", grub_cmd_blocklist,
+                        GRUB_COMMAND_FLAG_BOTH,
+                        "blocklist FILE",
+                        "Print a block list.", 0);
+}
+
+GRUB_MOD_FINI(blocklist)
+{
+  grub_unregister_command ("blocklist");
+}
index 3e15485429e25574443a209878a917626f5d2f47..3d2bb5f1d7952cb56454030f0cbb22112c07164b 100644 (file)
@@ -1040,7 +1040,7 @@ gpt_mod_LDFLAGS = $(COMMON_LDFLAGS)
 pkgdata_MODULES += hello.mod boot.mod terminal.mod ls.mod      \
        cmp.mod cat.mod help.mod font.mod search.mod            \
        loopback.mod configfile.mod                             \
-       terminfo.mod test.mod
+       terminfo.mod test.mod blocklist.mod
 
 # For hello.mod.
 hello_mod_SOURCES = hello/hello.c
@@ -1789,6 +1789,61 @@ fs-terminfo_mod-term_tparm.lst: term/tparm.c genfslist.sh
 terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
 terminfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For blocklist.mod.
+blocklist_mod_SOURCES = commands/blocklist.c
+CLEANFILES += blocklist.mod mod-blocklist.o mod-blocklist.c pre-blocklist.o blocklist_mod-commands_blocklist.o und-blocklist.lst
+ifneq ($(blocklist_mod_EXPORTS),no)
+CLEANFILES += def-blocklist.lst
+DEFSYMFILES += def-blocklist.lst
+endif
+MOSTLYCLEANFILES += blocklist_mod-commands_blocklist.d
+UNDSYMFILES += und-blocklist.lst
+
+blocklist.mod: pre-blocklist.o mod-blocklist.o
+       -rm -f $@
+       $(CC) $(blocklist_mod_LDFLAGS) $(LDFLAGS) -Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
+
+pre-blocklist.o: blocklist_mod-commands_blocklist.o
+       -rm -f $@
+       $(CC) $(blocklist_mod_LDFLAGS) $(LDFLAGS) -Wl,-r,-d -o $@ $^
+
+mod-blocklist.o: mod-blocklist.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(blocklist_mod_CFLAGS) -c -o $@ $<
+
+mod-blocklist.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'blocklist' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(blocklist_mod_EXPORTS),no)
+def-blocklist.lst: pre-blocklist.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 blocklist/' > $@
+endif
+
+und-blocklist.lst: pre-blocklist.o
+       echo 'blocklist' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+blocklist_mod-commands_blocklist.o: commands/blocklist.c
+       $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(blocklist_mod_CFLAGS) -c -o $@ $<
+
+blocklist_mod-commands_blocklist.d: commands/blocklist.c
+       set -e;           $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(blocklist_mod_CFLAGS) -M $<       | sed 's,blocklist\.o[ :]*,blocklist_mod-commands_blocklist.o $@ : ,g' > $@;    [ -s $@ ] || rm -f $@
+
+-include blocklist_mod-commands_blocklist.d
+
+CLEANFILES += cmd-blocklist_mod-commands_blocklist.lst fs-blocklist_mod-commands_blocklist.lst
+COMMANDFILES += cmd-blocklist_mod-commands_blocklist.lst
+FSFILES += fs-blocklist_mod-commands_blocklist.lst
+
+cmd-blocklist_mod-commands_blocklist.lst: commands/blocklist.c gencmdlist.sh
+       set -e;           $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(blocklist_mod_CFLAGS) -E $<       | sh $(srcdir)/gencmdlist.sh blocklist > $@ || (rm -f $@; exit 1)
+
+fs-blocklist_mod-commands_blocklist.lst: commands/blocklist.c genfslist.sh
+       set -e;           $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(blocklist_mod_CFLAGS) -E $<       | sh $(srcdir)/genfslist.sh blocklist > $@ || (rm -f $@; exit 1)
+
+
+blocklist_mod_CFLAGS = $(COMMON_CFLAGS)
+blocklist_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
 # Misc.
 pkgdata_MODULES += gzio.mod 
index 686e3ede116709dcd5c35c691b6557b3f72e9599..fcc146e61b67b9eebe456aa121cac270a7bd688a 100644 (file)
@@ -122,7 +122,7 @@ gpt_mod_LDFLAGS = $(COMMON_LDFLAGS)
 pkgdata_MODULES += hello.mod boot.mod terminal.mod ls.mod      \
        cmp.mod cat.mod help.mod font.mod search.mod            \
        loopback.mod configfile.mod                             \
-       terminfo.mod test.mod
+       terminfo.mod test.mod blocklist.mod
 
 # For hello.mod.
 hello_mod_SOURCES = hello/hello.c
@@ -189,6 +189,10 @@ terminfo_mod_SOURCES = term/terminfo.c term/tparm.c
 terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
 terminfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For blocklist.mod.
+blocklist_mod_SOURCES = commands/blocklist.c
+blocklist_mod_CFLAGS = $(COMMON_CFLAGS)
+blocklist_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
 # Misc.
 pkgdata_MODULES += gzio.mod 
index bac9120a8de8566689461a26a4c6ae8d75025a59..077e24bb1a265d374402f12e4fabd6a404718cab 100644 (file)
@@ -766,7 +766,7 @@ grub_probefs-fs_hfsplus.d: fs/hfsplus.c
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c       \
        commands/configfile.c commands/help.c                           \
        commands/terminal.c commands/ls.c commands/test.c               \
-       commands/search.c                                               \
+       commands/search.c commands/blocklist.c                          \
        commands/i386/pc/halt.c commands/i386/pc/reboot.c               \
        disk/loopback.c                                                 \
        fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c  \
@@ -784,10 +784,10 @@ grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c  \
        util/console.c util/grub-emu.c util/misc.c                      \
        util/i386/pc/biosdisk.c util/i386/pc/getroot.c                  \
        util/i386/pc/misc.c grub_emu_init.c
-CLEANFILES += grub-emu grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o
-MOSTLYCLEANFILES += grub_emu-commands_boot.d grub_emu-commands_cat.d grub_emu-commands_cmp.d grub_emu-commands_configfile.d grub_emu-commands_help.d grub_emu-commands_terminal.d grub_emu-commands_ls.d grub_emu-commands_test.d grub_emu-commands_search.d grub_emu-commands_i386_pc_halt.d grub_emu-commands_i386_pc_reboot.d grub_emu-disk_loopback.d grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-fs_hfsplus.d grub_emu-io_gzio.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-normal_execute.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-normal_lexer.d grub_emu-kern_loader.d grub_emu-kern_main.d grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-grub_script_tab.d grub_emu-kern_partition.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_function.d grub_emu-normal_completion.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-normal_menu_entry.d grub_emu-normal_misc.d grub_emu-normal_script.d grub_emu-partmap_amiga.d grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d grub_emu-partmap_acorn.d grub_emu-partmap_gpt.d grub_emu-util_console.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d grub_emu-util_i386_pc_misc.d grub_emu-grub_emu_init.d
+CLEANFILES += grub-emu grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_blocklist.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o
+MOSTLYCLEANFILES += grub_emu-commands_boot.d grub_emu-commands_cat.d grub_emu-commands_cmp.d grub_emu-commands_configfile.d grub_emu-commands_help.d grub_emu-commands_terminal.d grub_emu-commands_ls.d grub_emu-commands_test.d grub_emu-commands_search.d grub_emu-commands_blocklist.d grub_emu-commands_i386_pc_halt.d grub_emu-commands_i386_pc_reboot.d grub_emu-disk_loopback.d grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-fs_hfsplus.d grub_emu-io_gzio.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-normal_execute.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-normal_lexer.d grub_emu-kern_loader.d grub_emu-kern_main.d grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-grub_script_tab.d grub_emu-kern_partition.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_function.d grub_emu-normal_completion.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-normal_menu_entry.d grub_emu-normal_misc.d grub_emu-normal_script.d grub_emu-partmap_amiga.d grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d grub_emu-partmap_acorn.d grub_emu-partmap_gpt.d grub_emu-util_console.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d grub_emu-util_i386_pc_misc.d grub_emu-grub_emu_init.d
 
-grub-emu: grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o
+grub-emu: grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_blocklist.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o
        $(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(grub_emu_LDFLAGS)
 
 grub_emu-commands_boot.o: commands/boot.c
@@ -862,6 +862,14 @@ grub_emu-commands_search.d: commands/search.c
 
 -include grub_emu-commands_search.d
 
+grub_emu-commands_blocklist.o: commands/blocklist.c
+       $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $<
+
+grub_emu-commands_blocklist.d: commands/blocklist.c
+       set -e;           $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $<    | sed 's,blocklist\.o[ :]*,grub_emu-commands_blocklist.o $@ : ,g' > $@;         [ -s $@ ] || rm -f $@
+
+-include grub_emu-commands_blocklist.d
+
 grub_emu-commands_i386_pc_halt.o: commands/i386/pc/halt.c
        $(BUILD_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $<
 
index d02a6ed781f79880dd0c6400619541b220e34b7e..05e699f381ba6fa6238e7a99546f3643ef80d1a4 100644 (file)
@@ -82,7 +82,7 @@ grub_probefs_SOURCES = util/i386/pc/grub-probefs.c    \
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c       \
        commands/configfile.c commands/help.c                           \
        commands/terminal.c commands/ls.c commands/test.c               \
-       commands/search.c                                               \
+       commands/search.c commands/blocklist.c                          \
        commands/i386/pc/halt.c commands/i386/pc/reboot.c               \
        disk/loopback.c                                                 \
        fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c  \
index 30dd778dce5d92ba50d643389cc7d262ba56afa9..d8044f0142d9e6222b2d477b94d3d41d279d254e 100644 (file)
@@ -68,7 +68,7 @@ grub_mkimage-util_resolve.d: util/resolve.c
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c       \
        commands/configfile.c commands/help.c                           \
        commands/search.c commands/terminal.c commands/test.c           \
-       commands/ls.c                                                   \
+       commands/ls.c commands/blocklist.c                              \
        commands/ieee1275/halt.c commands/ieee1275/reboot.c             \
        disk/loopback.c                                                 \
        fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c  \
@@ -86,10 +86,10 @@ grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c    \
        util/console.c util/grub-emu.c util/misc.c                      \
        util/i386/pc/biosdisk.c util/i386/pc/getroot.c                  \
        util/powerpc/ieee1275/misc.c grub_script.tab.c grub_emu_init.c
-CLEANFILES += grub-emu grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_search.o grub_emu-commands_terminal.o grub_emu-commands_test.o grub_emu-commands_ls.o grub_emu-commands_ieee1275_halt.o grub_emu-commands_ieee1275_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_completion.o grub_emu-normal_execute.o grub_emu-normal_function.o grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o grub_emu-grub_emu_init.o
-MOSTLYCLEANFILES += grub_emu-commands_boot.d grub_emu-commands_cat.d grub_emu-commands_cmp.d grub_emu-commands_configfile.d grub_emu-commands_help.d grub_emu-commands_search.d grub_emu-commands_terminal.d grub_emu-commands_test.d grub_emu-commands_ls.d grub_emu-commands_ieee1275_halt.d grub_emu-commands_ieee1275_reboot.d grub_emu-disk_loopback.d grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-fs_hfsplus.d grub_emu-io_gzio.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-kern_loader.d grub_emu-kern_main.d grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-kern_partition.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_completion.d grub_emu-normal_execute.d grub_emu-normal_function.d grub_emu-normal_lexer.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-normal_menu_entry.d grub_emu-normal_misc.d grub_emu-normal_script.d grub_emu-partmap_amiga.d grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d grub_emu-partmap_acorn.d grub_emu-util_console.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d grub_emu-util_powerpc_ieee1275_misc.d grub_emu-grub_script_tab.d grub_emu-grub_emu_init.d
+CLEANFILES += grub-emu grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_search.o grub_emu-commands_terminal.o grub_emu-commands_test.o grub_emu-commands_ls.o grub_emu-commands_blocklist.o grub_emu-commands_ieee1275_halt.o grub_emu-commands_ieee1275_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_completion.o grub_emu-normal_execute.o grub_emu-normal_function.o grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o grub_emu-grub_emu_init.o
+MOSTLYCLEANFILES += grub_emu-commands_boot.d grub_emu-commands_cat.d grub_emu-commands_cmp.d grub_emu-commands_configfile.d grub_emu-commands_help.d grub_emu-commands_search.d grub_emu-commands_terminal.d grub_emu-commands_test.d grub_emu-commands_ls.d grub_emu-commands_blocklist.d grub_emu-commands_ieee1275_halt.d grub_emu-commands_ieee1275_reboot.d grub_emu-disk_loopback.d grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-fs_hfsplus.d grub_emu-io_gzio.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-kern_loader.d grub_emu-kern_main.d grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-kern_partition.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_completion.d grub_emu-normal_execute.d grub_emu-normal_function.d grub_emu-normal_lexer.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-normal_menu_entry.d grub_emu-normal_misc.d grub_emu-normal_script.d grub_emu-partmap_amiga.d grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d grub_emu-partmap_acorn.d grub_emu-util_console.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d grub_emu-util_powerpc_ieee1275_misc.d grub_emu-grub_script_tab.d grub_emu-grub_emu_init.d
 
-grub-emu: grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_search.o grub_emu-commands_terminal.o grub_emu-commands_test.o grub_emu-commands_ls.o grub_emu-commands_ieee1275_halt.o grub_emu-commands_ieee1275_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_completion.o grub_emu-normal_execute.o grub_emu-normal_function.o grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o grub_emu-grub_emu_init.o
+grub-emu: grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_help.o grub_emu-commands_search.o grub_emu-commands_terminal.o grub_emu-commands_test.o grub_emu-commands_ls.o grub_emu-commands_blocklist.o grub_emu-commands_ieee1275_halt.o grub_emu-commands_ieee1275_reboot.o grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_completion.o grub_emu-normal_execute.o grub_emu-normal_function.o grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o grub_emu-grub_emu_init.o
        $(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(grub_emu_LDFLAGS)
 
 grub_emu-commands_boot.o: commands/boot.c
@@ -164,6 +164,14 @@ grub_emu-commands_ls.d: commands/ls.c
 
 -include grub_emu-commands_ls.d
 
+grub_emu-commands_blocklist.o: commands/blocklist.c
+       $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $<
+
+grub_emu-commands_blocklist.d: commands/blocklist.c
+       set -e;           $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $<    | sed 's,blocklist\.o[ :]*,grub_emu-commands_blocklist.o $@ : ,g' > $@;         [ -s $@ ] || rm -f $@
+
+-include grub_emu-commands_blocklist.d
+
 grub_emu-commands_ieee1275_halt.o: commands/ieee1275/halt.c
        $(BUILD_CC) -Icommands/ieee1275 -I$(srcdir)/commands/ieee1275 $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $<
 
index 70f599db1690068df6741df2db7090ba76dc6171..7424635fe7ae9afedbf7bf1f75ee6898ad8734d0 100644 (file)
@@ -38,7 +38,7 @@ grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c       \
        commands/configfile.c commands/help.c                           \
        commands/search.c commands/terminal.c commands/test.c           \
-       commands/ls.c                                                   \
+       commands/ls.c commands/blocklist.c                              \
        commands/ieee1275/halt.c commands/ieee1275/reboot.c             \
        disk/loopback.c                                                 \
        fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c  \
index 36dc44f4a20143e6e0007be399c67d346c9f269f..98f256e7061420efe5d1f49241d9ae2b45ecc628 100644 (file)
@@ -1002,7 +1002,7 @@ typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output
 #define GRUB_EFI_BACKGROUND_BROWN      0x60
 #define GRUB_EFI_BACKGROUND_LIGHTGRAY  0x70
 
-#define GRUB_EFI_TEXT_ATTR(fg, bg)     ((fg) | ((bg) << 4))
+#define GRUB_EFI_TEXT_ATTR(fg, bg)     ((fg) | ((bg)))
 
 struct grub_efi_system_table
 {
index f28e39241ff0d09c5219f381b8f38db4c4434535..244d5bc8f03d98d1a92b6d3b1e2bb082afa6d242 100644 (file)
@@ -54,6 +54,7 @@ void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp);
 char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp);
 grub_efi_device_path_t *
 EXPORT_FUNC(grub_efi_get_device_path) (grub_efi_handle_t handle);
+int EXPORT_FUNC(grub_efi_exit_boot_services) (grub_efi_uintn_t map_key);
 
 void grub_efi_mm_init (void);
 void grub_efi_mm_fini (void);
index 669eb99486a6f46c0b55aad1088fa9fac04e19a2..2daf7cd3e3c31b5e12b8641fccea202abb06ee7b 100644 (file)
@@ -147,12 +147,12 @@ struct linux_kernel_params
   grub_uint32_t ist_signature;         /* 60 */
   grub_uint32_t ist_command;           /* 64 */
   grub_uint32_t ist_event;             /* 68 */
-  grub_uint32_t ist_perf_level;                /* 6a */
+  grub_uint32_t ist_perf_level;                /* 6c */
 
-  grub_uint8_t padding5[0x80 - 0x6e];
+  grub_uint8_t padding5[0x80 - 0x70];
   
-  grub_uint8_t hd0_drive_info[10];     /* 80 */
-  grub_uint8_t hd1_drive_info[10];     /* 90 */
+  grub_uint8_t hd0_drive_info[0x10];   /* 80 */
+  grub_uint8_t hd1_drive_info[0x10];   /* 90 */
   grub_uint16_t rom_config_len;                /* a0 */
 
   grub_uint8_t padding6[0x1c0 - 0xa2];
@@ -176,7 +176,6 @@ struct linux_kernel_params
   
   grub_uint8_t ps_mouse;               /* 1ff */
 } __attribute__ ((packed));
-
 #endif /* ! ASM_FILE */
 
 #endif /* ! GRUB_LINUX_MACHINE_HEADER */
index f73649abdbc6a29a9086f66328f4e0ceffc46293..898cfa3500cdb8ec70ede3c239b902706ea23d41 100644 (file)
@@ -186,6 +186,8 @@ void grub_search_init (void);
 void grub_search_fini (void);
 void grub_test_init (void);
 void grub_test_fini (void);
+void grub_blocklist_init (void);
+void grub_blocklist_fini (void);
 #endif
 
 #endif /* ! GRUB_NORMAL_HEADER */
index 12ecc9f129bd65c37d84e2442637f8614818ed2f..fd395568260c3e878c56ccd96726fade9715b6a0 100644 (file)
@@ -161,6 +161,17 @@ grub_exit (void)
                                              0, 0);
 }
 
+int
+grub_efi_exit_boot_services (grub_efi_uintn_t map_key)
+{
+  grub_efi_boot_services_t *b;
+  grub_efi_status_t status;
+  
+  b = grub_efi_system_table->boot_services;
+  status = b->exit_boot_services (grub_efi_image_handle, map_key);
+  return status == GRUB_EFI_SUCCESS;
+}
+
 grub_uint32_t
 grub_get_rtc (void)
 {
index d97892f439efe05d126ef60c3417f35313a6bb89..639e846070f8e12658b23de52baedca8d5e9ab06 100644 (file)
@@ -32,8 +32,8 @@ static grub_uint8_t
 grub_console_normal_color = GRUB_EFI_TEXT_ATTR (GRUB_EFI_LIGHTGRAY,
                                                GRUB_EFI_BACKGROUND_BLACK);
 static grub_uint8_t
-grub_console_highlight_color = GRUB_EFI_TEXT_ATTR (GRUB_EFI_WHITE,
-                                                  GRUB_EFI_BACKGROUND_BLACK);
+grub_console_highlight_color = GRUB_EFI_TEXT_ATTR (GRUB_EFI_BLACK,
+                                                  GRUB_EFI_BACKGROUND_LIGHTGRAY);
 
 static int read_key = -1;
 
@@ -146,7 +146,7 @@ grub_console_checkkey (void)
        }
     }
 
-  return read_key >= 0;
+  return read_key;
 }
 
 static int
@@ -222,9 +222,13 @@ static void
 grub_console_cls (void)
 {
   grub_efi_simple_text_output_interface_t *o;
+  grub_efi_int32_t orig_attr;
   
   o = grub_efi_system_table->con_out;
+  orig_attr = o->mode->attribute;
+  o->set_attributes (o, GRUB_EFI_BACKGROUND_BLACK);
   o->clear_screen (o);
+  o->set_attributes (o, orig_attr);
 }
 
 static void