summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-07-11 08:46:15 -0400
committerRay Strode <rstrode@redhat.com>2008-07-11 08:46:15 -0400
commit254292def2e61ea935f0d34f2ae2155630d86a46 (patch)
treeba1430448f78315ec8eb1de455f09c233c8afc97
parenta68a8b736ac9d6c2c813d0c53b5ef0d3736042bb (diff)
downloadplymouth-254292def2e61ea935f0d34f2ae2155630d86a46.tar.gz
plymouth-254292def2e61ea935f0d34f2ae2155630d86a46.tar.xz
plymouth-254292def2e61ea935f0d34f2ae2155630d86a46.zip
Rearrange functions to drop forward declaration
-rw-r--r--src/main.c66
1 files changed, 32 insertions, 34 deletions
diff --git a/src/main.c b/src/main.c
index f55d586..c92791b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -65,8 +65,6 @@ static ply_boot_splash_t *start_boot_splash (state_t *state,
static ply_window_t *create_window (state_t *state, int vt_number);
-static bool plymouth_should_show_default_splash (state_t *state);
-
static void
on_session_output (state_t *state,
const char *output,
@@ -161,6 +159,38 @@ show_default_splash (state_t *state)
ply_error ("could not start boot splash: %m");
}
+static bool
+plymouth_should_show_default_splash (state_t *state)
+{
+ ply_trace ("checking if plymouth should be running");
+
+ const char const *strings[] = {
+ " single ", " single", "^single ",
+ " 1 ", " 1", "^1 ",
+ " init=", "^init=",
+ NULL
+ };
+ int i;
+
+ for (i = 0; strings[i] != NULL; i++)
+ {
+ int cmp;
+ if (strings[i][0] == '^')
+ cmp = strncmp(state->kernel_command_line, strings[i]+1,
+ strlen(strings[i]+1)) == 0;
+ else
+ cmp = strstr (state->kernel_command_line, strings[i]) != NULL;
+
+ if (cmp)
+ {
+ ply_trace ("kernel command line has option \"%s\"", strings[i]);
+ return false;
+ }
+ }
+
+ return strstr (state->kernel_command_line, "rhgb") != NULL;
+}
+
static void
on_show_splash (state_t *state)
{
@@ -421,38 +451,6 @@ set_console_io_to_vt1 (state_t *state)
}
static bool
-plymouth_should_show_default_splash (state_t *state)
-{
- ply_trace ("checking if plymouth should be running");
-
- const char const *strings[] = {
- " single ", " single", "^single ",
- " 1 ", " 1", "^1 ",
- " init=", "^init=",
- NULL
- };
- int i;
-
- for (i = 0; strings[i] != NULL; i++)
- {
- int cmp;
- if (strings[i][0] == '^')
- cmp = strncmp(state->kernel_command_line, strings[i]+1,
- strlen(strings[i]+1)) == 0;
- else
- cmp = strstr (state->kernel_command_line, strings[i]) != NULL;
-
- if (cmp)
- {
- ply_trace ("kernel command line has option \"%s\"", strings[i]);
- return false;
- }
- }
-
- return strstr (state->kernel_command_line, "rhgb") != NULL;
-}
-
-static bool
initialize_environment (state_t *state)
{
ply_trace ("initializing minimal work environment");