[PATCH 02/21] [terminal] remove references to ply_console_t

Scott James Remnant scott at ubuntu.com
Wed Mar 17 20:42:07 PDT 2010


Remove all of the references to ply_console_t from the code, now
we operate exclusively on the terminal object.  In some places
this means switching from one to the other, but in many it just
means dropping the console object and using the terminal object
we were already passed.
---
 src/libply-splash-core/ply-boot-splash.c     |   37 ++++++++++----------------
 src/libply-splash-core/ply-boot-splash.h     |   10 +++---
 src/libply-splash-core/ply-renderer-plugin.h |    5 +--
 src/libply-splash-core/ply-renderer.c        |   12 +++-----
 src/libply-splash-core/ply-renderer.h        |    6 +---
 src/libply-splash-core/ply-text-display.c    |    8 +----
 src/libply-splash-core/ply-text-display.h    |    4 +--
 src/main.c                                   |   24 +++++------------
 src/plugins/renderers/drm/plugin.c           |   31 ++++++++++------------
 src/plugins/renderers/frame-buffer/plugin.c  |   29 +++++++++-----------
 src/plugins/renderers/x11/plugin.c           |   13 ++++-----
 11 files changed, 70 insertions(+), 109 deletions(-)

diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c
index 5ba1bc1..1d56b8c 100644
--- a/src/libply-splash-core/ply-boot-splash.c
+++ b/src/libply-splash-core/ply-boot-splash.c
@@ -34,7 +34,7 @@
 #include <wchar.h>
 
 #include "ply-boot-splash-plugin.h"
-#include "ply-console.h"
+#include "ply-terminal.h"
 #include "ply-event-loop.h"
 #include "ply-list.h"
 #include "ply-logger.h"
@@ -58,7 +58,7 @@ struct _ply_boot_splash
   ply_module_handle_t *module_handle;
   const ply_boot_splash_plugin_interface_t *plugin_interface;
   ply_boot_splash_plugin_t *plugin;
-  ply_console_t *console;
+  ply_terminal_t *terminal;
   ply_keyboard_t *keyboard;
   ply_buffer_t *boot_buffer;
   ply_trigger_t *idle_trigger;
@@ -85,10 +85,10 @@ static void ply_boot_splash_update_progress (ply_boot_splash_t *splash);
 static void ply_boot_splash_detach_from_event_loop (ply_boot_splash_t *splash);
 
 ply_boot_splash_t *
-ply_boot_splash_new (const char   *theme_path,
-                     const char   *plugin_dir,
-                     ply_buffer_t *boot_buffer,
-                     ply_console_t *console)
+ply_boot_splash_new (const char     *theme_path,
+                     const char     *plugin_dir,
+                     ply_buffer_t   *boot_buffer,
+                     ply_terminal_t *terminal)
 {
   ply_boot_splash_t *splash;
 
@@ -102,7 +102,7 @@ ply_boot_splash_new (const char   *theme_path,
   splash->is_shown = false;
 
   splash->boot_buffer = boot_buffer;
-  splash->console = console;
+  splash->terminal = terminal;
   splash->pixel_displays = ply_list_new ();
   splash->text_displays = ply_list_new ();
 
@@ -172,11 +172,11 @@ on_keyboard_input (ply_boot_splash_t *splash,
 
             if (splash->should_force_text_mode)
               {
-                ply_console_set_mode (splash->console, PLY_CONSOLE_MODE_TEXT);
-                ply_console_ignore_mode_changes (splash->console, true);
+                ply_terminal_set_mode (splash->terminal, PLY_TERMINAL_MODE_TEXT);
+                ply_terminal_ignore_mode_changes (splash->terminal, true);
               }
             else
-              ply_console_ignore_mode_changes (splash->console, false);
+              ply_terminal_ignore_mode_changes (splash->terminal, false);
             ply_trace ("text mode toggled!");
           return;
 
@@ -513,7 +513,7 @@ ply_boot_splash_hide (ply_boot_splash_t *splash)
   splash->plugin_interface->hide_splash_screen (splash->plugin,
                                                 splash->loop);
 
-  ply_console_set_mode (splash->console, PLY_CONSOLE_MODE_TEXT);
+  ply_terminal_set_mode (splash->terminal, PLY_TERMINAL_MODE_TEXT);
 
   splash->is_shown = false;
 
@@ -698,7 +698,6 @@ main (int    argc,
   const char *theme_path;
   ply_text_display_t *text_display;
   ply_renderer_t *renderer;
-  ply_console_t *console;
   ply_terminal_t *terminal;
   ply_keyboard_t *keyboard;
 
@@ -716,14 +715,6 @@ main (int    argc,
   else
     tty_name = strdup("tty0");
 
-  console = ply_console_new ();
-
-  if (!ply_console_open (console))
-    {
-      perror ("could not open console");
-      return errno;
-    }
-
   terminal = ply_terminal_new (tty_name);
 
   if (!ply_terminal_open (terminal))
@@ -732,7 +723,7 @@ main (int    argc,
       return errno;
     }
 
-  renderer = ply_renderer_new (NULL, terminal, console);
+  renderer = ply_renderer_new (NULL, terminal);
   free(tty_name);
 
   if (!ply_renderer_open (renderer))
@@ -747,7 +738,7 @@ main (int    argc,
                                    (ply_keyboard_escape_handler_t) on_quit, &state);
 
   state.buffer = ply_buffer_new ();
-  state.splash = ply_boot_splash_new (theme_path, PLYMOUTH_PLUGIN_PATH, state.buffer, console);
+  state.splash = ply_boot_splash_new (theme_path, PLYMOUTH_PLUGIN_PATH, state.buffer, terminal);
 
   if (!ply_boot_splash_load (state.splash))
     {
@@ -758,7 +749,7 @@ main (int    argc,
   ply_boot_splash_set_keyboard (state.splash, keyboard);
   add_displays_to_splash_from_renderer (&state, renderer);
 
-  text_display = ply_text_display_new (terminal, console);
+  text_display = ply_text_display_new (terminal);
   ply_boot_splash_add_text_display (state.splash, text_display);
 
   ply_boot_splash_attach_to_event_loop (state.splash, state.loop);
diff --git a/src/libply-splash-core/ply-boot-splash.h b/src/libply-splash-core/ply-boot-splash.h
index 4cb61b7..d2c61a0 100644
--- a/src/libply-splash-core/ply-boot-splash.h
+++ b/src/libply-splash-core/ply-boot-splash.h
@@ -28,7 +28,7 @@
 
 #include "ply-event-loop.h"
 #include "ply-buffer.h"
-#include "ply-console.h"
+#include "ply-terminal.h"
 #include "ply-keyboard.h"
 #include "ply-pixel-display.h"
 #include "ply-text-display.h"
@@ -41,10 +41,10 @@ typedef struct _ply_boot_splash ply_boot_splash_t;
 typedef void (* ply_boot_splash_on_idle_handler_t) (void *user_data);
 
 #ifndef PLY_HIDE_FUNCTION_DECLARATIONS
-ply_boot_splash_t *ply_boot_splash_new (const char   *theme_path,
-                                        const char   *plugin_dir,
-                                        ply_buffer_t *boot_buffer,
-                                        ply_console_t *console);
+ply_boot_splash_t *ply_boot_splash_new (const char   *  theme_path,
+                                        const char   *  plugin_dir,
+                                        ply_buffer_t *  boot_buffer,
+                                        ply_terminal_t *terminal);
 bool ply_boot_splash_load (ply_boot_splash_t *splash);
 void ply_boot_splash_unload (ply_boot_splash_t *splash);
 void ply_boot_splash_set_keyboard (ply_boot_splash_t *splash,
diff --git a/src/libply-splash-core/ply-renderer-plugin.h b/src/libply-splash-core/ply-renderer-plugin.h
index e4f6b37..68ac7e9 100644
--- a/src/libply-splash-core/ply-renderer-plugin.h
+++ b/src/libply-splash-core/ply-renderer-plugin.h
@@ -26,7 +26,7 @@
 #include <stdint.h>
 #include <unistd.h>
 
-#include "ply-console.h"
+#include "ply-terminal.h"
 #include "ply-event-loop.h"
 #include "ply-list.h"
 #include "ply-region.h"
@@ -38,8 +38,7 @@ typedef struct _ply_renderer_backend ply_renderer_backend_t;
 typedef struct
 {
   ply_renderer_backend_t * (* create_backend) (const char *device_name,
-                                               ply_terminal_t *terminal,
-                                               ply_console_t *console);
+                                               ply_terminal_t *terminal);
   void (* destroy_backend) (ply_renderer_backend_t *backend);
   bool (* open_device) (ply_renderer_backend_t *backend);
   void (* close_device) (ply_renderer_backend_t *backend);
diff --git a/src/libply-splash-core/ply-renderer.c b/src/libply-splash-core/ply-renderer.c
index c34dfcf..ab2012d 100644
--- a/src/libply-splash-core/ply-renderer.c
+++ b/src/libply-splash-core/ply-renderer.c
@@ -36,7 +36,7 @@
 
 #include "ply-renderer-plugin.h"
 #include "ply-buffer.h"
-#include "ply-console.h"
+#include "ply-terminal.h"
 #include "ply-event-loop.h"
 #include "ply-list.h"
 #include "ply-logger.h"
@@ -51,7 +51,6 @@ struct _ply_renderer
 
   char *device_name;
   ply_terminal_t *terminal;
-  ply_console_t *console;
 
   uint32_t input_source_is_open : 1;
   uint32_t is_mapped : 1;
@@ -63,9 +62,8 @@ typedef const ply_renderer_plugin_interface_t *
 static void ply_renderer_unload_plugin (ply_renderer_t *renderer);
 
 ply_renderer_t *
-ply_renderer_new (const char    *device_name,
-                  ply_terminal_t *terminal,
-                  ply_console_t *console)
+ply_renderer_new (const char    * device_name,
+                  ply_terminal_t *terminal)
 {
   ply_renderer_t *renderer;
 
@@ -75,7 +73,6 @@ ply_renderer_new (const char    *device_name,
     renderer->device_name = strdup (device_name);
 
   renderer->terminal = terminal;
-  renderer->console = console;
 
   return renderer;
 }
@@ -138,8 +135,7 @@ ply_renderer_load_plugin (ply_renderer_t *renderer,
     }
 
   renderer->backend = renderer->plugin_interface->create_backend (renderer->device_name,
-                                                                  renderer->terminal,
-                                                                  renderer->console);
+                                                                  renderer->terminal);
 
   if (renderer->backend == NULL)
     {
diff --git a/src/libply-splash-core/ply-renderer.h b/src/libply-splash-core/ply-renderer.h
index c4bbdbe..ff5d5b9 100644
--- a/src/libply-splash-core/ply-renderer.h
+++ b/src/libply-splash-core/ply-renderer.h
@@ -26,7 +26,6 @@
 #include <stdint.h>
 
 #include "ply-buffer.h"
-#include "ply-console.h"
 #include "ply-list.h"
 #include "ply-pixel-buffer.h"
 #include "ply-terminal.h"
@@ -41,9 +40,8 @@ typedef void (* ply_renderer_input_source_handler_t) (void
                                                       ply_renderer_input_source_t *input_source);
 
 #ifndef PLY_HIDE_FUNCTION_DECLARATIONS
-ply_renderer_t *ply_renderer_new (const char    *device_name,
-                                  ply_terminal_t *terminal,
-                                  ply_console_t *console);
+ply_renderer_t *ply_renderer_new (const char    * device_name,
+                                  ply_terminal_t *terminal);
 void ply_renderer_free (ply_renderer_t *renderer);
 bool ply_renderer_open (ply_renderer_t *renderer);
 void ply_renderer_close (ply_renderer_t *renderer);
diff --git a/src/libply-splash-core/ply-text-display.c b/src/libply-splash-core/ply-text-display.c
index 5639f24..cdf78dc 100644
--- a/src/libply-splash-core/ply-text-display.c
+++ b/src/libply-splash-core/ply-text-display.c
@@ -36,7 +36,6 @@
 #include <wchar.h>
 
 #include "ply-buffer.h"
-#include "ply-console.h"
 #include "ply-event-loop.h"
 #include "ply-list.h"
 #include "ply-logger.h"
@@ -96,7 +95,6 @@ struct _ply_text_display
   ply_event_loop_t *loop;
 
   ply_terminal_t *terminal;
-  ply_console_t *console;
 
   ply_terminal_color_t foreground_color;
   ply_terminal_color_t background_color;
@@ -106,8 +104,7 @@ struct _ply_text_display
 };
 
 ply_text_display_t *
-ply_text_display_new (ply_terminal_t *terminal,
-                      ply_console_t  *console)
+ply_text_display_new (ply_terminal_t *terminal)
 {
   ply_text_display_t *display;
 
@@ -115,7 +112,6 @@ ply_text_display_new (ply_terminal_t *terminal,
 
   display->loop = NULL;
   display->terminal = terminal;
-  display->console = console;
 
   return display;
 }
@@ -254,7 +250,7 @@ ply_text_display_write (ply_text_display_t *display,
   va_end (args);
 
   if (ply_terminal_get_vt_number (display->terminal) > 0)
-    ply_console_set_mode (display->console, PLY_CONSOLE_MODE_TEXT);
+    ply_terminal_set_mode (display->terminal, PLY_TERMINAL_MODE_TEXT);
   write (fd, string, strlen (string));
   free (string);
 }
diff --git a/src/libply-splash-core/ply-text-display.h b/src/libply-splash-core/ply-text-display.h
index 8c6870a..3fd7dab 100644
--- a/src/libply-splash-core/ply-text-display.h
+++ b/src/libply-splash-core/ply-text-display.h
@@ -27,7 +27,6 @@
 #include <unistd.h>
 
 #include "ply-buffer.h"
-#include "ply-console.h"
 #include "ply-event-loop.h"
 #include "ply-terminal.h"
 
@@ -41,8 +40,7 @@ typedef void (* ply_text_display_draw_handler_t) (void *user_data,
                                                   int   number_of_rows);
 
 #ifndef PLY_HIDE_FUNCTION_DECLARATIONS
-ply_text_display_t *ply_text_display_new (ply_terminal_t *terminal,
-                                          ply_console_t  *console);
+ply_text_display_t *ply_text_display_new (ply_terminal_t *terminal);
 
 void ply_text_display_free (ply_text_display_t *display);
 
diff --git a/src/main.c b/src/main.c
index aebab61..76ba53a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,7 +79,6 @@ typedef struct
 typedef struct
 {
   ply_event_loop_t *loop;
-  ply_console_t *console;
   ply_boot_server_t *boot_server;
   ply_list_t *pixel_displays;
   ply_list_t *text_displays;
@@ -1022,11 +1021,11 @@ add_display_and_keyboard_for_terminal (state_t    *state,
 
   state->terminal = terminal;
 
-  ply_console_set_active_vt (state->console,
-                             ply_terminal_get_vt_number (terminal));
+  ply_terminal_set_active_vt (state->terminal,
+                              ply_terminal_get_vt_number (state->terminal));
 
-  keyboard = ply_keyboard_new_for_terminal (terminal);
-  display = ply_text_display_new (terminal, state->console);
+  keyboard = ply_keyboard_new_for_terminal (state->terminal);
+  display = ply_text_display_new (state->terminal);
 
   ply_list_append_data (state->text_displays, display);
   state->keyboard = keyboard;
@@ -1080,7 +1079,7 @@ add_default_displays_and_keyboard (state_t *state)
       return;
     }
 
-  renderer = ply_renderer_new (NULL, terminal, state->console);
+  renderer = ply_renderer_new (NULL, terminal);
 
   if (!ply_renderer_open (renderer))
     {
@@ -1099,7 +1098,7 @@ add_default_displays_and_keyboard (state_t *state)
 
   add_pixel_displays_from_renderer (state, renderer);
 
-  text_display = ply_text_display_new (terminal, state->console);
+  text_display = ply_text_display_new (state->terminal);
   ply_list_append_data (state->text_displays, text_display);
 
   state->renderer = renderer;
@@ -1158,7 +1157,7 @@ start_boot_splash (state_t    *state,
   splash = ply_boot_splash_new (theme_path,
                                 PLYMOUTH_PLUGIN_PATH,
                                 state->boot_buffer,
-                                state->console);
+                                state->terminal);
 
   if (!ply_boot_splash_load (splash))
     {
@@ -1361,15 +1360,6 @@ check_for_consoles (state_t    *state,
 
   ply_trace ("checking if splash screen should be disabled");
 
-  if (state->console == NULL)
-    state->console = ply_console_new ();
-
-  if (!ply_console_is_open (state->console) &&
-      !ply_console_open (state->console))
-    {
-      ply_trace ("could not open /dev/tty0");
-    }
-
   remaining_command_line = state->kernel_command_line;
   while ((console_key = strstr (remaining_command_line, " console=")) != NULL)
     {
diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c
index 4bc93e4..48e9ab0 100644
--- a/src/plugins/renderers/drm/plugin.c
+++ b/src/plugins/renderers/drm/plugin.c
@@ -94,7 +94,6 @@ struct _ply_renderer_input_source
 struct _ply_renderer_backend
 {
   ply_event_loop_t *loop;
-  ply_console_t *console;
   ply_terminal_t *terminal;
 
   ply_renderer_driver_interface_t *driver_interface;
@@ -301,8 +300,7 @@ free_heads (ply_renderer_backend_t *backend)
 
 static ply_renderer_backend_t *
 create_backend (const char *device_name,
-                ply_terminal_t *terminal,
-                ply_console_t *console)
+                ply_terminal_t *terminal)
 {
   ply_renderer_backend_t *backend;
 
@@ -318,7 +316,6 @@ create_backend (const char *device_name,
   backend->loop = ply_event_loop_get_default ();
   backend->heads = ply_list_new ();
   backend->input_source.key_buffer = ply_buffer_new ();
-  backend->console = console;
   backend->terminal = terminal;
 
   return backend;
@@ -407,7 +404,7 @@ deactivate (ply_renderer_backend_t *backend)
 static void
 on_active_vt_changed (ply_renderer_backend_t *backend)
 {
-  if (ply_console_get_active_vt (backend->console) !=
+  if (ply_terminal_get_active_vt (backend->terminal) !=
       ply_terminal_get_vt_number (backend->terminal))
     {
       ply_trace ("deactivating on vt change");
@@ -499,10 +496,10 @@ open_device (ply_renderer_backend_t *backend)
   if (!load_driver (backend))
     return false;
 
-  ply_console_watch_for_active_vt_change (backend->console,
-                                          (ply_console_active_vt_changed_handler_t)
-                                          on_active_vt_changed,
-                                          backend);
+  ply_terminal_watch_for_active_vt_change (backend->terminal,
+                                           (ply_terminal_active_vt_changed_handler_t)
+                                           on_active_vt_changed,
+                                           backend);
 
   return true;
 }
@@ -512,10 +509,10 @@ close_device (ply_renderer_backend_t *backend)
 {
   free_heads (backend);
 
-  ply_console_stop_watching_for_active_vt_change (backend->console,
-                                                  (ply_console_active_vt_changed_handler_t)
-                                                  on_active_vt_changed,
-                                                  backend);
+  ply_terminal_stop_watching_for_active_vt_change (backend->terminal,
+                                                   (ply_terminal_active_vt_changed_handler_t)
+                                                   on_active_vt_changed,
+                                                   backend);
 
   unload_driver (backend);
 }
@@ -809,8 +806,8 @@ map_to_device (ply_renderer_backend_t *backend)
       node = next_node;
     }
 
-  ply_console_set_active_vt (backend->console,
-                             ply_terminal_get_vt_number (backend->terminal));
+  ply_terminal_set_active_vt (backend->terminal,
+                              ply_terminal_get_vt_number (backend->terminal));
 
   return head_mapped;
 }
@@ -931,7 +928,7 @@ reset_scan_out_buffer_if_needed (ply_renderer_backend_t *backend,
 {
   drmModeCrtc *controller;
 
-  if (ply_console_get_active_vt (backend->console) !=
+  if (ply_terminal_get_active_vt (backend->terminal) !=
       ply_terminal_get_vt_number (backend->terminal))
     return;
 
@@ -965,7 +962,7 @@ flush_head (ply_renderer_backend_t *backend,
   if (backend->is_inactive)
     return;
 
-  ply_console_set_mode (backend->console, PLY_CONSOLE_MODE_GRAPHICS);
+  ply_terminal_set_mode (backend->terminal, PLY_TERMINAL_MODE_GRAPHICS);
   ply_terminal_set_unbuffered_input (backend->terminal);
   pixel_buffer = head->pixel_buffer;
   updated_region = ply_pixel_buffer_get_updated_areas (pixel_buffer);
diff --git a/src/plugins/renderers/frame-buffer/plugin.c b/src/plugins/renderers/frame-buffer/plugin.c
index daa06bf..ff2d1dc 100644
--- a/src/plugins/renderers/frame-buffer/plugin.c
+++ b/src/plugins/renderers/frame-buffer/plugin.c
@@ -82,7 +82,6 @@ struct _ply_renderer_input_source
 struct _ply_renderer_backend
 {
   ply_event_loop_t *loop;
-  ply_console_t *console;
   ply_terminal_t *terminal;
 
   char *device_name;
@@ -245,8 +244,7 @@ flush_area_to_xrgb32_device (ply_renderer_backend_t *backend,
 
 static ply_renderer_backend_t *
 create_backend (const char *device_name,
-                ply_terminal_t *terminal,
-                ply_console_t *console)
+                ply_terminal_t *terminal)
 {
   ply_renderer_backend_t *backend;
 
@@ -263,7 +261,6 @@ create_backend (const char *device_name,
   backend->loop = ply_event_loop_get_default ();
   backend->heads = ply_list_new ();
   backend->input_source.key_buffer = ply_buffer_new ();
-  backend->console = console;
   backend->terminal = terminal;
 
   return backend;
@@ -323,7 +320,7 @@ deactivate (ply_renderer_backend_t *backend)
 static void
 on_active_vt_changed (ply_renderer_backend_t *backend)
 {
-  if (ply_console_get_active_vt (backend->console) !=
+  if (ply_terminal_get_active_vt (backend->terminal) !=
       ply_terminal_get_vt_number (backend->terminal))
     {
       deactivate (backend);
@@ -344,10 +341,10 @@ open_device (ply_renderer_backend_t *backend)
       return false;
     }
 
-  ply_console_watch_for_active_vt_change (backend->console,
-                                          (ply_console_active_vt_changed_handler_t)
-                                          on_active_vt_changed,
-                                          backend);
+  ply_terminal_watch_for_active_vt_change (backend->terminal,
+                                           (ply_terminal_active_vt_changed_handler_t)
+                                           on_active_vt_changed,
+                                           backend);
 
   return true;
 }
@@ -356,10 +353,10 @@ static void
 close_device (ply_renderer_backend_t *backend)
 {
 
-  ply_console_stop_watching_for_active_vt_change (backend->console,
-                                                  (ply_console_active_vt_changed_handler_t)
-                                                  on_active_vt_changed,
-                                                  backend);
+  ply_terminal_stop_watching_for_active_vt_change (backend->terminal,
+                                                   (ply_terminal_active_vt_changed_handler_t)
+                                                   on_active_vt_changed,
+                                                   backend);
   uninitialize_head (backend, &backend->head);
 
   close (backend->device_fd);
@@ -515,8 +512,8 @@ map_to_device (ply_renderer_backend_t *backend)
   if (head->map_address == MAP_FAILED)
     return false;
 
-  ply_console_set_active_vt (backend->console,
-                             ply_terminal_get_vt_number (backend->terminal));
+  ply_terminal_set_active_vt (backend->terminal,
+                              ply_terminal_get_vt_number (backend->terminal));
 
   return true;
 }
@@ -550,7 +547,7 @@ flush_head (ply_renderer_backend_t *backend,
   if (backend->is_inactive)
     return;
 
-  ply_console_set_mode (backend->console, PLY_CONSOLE_MODE_GRAPHICS);
+  ply_terminal_set_mode (backend->terminal, PLY_TERMINAL_MODE_GRAPHICS);
   ply_terminal_set_unbuffered_input (backend->terminal);
   pixel_buffer = head->pixel_buffer;
   updated_region = ply_pixel_buffer_get_updated_areas (pixel_buffer);
diff --git a/src/plugins/renderers/x11/plugin.c b/src/plugins/renderers/x11/plugin.c
index 53961dc..042bdc9 100644
--- a/src/plugins/renderers/x11/plugin.c
+++ b/src/plugins/renderers/x11/plugin.c
@@ -83,7 +83,7 @@ struct _ply_renderer_backend
   ply_event_loop_t            *loop;
   ply_renderer_input_source_t  input_source;
   ply_list_t                  *heads;
-  ply_console_t               *console;
+  ply_terminal_t              *terminal;
 
   ply_fd_watch_t *display_watch;
 
@@ -103,8 +103,7 @@ static gboolean on_key_event (GtkWidget   *widget,
 
 static ply_renderer_backend_t *
 create_backend (const char     *device_name,
-                ply_terminal_t *terminal,
-                ply_console_t  *console)
+                ply_terminal_t *terminal)
 {
   ply_renderer_backend_t *backend;
 
@@ -113,7 +112,7 @@ create_backend (const char     *device_name,
   backend->loop = ply_event_loop_get_default ();
   backend->heads = ply_list_new ();
   backend->input_source.key_buffer = ply_buffer_new ();
-  backend->console = console;
+  backend->terminal = terminal;
 
   return backend;
 }
@@ -233,9 +232,9 @@ map_to_device (ply_renderer_backend_t *backend)
   assert (backend != NULL);
 
   /* Prevent other parts of plymouth from trying to use
-   * the console, since X draws to it.
+   * the terminal, since X draws to it.
    */
-  ply_console_ignore_mode_changes (backend->console, true);
+  ply_terminal_ignore_mode_changes (backend->terminal, true);
 
   node = ply_list_get_first_node (backend->heads);
   while (node != NULL)
@@ -306,7 +305,7 @@ unmap_from_device (ply_renderer_backend_t *backend)
       node = next_node;
     }
 
-  ply_console_ignore_mode_changes (backend->console, false);
+  ply_terminal_ignore_mode_changes (backend->terminal, false);
 }
 
 static void
-- 
1.7.0



More information about the plymouth mailing list