]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
details: update new views with current boot buffer
authorRay Strode <rstrode@redhat.com>
Fri, 9 Oct 2015 16:46:49 +0000 (12:46 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 23 May 2016 15:06:27 +0000 (11:06 -0400)
if a view is added after the splash is shown, make sure
to update the view with the current contents of the boot
buffer.

src/plugins/splash/details/plugin.c

index 8e55d0537b7220caed23359ad26ef58486d8f5e6..92993302ee0d2ad2e4d4cfcf8a9d80c8135d7f01 100644 (file)
@@ -77,6 +77,8 @@ struct _ply_boot_splash_plugin
         ply_list_t                    *views;
         ply_boot_splash_display_type_t state;
         ply_list_t                    *messages;
+
+        ply_buffer_t                  *boot_buffer;
 };
 
 static view_t *
@@ -239,6 +241,15 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
                 ply_terminal_activate_vt (terminal);
 
         ply_list_append_data (plugin->views, view);
+
+        if (plugin->boot_buffer != NULL) {
+                size_t size;
+                const char *bytes;
+
+                size = ply_buffer_get_size (plugin->boot_buffer);
+                bytes = ply_buffer_get_bytes (plugin->boot_buffer);
+                view_write (view, bytes, size);
+        }
 }
 
 static void
@@ -282,8 +293,9 @@ show_splash_screen (ply_boot_splash_plugin_t *plugin,
                                        plugin);
 
         if (boot_buffer) {
-                size = ply_buffer_get_size (boot_buffer);
+                plugin->boot_buffer = boot_buffer;
 
+                size = ply_buffer_get_size (boot_buffer);
                 write_on_views (plugin, ply_buffer_get_bytes (boot_buffer), size);
         }