]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[main] rename state->console to state->kernel_console_tty
authorRay Strode <rstrode@redhat.com>
Wed, 23 Sep 2009 07:24:26 +0000 (03:24 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 28 Sep 2009 13:07:59 +0000 (09:07 -0400)
The name "console" is sort of ambiguous.  It could mean:

1) the keyboard and mouse together (also known as "seat")
2) the VT console
3) /dev/console
4) where /dev/console messages should go

In this case we mean 4, so we rename it to kernel_console_tty
for clarity.

src/main.c

index 1feac1d8fc1c1ae3aec797c357291ef9cb28cbe5..a77c45b6d3a28ebc92d286cef31a425944605aa8 100644 (file)
@@ -102,7 +102,7 @@ typedef struct
   uint32_t should_be_attached : 1;
   uint32_t should_retain_splash : 1;
 
-  char *console;
+  char *kernel_console_tty;
   char *override_splash_path;
 
   int number_of_errors;
@@ -523,7 +523,7 @@ plymouth_should_show_default_splash (state_t *state)
   };
   int i;
 
-  if (state->console != NULL)
+  if (state->kernel_console_tty != NULL)
     return false;
 
   if (!has_open_window (state))
@@ -1185,26 +1185,26 @@ check_for_consoles (state_t    *state,
       char *end;
       ply_trace ("serial console found!");
 
-      free (state->console);
-      state->console = strdup (console_key + strlen (" console="));
+      free (state->kernel_console_tty);
+      state->kernel_console_tty = strdup (console_key + strlen (" console="));
 
       remaining_command_line = console_key + strlen (" console=");
 
-      end = strpbrk (state->console, " \n\t\v,");
+      end = strpbrk (state->kernel_console_tty, " \n\t\v,");
 
       if (end != NULL)
         {
           *end = '\0';
-          remaining_command_line += end - state->console;
+          remaining_command_line += end - state->kernel_console_tty;
         }
 
-      if (strcmp (state->console, "tty0") == 0 || strcmp (state->console, "/dev/tty0") == 0)
+      if (strcmp (state->kernel_console_tty, "tty0") == 0 || strcmp (state->kernel_console_tty, "/dev/tty0") == 0)
         {
-          free (state->console);
-          state->console = strdup (default_tty);
+          free (state->kernel_console_tty);
+          state->kernel_console_tty = strdup (default_tty);
         }
 
-      ply_list_append_data (state->windows, create_window (state, state->console));
+      ply_list_append_data (state->windows, create_window (state, state->kernel_console_tty));
     }
 
     if (ply_list_get_length (state->windows) == 0)
@@ -1267,8 +1267,8 @@ initialize_environment (state_t *state)
 
   check_for_consoles (state, default_tty);
 
-  if (state->console != NULL)
-    redirect_standard_io_to_device (state->console);
+  if (state->kernel_console_tty != NULL)
+    redirect_standard_io_to_device (state->kernel_console_tty);
   else
     redirect_standard_io_to_device (default_tty);