Merge mainline.

This commit is contained in:
Manoel Rebelo Abranches 2011-05-05 12:12:22 -03:00
commit 90eb90e24c
263 changed files with 5295 additions and 865 deletions

View file

@ -33,6 +33,8 @@
#include <grub/efi/api.h>
#endif
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"exclude", 'x', 0,
N_("Don't load host tables specified by comma-separated list."),

View file

@ -26,6 +26,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
int argc, char **args)

View file

@ -25,6 +25,8 @@
#include <grub/mm.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t (*grub_loader_boot_func) (void);
static grub_err_t (*grub_loader_unload_func) (void);
static int grub_loader_noreturn;

View file

@ -25,6 +25,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define BUFFER_SIZE 512
static grub_err_t

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_source (grub_command_t cmd, int argc, char **args)
{

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_DATETIME_SET_YEAR 1
#define GRUB_DATETIME_SET_MONTH 2
#define GRUB_DATETIME_SET_DAY 4

View file

@ -23,6 +23,8 @@
#include <grub/i18n.h>
#include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_video_patch
{
const char *name;

View file

@ -25,6 +25,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;

View file

@ -23,6 +23,8 @@
#include <grub/efi/efi.h>
#include <grub/command.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define ADD_MEMORY_DESCRIPTOR(desc, size) \
((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))

View file

@ -18,12 +18,15 @@
*/
#include <grub/types.h>
#include <grub/mm.h>
#include <grub/dl.h>
#include <grub/misc.h>
#include <grub/normal.h>
#include <grub/charset.h>
#include <grub/efi/api.h>
#include <grub/efi/efi.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct guid_mapping
{
grub_efi_guid_t guid;

View file

@ -23,6 +23,9 @@
#include <grub/charset.h>
#include <grub/efi/api.h>
#include <grub/efi/efi.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static void
disp_sal (void *table)

View file

@ -22,6 +22,9 @@
#include <grub/misc.h>
#include <grub/extcmd.h>
#include <grub/script_sh.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
grub_err_t
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,

View file

@ -29,6 +29,8 @@
#include <grub/fs.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Convert a LBA address to a CHS address in the INT 13 format. */
/* Taken from grub1. */
/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.

View file

@ -22,6 +22,8 @@
#include <grub/misc.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View file

@ -26,6 +26,8 @@
#include <grub/normal.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
{"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},

View file

@ -26,6 +26,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"apm", 'B', 0, N_("Set Advanced Power Management\n"
"(1=low, ..., 254=high, 255=off)."),

View file

@ -26,6 +26,8 @@
#include <grub/normal.h>
#include <grub/charset.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
char **args)

View file

@ -25,6 +25,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
ARG_TYPE_INT},

View file

@ -21,6 +21,8 @@
#include <grub/misc.h>
#include <grub/cmos.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
parse_args (int argc, char *argv[], int *byte, int *bit)
{

View file

@ -27,6 +27,8 @@
#include <grub/i386/cpuid.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define cpuid(num,a,b,c,d) \
asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
: "=a" (a), "=r" (b), "=c" (c), "=d" (d) \

View file

@ -29,6 +29,7 @@
#include <grub/memory.h>
#include <grub/machine/memory.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */
static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);

View file

@ -24,6 +24,8 @@
#include <grub/machine/int.h>
#include <grub/acpi.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},

View file

@ -22,6 +22,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
int
grub_apm_get_info (struct grub_apm_info *info)
{

View file

@ -29,6 +29,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
/* The speaker port. */

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View file

@ -27,6 +27,8 @@
#include <grub/cpu/io.h>
#include <grub/loader.h>
GRUB_MOD_LICENSE ("GPLv2+");
static char sendkey[0x20];
/* Length of sendkey. */
static int keylen = 0;

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View file

@ -24,6 +24,8 @@
#include <grub/cpu/io.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;

View file

@ -28,6 +28,8 @@
#include <grub/i18n.h>
#include <grub/file.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_keyboard_layout layout_us = {
.keyboard_map = {
/* Keyboard errors. Handled by driver. */

View file

@ -23,6 +23,8 @@
#include <grub/term.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"shift", 's', 0, N_("Check Shift key."), 0, 0},

View file

@ -33,6 +33,8 @@
#include <grub/disk.h>
#include <grub/partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
legacy_file (const char *filename)
{

View file

@ -28,6 +28,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},

View file

@ -33,6 +33,8 @@
#include <grub/i18n.h>
#include <grub/net.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0},

View file

@ -25,6 +25,8 @@
#include <grub/i18n.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static void
print_strn (grub_uint8_t *str, grub_size_t len)
{

View file

@ -22,6 +22,8 @@
#include <grub/i18n.h>
#include <grub/memory.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const char *names[] =
{
[GRUB_MEMORY_AVAILABLE] = "available",

View file

@ -23,6 +23,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_pci_classname
{
int class;

View file

@ -23,6 +23,8 @@
#include <grub/env.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;

View file

@ -29,6 +29,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* cat FILE */
static grub_err_t
grub_mini_cmd_cat (struct grub_command *cmd __attribute__ ((unused)),

View file

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/cs5536.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_lsspd (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View file

@ -31,6 +31,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv2+");
static struct grub_parttool *parts = 0;
static int curhandle = 0;
static grub_dl_t mymod;

View file

@ -26,6 +26,8 @@
#include <grub/dl.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_dl_t my_mod;
static grub_err_t

View file

@ -26,6 +26,8 @@
#include <grub/dl.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_dl_t my_mod;
struct pbkdf2_password

View file

@ -32,9 +32,11 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"set", 's', GRUB_ARG_OPTION_OPTIONAL,
{"set", 's', 0,
N_("Set a variable to return value."), "VAR", ARG_TYPE_STRING},
{"driver", 'd', 0, N_("Determine driver."), 0, 0},
{"partmap", 'p', 0, N_("Determine partition map type."), 0, 0},
@ -150,7 +152,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT (probe)
{
cmd = grub_register_extcmd ("probe", grub_cmd_probe, 0, N_("[DEVICE]"),
cmd = grub_register_extcmd ("probe", grub_cmd_probe, 0, N_("DEVICE"),
N_("Retrieve device info."), options);
}

View file

@ -26,6 +26,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static char *
grub_getline (void)
{

View file

@ -22,6 +22,8 @@
#include <grub/misc.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View file

@ -27,6 +27,8 @@
#include <grub/script_sh.h>
#include <regex.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{ "set", 's', GRUB_ARG_OPTION_REPEATABLE,

View file

@ -31,6 +31,8 @@
#include <grub/disk.h>
#include <grub/partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
void
FUNC_NAME (const char *key, const char *var, int no_floppy,
char **hints, unsigned nhints)

View file

@ -27,6 +27,8 @@
#include <grub/search.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"file", 'f', 0, N_("Search devices by a file."), 0, 0},

View file

@ -25,6 +25,8 @@
#include <grub/mm.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct pci_register
{
const char *name;

View file

@ -25,6 +25,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"verbose", 'v', 0, N_("Verbose countdown."), 0, 0},

View file

@ -23,6 +23,8 @@
#include <grub/i18n.h>
#include <grub/misc.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_term_autoload *grub_term_input_autoload = NULL;
struct grub_term_autoload *grub_term_output_autoload = NULL;

View file

@ -27,6 +27,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* A simple implementation for signed numbers. */
static int
grub_strtosl (char *arg, char **end, int base)

View file

@ -29,6 +29,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_testload (struct grub_command *cmd __attribute__ ((unused)),
int argc, char *argv[])

View file

@ -21,6 +21,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View file

@ -27,6 +27,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const char *usb_classes[] =
{
"Unknown",

View file

@ -25,6 +25,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static unsigned height, width, depth;
static int

View file

@ -28,6 +28,8 @@
#include <grub/gfxmenu_view.h>
#include <grub/env.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
int argc, char **args)

View file

@ -34,6 +34,8 @@
#include <grub/i18n.h>
#include <grub/crypto.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* This prefix is used by xnu and boot-132 to hash
together with volume serial. */
static grub_uint8_t hash_prefix[16]