merge some more commits from before Savannah compromise (mirrored by Launchpad)
This commit is contained in:
commit
ea20f6e03a
6 changed files with 40 additions and 16 deletions
25
ChangeLog
25
ChangeLog
|
@ -17,6 +17,31 @@
|
||||||
* grub-core/commands/echo.c: Include `<grub/term.h>'.
|
* grub-core/commands/echo.c: Include `<grub/term.h>'.
|
||||||
(grub_cmd_echo): Call grub_refresh() after printing a message.
|
(grub_cmd_echo): Call grub_refresh() after printing a message.
|
||||||
|
|
||||||
|
2010-11-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Avoid using tricks for initialising endian variables.
|
||||||
|
|
||||||
|
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot):
|
||||||
|
Make const.
|
||||||
|
(GRUB_MOD_INIT): Don't byte-swap.
|
||||||
|
* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
|
||||||
|
Use grub_cpu_to_le16_compile_time and grub_cpu_to_le32_compile_time.
|
||||||
|
* include/grub/types.h (grub_swap_bytes16_compile_time): New macro.
|
||||||
|
(grub_swap_bytes32_compile_time): Likewise.
|
||||||
|
(grub_cpu_to_le32_compile_time): Likewise.
|
||||||
|
(grub_cpu_to_le16_compile_time): Likewise.
|
||||||
|
|
||||||
|
2010-11-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-setup.c (setup): Stop recommending --force. People who
|
||||||
|
understand the dangers of blocklists are able to find this option
|
||||||
|
anyway and the ones who don't shouldn't use it anyway.
|
||||||
|
|
||||||
|
2010-11-26 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
|
* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN): Beautify.
|
||||||
|
Update all users.
|
||||||
|
|
||||||
2010-11-26 Colin Watson <cjwatson@ubuntu.com>
|
2010-11-26 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
Fix LVM-on-RAID probing.
|
Fix LVM-on-RAID probing.
|
||||||
|
|
|
@ -33,7 +33,7 @@ static grub_uint8_t grub_gpt_magic[8] =
|
||||||
static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
|
static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
#ifdef GRUB_UTIL
|
||||||
static grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
|
static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 512 << 7 = 65536 byte sectors. */
|
/* 512 << 7 = 65536 byte sectors. */
|
||||||
|
@ -198,14 +198,6 @@ static struct grub_partition_map grub_gpt_partition_map =
|
||||||
GRUB_MOD_INIT(part_gpt)
|
GRUB_MOD_INIT(part_gpt)
|
||||||
{
|
{
|
||||||
grub_partition_map_register (&grub_gpt_partition_map);
|
grub_partition_map_register (&grub_gpt_partition_map);
|
||||||
#ifdef GRUB_UTIL
|
|
||||||
grub_gpt_partition_type_bios_boot.data1 =
|
|
||||||
grub_cpu_to_le32 (grub_gpt_partition_type_bios_boot.data1);
|
|
||||||
grub_gpt_partition_type_bios_boot.data2 =
|
|
||||||
grub_cpu_to_le16 (grub_gpt_partition_type_bios_boot.data2);
|
|
||||||
grub_gpt_partition_type_bios_boot.data3 =
|
|
||||||
grub_cpu_to_le16 (grub_gpt_partition_type_bios_boot.data3);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(part_gpt)
|
GRUB_MOD_FINI(part_gpt)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
* Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -27,18 +27,18 @@
|
||||||
|
|
||||||
static int grub_curr_x, grub_curr_y;
|
static int grub_curr_x, grub_curr_y;
|
||||||
|
|
||||||
#define VGA_TEXT_SCREEN 0xb8000
|
#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb8000)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
screen_write_char (int x, int y, short c)
|
screen_write_char (int x, int y, short c)
|
||||||
{
|
{
|
||||||
((short *) VGA_TEXT_SCREEN)[y * COLS + x] = c;
|
VGA_TEXT_SCREEN[y * COLS + x] = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static short
|
static short
|
||||||
screen_read_char (int x, int y)
|
screen_read_char (int x, int y)
|
||||||
{
|
{
|
||||||
return ((short *) VGA_TEXT_SCREEN)[y * COLS + x];
|
return VGA_TEXT_SCREEN[y * COLS + x];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -120,7 +120,7 @@ grub_vga_text_cls (struct grub_term_output *term)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < ROWS * COLS; i++)
|
for (i = 0; i < ROWS * COLS; i++)
|
||||||
((short *) VGA_TEXT_SCREEN)[i] = ' ' | (grub_console_cur_color << 8);
|
VGA_TEXT_SCREEN[i] = ' ' | (grub_console_cur_color << 8);
|
||||||
grub_vga_text_gotoxy (term, 0, 0);
|
grub_vga_text_gotoxy (term, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ typedef struct grub_gpt_part_type grub_gpt_part_type_t;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GRUB_GPT_PARTITION_TYPE_BIOS_BOOT \
|
#define GRUB_GPT_PARTITION_TYPE_BIOS_BOOT \
|
||||||
{ 0x21686148, 0x6449, 0x6e6f, \
|
{ grub_cpu_to_le32_compile_time (0x21686148), grub_cpu_to_le16_compile_time (0x6449), grub_cpu_to_le16_compile_time (0x6e6f), \
|
||||||
{ 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
|
{ 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,9 @@ typedef grub_uint64_t grub_disk_addr_t;
|
||||||
(grub_uint16_t) ((_x << 8) | (_x >> 8)); \
|
(grub_uint16_t) ((_x << 8) | (_x >> 8)); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define grub_swap_bytes16_compile_time(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
|
||||||
|
#define grub_swap_bytes32_compile_time(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) | (((x) & 0xff0000) >> 8) | (((x) & 0xff000000UL) >> 24))
|
||||||
|
|
||||||
#if defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3)
|
#if defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3)
|
||||||
static inline grub_uint32_t grub_swap_bytes32(grub_uint32_t x)
|
static inline grub_uint32_t grub_swap_bytes32(grub_uint32_t x)
|
||||||
{
|
{
|
||||||
|
@ -193,6 +196,8 @@ static inline grub_uint64_t grub_swap_bytes64(grub_uint64_t x)
|
||||||
# define grub_be_to_cpu16(x) ((grub_uint16_t) (x))
|
# define grub_be_to_cpu16(x) ((grub_uint16_t) (x))
|
||||||
# define grub_be_to_cpu32(x) ((grub_uint32_t) (x))
|
# define grub_be_to_cpu32(x) ((grub_uint32_t) (x))
|
||||||
# define grub_be_to_cpu64(x) ((grub_uint64_t) (x))
|
# define grub_be_to_cpu64(x) ((grub_uint64_t) (x))
|
||||||
|
# define grub_cpu_to_le32_compile_time(x) grub_swap_bytes32_compile_time(x)
|
||||||
|
# define grub_cpu_to_le16_compile_time(x) grub_swap_bytes16_compile_time(x)
|
||||||
#else /* ! WORDS_BIGENDIAN */
|
#else /* ! WORDS_BIGENDIAN */
|
||||||
# define grub_cpu_to_le16(x) ((grub_uint16_t) (x))
|
# define grub_cpu_to_le16(x) ((grub_uint16_t) (x))
|
||||||
# define grub_cpu_to_le32(x) ((grub_uint32_t) (x))
|
# define grub_cpu_to_le32(x) ((grub_uint32_t) (x))
|
||||||
|
@ -206,6 +211,8 @@ static inline grub_uint64_t grub_swap_bytes64(grub_uint64_t x)
|
||||||
# define grub_be_to_cpu16(x) grub_swap_bytes16(x)
|
# define grub_be_to_cpu16(x) grub_swap_bytes16(x)
|
||||||
# define grub_be_to_cpu32(x) grub_swap_bytes32(x)
|
# define grub_be_to_cpu32(x) grub_swap_bytes32(x)
|
||||||
# define grub_be_to_cpu64(x) grub_swap_bytes64(x)
|
# define grub_be_to_cpu64(x) grub_swap_bytes64(x)
|
||||||
|
# define grub_cpu_to_le16_compile_time(x) ((grub_uint16_t) (x))
|
||||||
|
# define grub_cpu_to_le32_compile_time(x) ((grub_uint32_t) (x))
|
||||||
#endif /* ! WORDS_BIGENDIAN */
|
#endif /* ! WORDS_BIGENDIAN */
|
||||||
|
|
||||||
#endif /* ! GRUB_TYPES_HEADER */
|
#endif /* ! GRUB_TYPES_HEADER */
|
||||||
|
|
|
@ -492,7 +492,7 @@ unable_to_embed:
|
||||||
"setup by using blocklists. However, blocklists are UNRELIABLE and "
|
"setup by using blocklists. However, blocklists are UNRELIABLE and "
|
||||||
"their use is discouraged."));
|
"their use is discouraged."));
|
||||||
if (! force)
|
if (! force)
|
||||||
grub_util_error (_("if you really want blocklists, use --force"));
|
grub_util_error (_("will not proceed with blocklists"));
|
||||||
|
|
||||||
/* The core image must be put on a filesystem unfortunately. */
|
/* The core image must be put on a filesystem unfortunately. */
|
||||||
grub_util_info ("will leave the core image on the filesystem");
|
grub_util_info ("will leave the core image on the filesystem");
|
||||||
|
|
Loading…
Reference in a new issue