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
ChangeLog
loader/i386/pc

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> 2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
* disk/ieee1275/ofdisk.c (grub_ofdisk_read): Correct error handling. * 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; struct grub_video_mode_info mode_info;
int ret; int ret;
char *tmp, *modevar; char *tmp;
const char *modevar;
void *framebuffer; void *framebuffer;
grub_err_t err; grub_err_t err;
struct grub_video_bitmap *bitmap = NULL; 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); tmp = grub_xasprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
if (! tmp) if (! tmp)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, return grub_errno;
"couldn't allocate temporary storag");
err = grub_video_set_mode (tmp, err = grub_video_set_mode (tmp,
GRUB_VIDEO_MODE_TYPE_PURE_TEXT GRUB_VIDEO_MODE_TYPE_PURE_TEXT
| GRUB_VIDEO_MODE_TYPE_DEPTH_MASK, | GRUB_VIDEO_MODE_TYPE_DEPTH_MASK,