From 78bb3d17cdc6e55d71c4b58b7c64db43cc6972d0 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 11 Jul 2008 08:47:46 -0400 Subject: Rearrange functions to prevent forward declaration We're going to be calling show_detailed_splash before implicitly in cases when there is no splash, so we need to make sure it's high enough up in the file --- src/main.c | 62 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index c92791b..f9a4e57 100644 --- a/src/main.c +++ b/src/main.c @@ -95,37 +95,6 @@ on_update (state_t *state, status); } -static void -on_ask_for_password (state_t *state, - ply_answer_t *answer) -{ - if (state->boot_splash == NULL) - { - ply_answer_with_string (answer, ""); - return; - } - - ply_boot_splash_ask_for_password (state->boot_splash, answer); -} - -static void -on_newroot (state_t *state, - const char *root_dir) -{ - ply_trace ("new root mounted at \"%s\", switching to it", root_dir); - chdir(root_dir); - chroot("."); - chdir("/"); -} - -static void -on_system_initialized (state_t *state) -{ - ply_trace ("system now initialized, opening boot.log"); - ply_terminal_session_open_log (state->session, - PLYMOUTH_LOG_DIRECTORY "/boot.log"); -} - static void show_detailed_splash (state_t *state) { @@ -159,6 +128,37 @@ show_default_splash (state_t *state) ply_error ("could not start boot splash: %m"); } +static void +on_ask_for_password (state_t *state, + ply_answer_t *answer) +{ + if (state->boot_splash == NULL) + { + ply_answer_with_string (answer, ""); + return; + } + + ply_boot_splash_ask_for_password (state->boot_splash, answer); +} + +static void +on_newroot (state_t *state, + const char *root_dir) +{ + ply_trace ("new root mounted at \"%s\", switching to it", root_dir); + chdir(root_dir); + chroot("."); + chdir("/"); +} + +static void +on_system_initialized (state_t *state) +{ + ply_trace ("system now initialized, opening boot.log"); + ply_terminal_session_open_log (state->session, + PLYMOUTH_LOG_DIRECTORY "/boot.log"); +} + static bool plymouth_should_show_default_splash (state_t *state) { -- cgit