xenithorb / rpms / plymouth

Forked from rpms/plymouth 6 years ago
Clone
Blob Blame History Raw
From 7a87b2210b2baa2c43276062e5a24b9b3e5760e6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 5 Oct 2009 17:37:48 -0400
Subject: [PATCH] [text] Don't crash after password prompt

We were treating the passed in view to the
draw handler as if it was the plugin itself.
---
 src/plugins/splash/text/plugin.c |   27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 6ca7ee1..bb09b22 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -464,37 +464,14 @@ stop_animation (ply_boot_splash_plugin_t *plugin)
 }
 
 static void
-clear_views (ply_boot_splash_plugin_t *plugin)
-{
-  ply_list_node_t *node;
-
-  assert (plugin != NULL);
-  assert (plugin->loop != NULL);
-
-  node = ply_list_get_first_node (plugin->views);
-  while (node != NULL)
-    {
-      ply_list_node_t *next_node;
-      view_t *view;
-
-      view = ply_list_node_get_data (node);
-      next_node = ply_list_get_next_node (plugin->views, node);
-
-      ply_text_display_clear_screen (view->display);
-
-      node = next_node;
-    }
-}
-
-static void
-on_draw (ply_boot_splash_plugin_t *plugin,
+on_draw (view_t                   *view,
          ply_terminal_t           *terminal,
          int                       x,
          int                       y,
          int                       width,
          int                       height)
 {
-  clear_views (plugin);
+  ply_text_display_clear_screen (view->display);
 }
 
 static void
-- 
1.6.5.rc2