Merged with mainline

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-11-09 21:58:49 +01:00
commit 99145bdc4b
55 changed files with 15144 additions and 55 deletions

View file

@ -31,7 +31,7 @@ grub_register_command_prio (const char *name,
{
grub_command_t cmd;
cmd = (grub_command_t) grub_malloc (sizeof (*cmd));
cmd = (grub_command_t) grub_zalloc (sizeof (*cmd));
if (! cmd)
return 0;
@ -42,7 +42,6 @@ grub_register_command_prio (const char *name,
cmd->flags = GRUB_COMMAND_FLAG_BOTH;
cmd->prio = prio;
cmd->data = 0;
grub_prio_list_insert (GRUB_AS_PRIO_LIST_P (&grub_command_list),
GRUB_AS_PRIO_LIST (cmd));

View file

@ -1,6 +1,6 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 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
@ -40,7 +40,7 @@ void
grub_machine_mmap_init ()
{
if (! startup_multiboot_info)
grub_fatal ("Must be loaded using Multiboot specification (is this an old version of coreboot?)");
grub_fatal ("Unable to find Multiboot Information (is CONFIG_MULTIBOOT disabled in coreboot?)");
/* Move MBI to a safe place. */
grub_memmove (&kern_multiboot_info, startup_multiboot_info, sizeof (struct grub_multiboot_info));
@ -51,7 +51,8 @@ grub_machine_mmap_init ()
/* Move the memory map to a safe place. */
if (kern_multiboot_info.mmap_length > sizeof (mmap_entries))
{
grub_printf ("WARNING: Memory map size exceeds limit; it will be truncated\n");
grub_printf ("WARNING: Memory map size exceeds limit (0x%x > 0x%x); it will be truncated\n",
kern_multiboot_info.mmap_length, sizeof (mmap_entries));
kern_multiboot_info.mmap_length = sizeof (mmap_entries);
}
grub_memmove (mmap_entries, (void *) kern_multiboot_info.mmap_addr, kern_multiboot_info.mmap_length);

View file

@ -19,6 +19,7 @@
#include <grub/list.h>
#include <grub/misc.h>
#include <grub/mm.h>
void
grub_list_push (grub_list_t *head, grub_list_t item)
@ -81,7 +82,7 @@ grub_list_insert (grub_list_t *head, grub_list_t item,
void *
grub_named_list_find (grub_named_list_t head, const char *name)
{
grub_named_list_t result = 0;
grub_named_list_t result = NULL;
auto int list_find (grub_named_list_t item);
int list_find (grub_named_list_t item)