2008-01-19 Robert Millan <rmh@aybabtu.com>
Get rid of confusing function (superceeded by `grub_ieee1275_get_integer_property') * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove prototype. * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove function. * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of grub_ieee1275_decode_int_4(), by obtaining integer properties directly in native endianess from grub_ieee1275_get_integer_property().
This commit is contained in:
parent
e2da7d26bb
commit
33bf70a759
4 changed files with 18 additions and 22 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2008-01-19 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
Get rid of confusing function (superceeded by
|
||||
`grub_ieee1275_get_integer_property')
|
||||
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
|
||||
prototype.
|
||||
* kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
|
||||
function.
|
||||
* term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
|
||||
grub_ieee1275_decode_int_4(), by obtaining integer properties directly
|
||||
in native endianess from grub_ieee1275_get_integer_property().
|
||||
|
||||
2008-01-19 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
|
||||
|
|
|
@ -90,7 +90,6 @@ extern void EXPORT_FUNC(grub_ieee1275_set_flag) (enum grub_ieee1275_flag flag);
|
|||
|
||||
|
||||
|
||||
grub_uint32_t EXPORT_FUNC(grub_ieee1275_decode_int_4) (unsigned char *p);
|
||||
int EXPORT_FUNC(grub_ieee1275_finddevice) (char *name,
|
||||
grub_ieee1275_phandle_t *phandlep);
|
||||
int EXPORT_FUNC(grub_ieee1275_get_property) (grub_ieee1275_phandle_t phandle,
|
||||
|
|
|
@ -26,16 +26,6 @@
|
|||
|
||||
|
||||
|
||||
/* FIXME is this function needed? */
|
||||
grub_uint32_t
|
||||
grub_ieee1275_decode_int_4 (unsigned char *p)
|
||||
{
|
||||
grub_uint32_t val = (*p++ << 8);
|
||||
val = (val + *p++) << 8;
|
||||
val = (val + *p++) << 8;
|
||||
return (val + *p);
|
||||
}
|
||||
|
||||
int
|
||||
grub_ieee1275_finddevice (char *name, grub_ieee1275_phandle_t *phandlep)
|
||||
{
|
||||
|
|
|
@ -313,7 +313,6 @@ grub_ofconsole_refresh (void)
|
|||
static grub_err_t
|
||||
grub_ofconsole_init (void)
|
||||
{
|
||||
unsigned char data[4];
|
||||
grub_ssize_t actual;
|
||||
int col;
|
||||
|
||||
|
@ -323,20 +322,16 @@ grub_ofconsole_init (void)
|
|||
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT))
|
||||
grub_ieee1275_interpret ("output-device output", 0);
|
||||
|
||||
if (grub_ieee1275_get_property (grub_ieee1275_chosen, "stdout", data,
|
||||
sizeof data, &actual)
|
||||
|| actual != sizeof data)
|
||||
if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdout", &stdout_ihandle,
|
||||
sizeof stdout_ihandle, &actual)
|
||||
|| actual != sizeof stdout_ihandle)
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Cannot find stdout");
|
||||
|
||||
stdout_ihandle = grub_ieee1275_decode_int_4 (data);
|
||||
|
||||
if (grub_ieee1275_get_property (grub_ieee1275_chosen, "stdin", data,
|
||||
sizeof data, &actual)
|
||||
|| actual != sizeof data)
|
||||
if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdin", &stdin_ihandle,
|
||||
sizeof stdin_ihandle, &actual)
|
||||
|| actual != sizeof stdin_ihandle)
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Cannot find stdin");
|
||||
|
||||
stdin_ihandle = grub_ieee1275_decode_int_4 (data);
|
||||
|
||||
/* Initialize colors. */
|
||||
for (col = 0; col < 7; col++)
|
||||
grub_ieee1275_set_color (stdout_ihandle, col, colors[col].red,
|
||||
|
|
Loading…
Reference in a new issue