]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Adapt boot splash test program to take a vt to switch to
authorRay Strode <rstrode@redhat.com>
Wed, 4 Jun 2008 20:36:56 +0000 (16:36 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 4 Jun 2008 20:36:56 +0000 (16:36 -0400)
src/ply-boot-splash.c

index a4dbf14214553c3bb084ec801e2992be1d2a9372..8ccaf6c41dab2590b84bdbbee3dc52fe5bbcaf27 100644 (file)
@@ -329,7 +329,7 @@ main (int    argc,
   else
     module_name = "../splash-plugins/fade-in/.libs/fade-in.so";
 
-  state.window = ply_window_new (0);
+  state.window = ply_window_new (argc > 2? atoi (argv[2]) : 0);
 
   if (!ply_window_open (state.window))
     {
@@ -337,6 +337,12 @@ main (int    argc,
       return errno;
     }
 
+  if (!ply_window_take_console (state.window))
+    {
+      perror ("could not switch console to window vt");
+      return errno;
+    }
+
   ply_window_attach_to_event_loop (state.window, state.loop);
   ply_window_set_escape_handler (state.window,
                                  (ply_window_escape_handler_t) on_quit, &state);