]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Make window_open succeed more frequently
authorRay Strode <rstrode@redhat.com>
Wed, 8 Oct 2008 17:39:00 +0000 (13:39 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 8 Oct 2008 17:55:39 +0000 (13:55 -0400)
Serial devices can't do some of the things that
makes ply_window_open fail.  We make those failures
non-fatal now.

src/libplybootsplash/ply-window.c

index 087d3ef2a64c2c00c62fe250229c3b0c60349117..2c25b2d9439429a891182832a5f6b05198f5fae6 100644 (file)
@@ -442,6 +442,8 @@ ply_window_look_up_geometry (ply_window_t *window)
     if (ioctl (window->tty_fd, TIOCGWINSZ, &window_size) < 0)
       {
         ply_trace ("could not read window text geometry: %m");
+        window->number_of_text_columns = 80;
+        window->number_of_text_rows = 24;
         return false;
       }
 
@@ -474,19 +476,19 @@ ply_window_open (ply_window_t *window)
       window->tty_name = strdup (tty_name);
     }
 
+  ply_trace ("trying to open window '%s'", window->tty_name);
+
   window->tty_fd = open (window->tty_name, O_RDWR | O_NOCTTY);
 
   if (window->tty_fd < 0)
     return false;
 
   if (!ply_window_set_unbuffered_input (window))
-    return false;
+    ply_trace ("window '%s' will be line buffered", window->tty_name);
 
-  if (!ply_window_set_mode (window, PLY_WINDOW_MODE_TEXT))
-    return false;
+  ply_window_set_mode (window, PLY_WINDOW_MODE_TEXT);
 
-  if (!ply_window_look_up_geometry (window))
-    return false;
+  ply_window_look_up_geometry (window);
 
   ply_window_look_up_color_palette (window);
   ply_window_save_color_palette (window);