Merge mainline into multiterm

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-05 16:27:41 +01:00
commit 519634516f
239 changed files with 3529 additions and 1873 deletions

View file

@ -34,6 +34,7 @@
#include <grub/aout.h>
#include <grub/command.h>
#include <grub/extcmd.h>
#include <grub/i18n.h>
#ifdef GRUB_MACHINE_PCBIOS
#include <grub/machine/biosnum.h>
@ -61,20 +62,20 @@ static grub_uint32_t openbsd_root;
static const struct grub_arg_option freebsd_opts[] =
{
{"dual", 'D', 0, "Display output on all consoles.", 0, 0},
{"serial", 'h', 0, "Use serial console.", 0, 0},
{"askname", 'a', 0, "Ask for file name to reboot from.", 0, 0},
{"cdrom", 'C', 0, "Use cdrom as root.", 0, 0},
{"config", 'c', 0, "Invoke user configuration routing.", 0, 0},
{"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0},
{"gdb", 'g', 0, "Use GDB remote debugger instead of DDB.", 0, 0},
{"mute", 'm', 0, "Disable all boot output.", 0, 0},
{"dual", 'D', 0, N_("Display output on all consoles."), 0, 0},
{"serial", 'h', 0, N_("Use serial console."), 0, 0},
{"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0},
{"cdrom", 'C', 0, N_("Use CDROM as root."), 0, 0},
{"config", 'c', 0, N_("Invoke user configuration routing."), 0, 0},
{"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0},
{"gdb", 'g', 0, N_("Use GDB remote debugger instead of DDB."), 0, 0},
{"mute", 'm', 0, N_("Disable all boot output."), 0, 0},
{"nointr", 'n', 0, "", 0, 0},
{"pause", 'p', 0, "Wait for keypress after every line of output.", 0, 0},
{"pause", 'p', 0, N_("Wait for keypress after every line of output."), 0, 0},
{"quiet", 'q', 0, "", 0, 0},
{"dfltroot", 'r', 0, "Use compiled-in rootdev.", 0, 0},
{"single", 's', 0, "Boot into single mode.", 0, 0},
{"verbose", 'v', 0, "Boot with verbose messages.", 0, 0},
{"dfltroot", 'r', 0, N_("Use compiled-in rootdev."), 0, 0},
{"single", 's', 0, N_("Boot into single mode."), 0, 0},
{"verbose", 'v', 0, N_("Boot with verbose messages."), 0, 0},
{0, 0, 0, 0, 0, 0}
};
@ -89,12 +90,12 @@ static const grub_uint32_t freebsd_flags[] =
static const struct grub_arg_option openbsd_opts[] =
{
{"askname", 'a', 0, "Ask for file name to reboot from.", 0, 0},
{"halt", 'b', 0, "Don't reboot, just halt.", 0, 0},
{"config", 'c', 0, "Change configured devices.", 0, 0},
{"single", 's', 0, "Boot into single mode.", 0, 0},
{"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0},
{"root", 'r', 0, "Set root device.", "wdXY", ARG_TYPE_STRING},
{"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0},
{"halt", 'b', 0, N_("Don't reboot, just halt."), 0, 0},
{"config", 'c', 0, N_("Change configured devices."), 0, 0},
{"single", 's', 0, N_("Boot into single mode."), 0, 0},
{"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0},
{"root", 'r', 0, N_("Set root device."), "wdXY", ARG_TYPE_STRING},
{0, 0, 0, 0, 0, 0}
};
@ -108,19 +109,19 @@ static const grub_uint32_t openbsd_flags[] =
static const struct grub_arg_option netbsd_opts[] =
{
{"no-smp", '1', 0, "Disable SMP.", 0, 0},
{"no-acpi", '2', 0, "Disable ACPI.", 0, 0},
{"askname", 'a', 0, "Ask for file name to reboot from.", 0, 0},
{"halt", 'b', 0, "Don't reboot, just halt.", 0, 0},
{"config", 'c', 0, "Change configured devices.", 0, 0},
{"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0},
{"no-smp", '1', 0, N_("Disable SMP."), 0, 0},
{"no-acpi", '2', 0, N_("Disable ACPI."), 0, 0},
{"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0},
{"halt", 'b', 0, N_("Don't reboot, just halt."), 0, 0},
{"config", 'c', 0, N_("Change configured devices."), 0, 0},
{"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0},
{"miniroot", 'm', 0, "", 0, 0},
{"quiet", 'q', 0, "Don't display boot diagnostic messages.", 0, 0},
{"single", 's', 0, "Boot into single mode.", 0, 0},
{"verbose", 'v', 0, "Boot with verbose messages.", 0, 0},
{"debug", 'x', 0, "Boot with debug messages.", 0, 0},
{"silent", 'z', 0, "Supress normal output (warnings remain).", 0, 0},
{"root", 'r', 0, "Set root device.", "DEVICE", ARG_TYPE_STRING},
{"quiet", 'q', 0, N_("Don't display boot diagnostic messages."), 0, 0},
{"single", 's', 0, N_("Boot into single mode."), 0, 0},
{"verbose", 'v', 0, N_("Boot with verbose messages."), 0, 0},
{"debug", 'x', 0, N_("Boot with debug messages."), 0, 0},
{"silent", 'z', 0, N_("Supress normal output (warnings remain)."), 0, 0},
{"root", 'r', 0, N_("Set root device."), N_("DEVICE"), ARG_TYPE_STRING},
{0, 0, 0, 0, 0, 0}
};
@ -679,7 +680,7 @@ grub_netbsd_boot (void)
+ sizeof (struct grub_netbsd_btinfo_mmap_header)
+ count * sizeof (struct grub_netbsd_btinfo_mmap_entry)
> grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "No memory for boot info.");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "no memory for boot info");
curarg = mmap = (struct grub_netbsd_btinfo_mmap_header *) kern_end;
pm = (struct grub_netbsd_btinfo_mmap_entry *) (mmap + 1);
@ -750,10 +751,10 @@ grub_bsd_load_aout (grub_file_t file)
return grub_errno;
if (grub_file_read (file, &ah, sizeof (ah)) != sizeof (ah))
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read the a.out header");
return grub_error (GRUB_ERR_READ_ERROR, "cannot read the a.out header");
if (grub_aout_get_type (&ah) != AOUT_TYPE_AOUT32)
return grub_error (GRUB_ERR_BAD_OS, "Invalid a.out header");
return grub_error (GRUB_ERR_BAD_OS, "invalid a.out header");
entry = ah.aout32.a_entry & 0xFFFFFF;
@ -771,7 +772,7 @@ grub_bsd_load_aout (grub_file_t file)
}
if (load_addr < 0x100000)
return grub_error (GRUB_ERR_BAD_OS, "Load address below 1M");
return grub_error (GRUB_ERR_BAD_OS, "load address below 1M");
kern_start = load_addr;
kern_end = load_addr + ah.aout32.a_text + ah.aout32.a_data;
@ -811,7 +812,7 @@ grub_bsd_elf32_hook (Elf32_Phdr * phdr, grub_addr_t * addr, int *do_load)
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Address 0x%x is out of range",
return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range",
paddr);
if ((!kern_start) || (paddr < kern_start))
@ -842,7 +843,7 @@ grub_bsd_elf64_hook (Elf64_Phdr * phdr, grub_addr_t * addr, int *do_load)
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Address 0x%x is out of range",
return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range",
paddr);
if ((!kern_start) || (paddr < kern_start))
@ -871,7 +872,7 @@ grub_bsd_load_elf (grub_elf_t elf)
is_64bit = 1;
if (! grub_cpuid_has_longmode)
return grub_error (GRUB_ERR_BAD_OS, "Your CPU does not implement AMD64 architecture.");
return grub_error (GRUB_ERR_BAD_OS, "your CPU does not implement AMD64 architecture");
/* FreeBSD has 64-bit entry point. */
if (kernel_type == KERNEL_TYPE_FREEBSD)
@ -887,7 +888,7 @@ grub_bsd_load_elf (grub_elf_t elf)
return grub_elf64_load (elf, grub_bsd_elf64_hook, 0, 0);
}
else
return grub_error (GRUB_ERR_BAD_OS, "Invalid elf");
return grub_error (GRUB_ERR_BAD_OS, "invalid elf");
}
static grub_err_t
@ -902,7 +903,7 @@ grub_bsd_load (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
@ -1024,14 +1025,14 @@ grub_cmd_openbsd (grub_extcmd_t cmd, int argc, char *argv[])
int unit, part;
if (*(arg++) != 'w' || *(arg++) != 'd')
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only device specifications of form "
"wd<number><lowercase letter> are supported.");
"only device specifications of form "
"wd<number><lowercase letter> are supported");
unit = grub_strtoul (arg, (char **) &arg, 10);
if (! (arg && *arg >= 'a' && *arg <= 'z'))
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only device specifications of form "
"wd<number><lowercase letter> are supported.");
"only device specifications of form "
"wd<number><lowercase letter> are supported");
part = *arg - 'a';
@ -1076,15 +1077,15 @@ grub_cmd_freebsd_loadenv (grub_command_t cmd __attribute__ ((unused)),
if (kernel_type == KERNEL_TYPE_NONE)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the kernel first.");
"you need to load the kernel first");
if (kernel_type != KERNEL_TYPE_FREEBSD)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only FreeBSD support environment");
"only FreeBSD support environment");
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No filename");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no filename");
goto fail;
}
@ -1170,15 +1171,15 @@ grub_cmd_freebsd_module (grub_command_t cmd __attribute__ ((unused)),
if (kernel_type == KERNEL_TYPE_NONE)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the kernel first.");
"you need to load the kernel first");
if (kernel_type != KERNEL_TYPE_FREEBSD)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only FreeBSD support module");
"only FreeBSD support module");
if (!is_elf_kernel)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only ELF kernel support module");
"only ELF kernel support module");
/* List the current modules if no parameter. */
if (!argc)
@ -1193,7 +1194,7 @@ grub_cmd_freebsd_module (grub_command_t cmd __attribute__ ((unused)),
if (kern_end + file->size > grub_os_area_addr + grub_os_area_size)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "Not enough memory for the module");
grub_error (GRUB_ERR_OUT_OF_RANGE, "not enough memory for the module");
goto fail;
}
@ -1236,15 +1237,15 @@ grub_cmd_freebsd_module_elf (grub_command_t cmd __attribute__ ((unused)),
if (kernel_type == KERNEL_TYPE_NONE)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the kernel first.");
"you need to load the kernel first");
if (kernel_type != KERNEL_TYPE_FREEBSD)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only FreeBSD support module");
"only FreeBSD support module");
if (! is_elf_kernel)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only ELF kernel support module");
"only ELF kernel support module");
/* List the current modules if no parameter. */
if (! argc)
@ -1280,25 +1281,25 @@ GRUB_MOD_INIT (bsd)
{
cmd_freebsd = grub_register_extcmd ("kfreebsd", grub_cmd_freebsd,
GRUB_COMMAND_FLAG_BOTH,
"kfreebsd FILE", "Load kernel of FreeBSD.",
N_("FILE"), N_("Load kernel of FreeBSD."),
freebsd_opts);
cmd_openbsd = grub_register_extcmd ("kopenbsd", grub_cmd_openbsd,
GRUB_COMMAND_FLAG_BOTH,
"kopenbsd FILE", "Load kernel of OpenBSD.",
N_("FILE"), N_("Load kernel of OpenBSD."),
openbsd_opts);
cmd_netbsd = grub_register_extcmd ("knetbsd", grub_cmd_netbsd,
GRUB_COMMAND_FLAG_BOTH,
"knetbsd FILE", "Load kernel of NetBSD.",
N_("FILE"), N_("Load kernel of NetBSD."),
netbsd_opts);
cmd_freebsd_loadenv =
grub_register_command ("kfreebsd_loadenv", grub_cmd_freebsd_loadenv,
0, "load FreeBSD env");
0, N_("Load FreeBSD env."));
cmd_freebsd_module =
grub_register_command ("kfreebsd_module", grub_cmd_freebsd_module,
0, "load FreeBSD kernel module");
0, N_("Load FreeBSD kernel module."));
cmd_freebsd_module_elf =
grub_register_command ("kfreebsd_module_elf", grub_cmd_freebsd_module_elf,
0, "load FreeBSD kernel module (ELF)");
0, N_("Load FreeBSD kernel module (ELF)."));
my_mod = mod;
}

View file

@ -12,7 +12,7 @@ load (grub_file_t file, void *where, grub_off_t off, grub_size_t size)
{
if (PTR_TO_UINT32 (where) + size > grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for the module");
"not enough memory for the module");
if (grub_file_seek (file, off) == (grub_off_t) -1)
return grub_errno;
if (grub_file_read (file, where, size)
@ -116,7 +116,7 @@ SUFFIX (grub_freebsd_load_elfmodule_obj) (grub_file_t file, int argc,
case SHT_NOBITS:
if (curload + s->sh_size > grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for the module");
"not enough memory for the module");
grub_memset (UINT_TO_PTR (curload), 0, s->sh_size);
break;
}
@ -185,7 +185,7 @@ SUFFIX (grub_freebsd_load_elfmodule) (grub_file_t file, int argc, char *argv[],
if (module + s->sh_addr + s->sh_size
> grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for the module");
"not enough memory for the module");
grub_memset (UINT_TO_PTR (module + s->sh_addr), 0, s->sh_size);
break;
}
@ -259,7 +259,7 @@ SUFFIX (grub_freebsd_load_elf_meta) (grub_file_t file, grub_addr_t *kern_end)
if (*kern_end + 4 * sizeof (grub_freebsd_addr_t) + symsize + strsize
> grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for kernel symbols");
"not enough memory for kernel symbols");
symstart = curload = ALIGN_UP (*kern_end, sizeof (grub_freebsd_addr_t));
*((grub_freebsd_addr_t *) UINT_TO_PTR (curload)) = symsize;

View file

@ -671,7 +671,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = 0x400 - sizeof (lh);
if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -881,7 +881,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = prot_size;
if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
{
@ -918,13 +918,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (! loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -994,7 +994,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, initrd_mem, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -1017,9 +1017,9 @@ static grub_command_t cmd_linux, cmd_initrd;
GRUB_MOD_INIT(linux)
{
cmd_linux = grub_register_command ("linux", grub_cmd_linux,
0, "load linux");
0, "Load Linux.");
cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
0, "load initrd");
0, "Load initrd.");
my_mod = mod;
}

View file

@ -148,10 +148,10 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
c = grub_efi_locate_protocol (&uga_draw_guid, 0);
if (! c)
return grub_error (GRUB_ERR_IO, "Couldn't find UGADraw");
return grub_error (GRUB_ERR_IO, "couldn't find UGADraw");
if (efi_call_5 (c->get_mode, c, &width, &height, &depth, &rate))
return grub_error (GRUB_ERR_IO, "Couldn't retrieve video mode");
return grub_error (GRUB_ERR_IO, "couldn't retrieve video mode");
grub_printf ("Video mode: %ux%u-%u@%u\n", width, height, depth, rate);
@ -163,7 +163,7 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
grub_efi_set_text_mode (1);
if (! ret)
return grub_error (GRUB_ERR_IO, "Can\'t find frame buffer address\n");
return grub_error (GRUB_ERR_IO, "can\'t find frame buffer address");
grub_printf ("Frame buffer base: 0x%x\n", fb_base);
grub_printf ("Video line length: %d\n", line_len);

View file

@ -1,7 +1,7 @@
/* linux.c - boot Linux zImage or bzImage */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008 Free Software Foundation, Inc.
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,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
@ -241,7 +241,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
kernel_size = prot_size;
if (grub_file_read (file, kernel_addr, prot_size) != (int) prot_size)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
grub_loader_set (grub_linux_boot, grub_linux_unload, 1);
@ -272,13 +272,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (! kernel_addr)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -290,7 +290,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, (void *) GRUB_OFW_LINUX_INITRD_ADDR,
initrd_size) != (int) initrd_size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -306,9 +306,9 @@ static grub_command_t cmd_linux, cmd_initrd;
GRUB_MOD_INIT(linux)
{
cmd_linux = grub_register_command ("linux", grub_cmd_linux,
0, "load linux");
0, "Load Linux.");
cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
0, "load initrd");
0, "Load initrd.");
my_mod = mod;
}

View file

@ -696,7 +696,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = 0x400 - sizeof (lh);
if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -885,7 +885,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = prot_size;
if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
{
@ -920,13 +920,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (! loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -974,7 +974,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (addr < addr_min)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "The initrd is too big");
grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big");
goto fail;
}
@ -982,7 +982,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, initrd_mem, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -1005,9 +1005,9 @@ static grub_command_t cmd_linux, cmd_initrd;
GRUB_MOD_INIT(linux)
{
cmd_linux = grub_register_command ("linux", grub_cmd_linux,
0, "load linux");
0, "Load Linux.");
cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
0, "load initrd");
0, "Load initrd.");
my_mod = mod;
}

View file

@ -65,7 +65,7 @@ grub_multiboot_boot (void)
{
struct grub_relocator32_state state =
{
.eax = MULTIBOOT_MAGIC2,
.eax = MULTIBOOT_BOOTLOADER_MAGIC,
.ebx = PTR_TO_UINT32 (mbi_dest),
.ecx = 0,
.edx = 0,
@ -226,21 +226,21 @@ grub_multiboot (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
file = grub_gzfile_open (argv[0], 1);
if (! file)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "Couldn't open file");
grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file");
goto fail;
}
len = grub_file_read (file, buffer, MULTIBOOT_SEARCH);
if (len < 32)
{
grub_error (GRUB_ERR_BAD_OS, "File too small");
grub_error (GRUB_ERR_BAD_OS, "file too small");
goto fail;
}
@ -250,21 +250,21 @@ grub_multiboot (int argc, char *argv[])
((char *) header <= buffer + len - 12) || (header = 0);
header = (struct multiboot_header *) ((char *) header + 4))
{
if (header->magic == MULTIBOOT_MAGIC
if (header->magic == MULTIBOOT_HEADER_MAGIC
&& !(header->magic + header->flags + header->checksum))
break;
}
if (header == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No multiboot header found");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no multiboot header found");
goto fail;
}
if (header->flags & MULTIBOOT_UNSUPPORTED)
{
grub_error (GRUB_ERR_UNKNOWN_OS,
"Unsupported flag: 0x%x", header->flags);
"unsupported flag: 0x%x", header->flags);
goto fail;
}
@ -408,14 +408,14 @@ grub_module (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (!mbi)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the multiboot kernel first");
"you need to load the multiboot kernel first");
goto fail;
}
@ -430,7 +430,7 @@ grub_module (int argc, char *argv[])
if (grub_file_read (file, module, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View file

@ -1,7 +1,7 @@
/* chainloader.c - boot another boot loader */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2004,2007 Free Software Foundation, Inc.
* Copyright (C) 2002,2004,2007,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
@ -146,7 +146,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(chainloader)
{
cmd = grub_register_command ("chainloader", grub_cmd_chainloader,
0, "load another boot loader");
0, "Load another boot loader.");
my_mod = mod;
}

View file

@ -1,7 +1,7 @@
/* linux.c - boot Linux zImage or bzImage */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008 Free Software Foundation, Inc.
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,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
@ -234,7 +234,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = real_size + GRUB_DISK_SECTOR_SIZE - sizeof (lh);
if (grub_file_read (file, grub_linux_tmp_addr + sizeof (lh), len) != len)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -265,7 +265,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = prot_size;
if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
{
@ -299,13 +299,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (!loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -314,7 +314,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (!(lh->header == grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
&& grub_le_to_cpu16 (lh->version) >= 0x0200))
{
grub_error (GRUB_ERR_BAD_OS, "The kernel is too old for initrd.");
grub_error (GRUB_ERR_BAD_OS, "the kernel is too old for initrd");
goto fail;
}
@ -357,13 +357,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (addr < addr_min)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "The initrd is too big");
grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big");
goto fail;
}
if (grub_file_read (file, (void *) addr, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -383,10 +383,10 @@ GRUB_MOD_INIT(linux16)
{
cmd_linux =
grub_register_command ("linux16", grub_cmd_linux,
0, "load linux");
0, "Load Linux.");
cmd_initrd =
grub_register_command ("initrd16", grub_cmd_initrd,
0, "load initrd");
0, "Load initrd.");
my_mod = mod;
}

View file

@ -1,7 +1,7 @@
/* multiboot2.c - boot a multiboot 2 OS image. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007,2008 Free Software Foundation, Inc.
* Copyright (C) 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
@ -42,7 +42,7 @@ grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr,
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error(GRUB_ERR_OUT_OF_RANGE,"Address 0x%x is out of range",
return grub_error(GRUB_ERR_OUT_OF_RANGE,"address 0x%x is out of range",
paddr);
return GRUB_ERR_NONE;
@ -64,7 +64,7 @@ grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr,
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Address 0x%x is out of range",
return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range",
paddr);
return GRUB_ERR_NONE;

View file

@ -527,12 +527,12 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)),
unsigned i, j;
if (argc != 1)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "File name required. ");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
file = grub_gzfile_open (args[0], 1);
if (! file)
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
"Couldn't load device-propertie dump. ");
"couldn't load device-propertie dump");
size = grub_file_size (file);
buf = grub_malloc (size);
if (!buf)