merge gfxmenu+multiterm into exp
This commit is contained in:
commit
89784252dc
4 changed files with 19 additions and 6 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2010-01-05 Yves Blusseau <yves.blusseau@zetam.org>
|
||||||
|
|
||||||
|
* util/sparc64/ieee1275/grub-mkimage.c (main): Typo fix.
|
||||||
|
|
||||||
|
2010-01-05 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/mkisofs/write.c (padblock_write): Switch size and nmemb
|
||||||
|
arguments to fread so that we get a return value in bytes, rather
|
||||||
|
than something that will normally be rounded down to 0.
|
||||||
|
Adjust error handling to avoid producing garbage when size_t is not
|
||||||
|
the same size as long long.
|
||||||
|
|
||||||
2010-01-05 Colin Watson <cjwatson@ubuntu.com>
|
2010-01-05 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* util/mkisofs/write.c (padblock_write): Check return value of
|
* util/mkisofs/write.c (padblock_write): Check return value of
|
||||||
|
|
|
@ -163,14 +163,15 @@ draw_text (grub_gui_progress_bar_t self)
|
||||||
grub_video_color_t text_color = grub_gui_map_color (self->text_color);
|
grub_video_color_t text_color = grub_gui_map_color (self->text_color);
|
||||||
int width = self->bounds.width;
|
int width = self->bounds.width;
|
||||||
int height = self->bounds.height;
|
int height = self->bounds.height;
|
||||||
char *text = grub_asprintf (self->template,
|
char *text = grub_malloc (grub_strlen (self->template) + 10);
|
||||||
self->value > 0 ? self->value : -self->value);
|
|
||||||
if (!text)
|
if (!text)
|
||||||
{
|
{
|
||||||
grub_print_error ();
|
grub_print_error ();
|
||||||
grub_errno = GRUB_ERR_NONE;
|
grub_errno = GRUB_ERR_NONE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
grub_sprintf (text, self->template,
|
||||||
|
self->value > 0 ? self->value : -self->value);
|
||||||
/* Center the text. */
|
/* Center the text. */
|
||||||
int text_width = grub_font_get_string_width (font, text);
|
int text_width = grub_font_get_string_width (font, text);
|
||||||
int x = (width - text_width) / 2;
|
int x = (width - text_width) / 2;
|
||||||
|
|
|
@ -1437,9 +1437,9 @@ static int FDECL1(padblock_write, FILE *, outfile)
|
||||||
if (! fp)
|
if (! fp)
|
||||||
error (1, errno, _("Unable to open %s"), boot_image_embed);
|
error (1, errno, _("Unable to open %s"), boot_image_embed);
|
||||||
|
|
||||||
if (fread (buffer, 2048 * PADBLOCK_SIZE, 1, fp) == 0)
|
if (fread (buffer, 1, 2048 * PADBLOCK_SIZE, fp) == 0)
|
||||||
error (1, errno, _("cannot read %llu bytes from %s"),
|
error (1, errno, _("cannot read %d bytes from %s"),
|
||||||
(size_t) (2048 * PADBLOCK_SIZE), boot_image_embed);
|
2048 * PADBLOCK_SIZE, boot_image_embed);
|
||||||
if (fgetc (fp) != EOF)
|
if (fgetc (fp) != EOF)
|
||||||
error (1, 0, _("%s is too big for embed area"), boot_image_embed);
|
error (1, 0, _("%s is too big for embed area"), boot_image_embed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,7 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
set_program_name (argv[0]);
|
set_program_name (argv[0]);
|
||||||
|
|
||||||
grub_util_init_ls ();
|
grub_util_init_nls ();
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue