2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>

* loader/i386/pc/xnu.c (grub_xnu_set_video): Add const qualifier to
	modevar.
	Return grub_errno on allocation error.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-06 16:32:45 +01:00
parent 09706ce58a
commit 51906b8c8a
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/pc/xnu.c (grub_xnu_set_video): Add const qualifier to
modevar.
Return grub_errno on allocation error.
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
* disk/ieee1275/ofdisk.c (grub_ofdisk_read): Correct error handling.

View file

@ -35,7 +35,8 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
{
struct grub_video_mode_info mode_info;
int ret;
char *tmp, *modevar;
char *tmp;
const char *modevar;
void *framebuffer;
grub_err_t err;
struct grub_video_bitmap *bitmap = NULL;
@ -51,8 +52,7 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
{
tmp = grub_xasprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
if (! tmp)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"couldn't allocate temporary storag");
return grub_errno;
err = grub_video_set_mode (tmp,
GRUB_VIDEO_MODE_TYPE_PURE_TEXT
| GRUB_VIDEO_MODE_TYPE_DEPTH_MASK,