]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
powerpc: Drop Open Hack'Ware - remove GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS
authorDaniel Axtens <dja@axtens.net>
Mon, 6 Sep 2021 05:46:13 +0000 (15:46 +1000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 4 Oct 2021 12:24:35 +0000 (14:24 +0200)
Open Hack'Ware was the only user.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/term/ieee1275/console.c
grub-core/video/ieee1275.c
include/grub/ieee1275/ieee1275.h

index 7e797a7d444551381b52fbb164103a0826f57aec..87cbc7a1e0d47a1372fa2bffa96eaab10539b137 100644 (file)
@@ -171,6 +171,7 @@ static grub_err_t
 grub_console_init_output (struct grub_term_output *term)
 {
   grub_ssize_t actual;
+  unsigned int col;
 
   /* The latest PowerMacs don't actually initialize the screen for us, so we
    * use this trick to re-open the output device (but we avoid doing this on
@@ -184,16 +185,12 @@ grub_console_init_output (struct grub_term_output *term)
     return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot find stdout");
 
   /* Initialize colors.  */
-  if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS))
-    {
-      unsigned col;
-      for (col = 0; col < ARRAY_SIZE (colors); col++)
-       grub_ieee1275_set_color (stdout_ihandle, col, colors[col].red,
-                                colors[col].green, colors[col].blue);
+  for (col = 0; col < ARRAY_SIZE (colors); col++)
+    grub_ieee1275_set_color (stdout_ihandle, col, colors[col].red,
+                            colors[col].green, colors[col].blue);
 
-      /* Set the right fg and bg colors.  */
-      grub_terminfo_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-    }
+  /* Set the right fg and bg colors. */
+  grub_terminfo_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
 
   grub_console_dimensions ();
 
index 17a3dbbb575686bd24cc44ac6b0d35725539582a..f437fb0dfab0f59e97eb5ce1329d33b634b224e5 100644 (file)
@@ -93,10 +93,9 @@ grub_video_ieee1275_init (void)
 
   grub_memset (&framebuffer, 0, sizeof(framebuffer));
 
-  if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS)
-      && !grub_ieee1275_get_integer_property (grub_ieee1275_chosen,
-                                             "stdout", &stdout_ihandle,
-                                             sizeof (stdout_ihandle), &actual)
+  if (!grub_ieee1275_get_integer_property (grub_ieee1275_chosen,
+                                          "stdout", &stdout_ihandle,
+                                          sizeof (stdout_ihandle), &actual)
       && actual == sizeof (stdout_ihandle))
     have_setcolors = 1;
 
index 9d410d8216548afbdb8396609ea62e077f4d6698..8a120619512614f022d2568dcfc73fcd506006f2 100644 (file)
@@ -105,9 +105,6 @@ enum grub_ieee1275_flag
   /* OLPC / XO firmware hangs when accessing USB devices.  */
   GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY,
 
-  /* Open Hack'Ware stops when trying to set colors */
-  GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS,
-
   /* Open Hack'Ware stops when grub_ieee1275_interpret is used.  */
   GRUB_IEEE1275_FLAG_CANNOT_INTERPRET,