From 0cb90c457cd5ebd262855108ba7ddeaa828c39ad Mon Sep 17 00:00:00 2001 From: hollisb Date: Tue, 9 Aug 2005 03:25:40 +0000 Subject: [PATCH] 2005-08-08 Hollis Blanchard * term/ieee1275/ofconsole.c: Include . (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t. Pass 0 as `end' parameter to grub_strtoul(). --- ChangeLog | 6 ++++++ term/ieee1275/ofconsole.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60607874c..6a0b3aea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-08 Hollis Blanchard + + * term/ieee1275/ofconsole.c: Include . + (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t. + Pass 0 as `end' parameter to grub_strtoul(). + 2005-08-08 Hollis Blanchard * include/grub/powerpc/ieee1275/console.h: Do not include diff --git a/term/ieee1275/ofconsole.c b/term/ieee1275/ofconsole.c index 117c63137..a74fde16b 100644 --- a/term/ieee1275/ofconsole.c +++ b/term/ieee1275/ofconsole.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -219,7 +220,7 @@ grub_ofconsole_getwh (void) if (!w || !h) { if (! grub_ieee1275_finddevice ("/options", &options) - && options != -1) + && options != (grub_ieee1275_ihandle_t) -1) { if (! grub_ieee1275_get_property_length (options, "screen-#columns", &lval) && lval != -1) @@ -229,7 +230,7 @@ grub_ofconsole_getwh (void) { if (! grub_ieee1275_get_property (options, "screen-#columns", val, lval, 0)) - w = (grub_uint8_t) grub_strtoul (val, val + lval, 10); + w = (grub_uint8_t) grub_strtoul (val, 0, 10); grub_free (val); } @@ -242,7 +243,7 @@ grub_ofconsole_getwh (void) { if (! grub_ieee1275_get_property (options, "screen-#rows", val, lval, 0)) - h = (grub_uint8_t) grub_strtoul (val, val + lval, 10); + h = (grub_uint8_t) grub_strtoul (val, 0, 10); grub_free (val); }