diff options
| author | Ray Strode <rstrode@redhat.com> | 2008-05-20 22:37:01 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2008-05-20 22:37:01 -0400 |
| commit | 4392b6923835d5f2cbdd9e84364e83250b6cbcfd (patch) | |
| tree | 280afa3f5ac3872899c401fbba406fd1ebbffdd2 /src/client | |
| parent | ff31d108ca2cb15ade449a8ede6d3aa693e254c4 (diff) | |
Don't show splash by default, instead require client to request it
plymouthd gets started before the drm modesetting modules are loaded,
so we can't try to access the frame buffer right away. The plan is to
load the drm modules as soon as possible in the initrd and then tell
plymouthd to put up the splash ASAP.
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/ply-boot-client.c | 12 | ||||
| -rw-r--r-- | src/client/ply-boot-client.h | 6 | ||||
| -rw-r--r-- | src/client/plymouth.c | 15 |
3 files changed, 29 insertions, 4 deletions
diff --git a/src/client/ply-boot-client.c b/src/client/ply-boot-client.c index 08eb6b9..c349837 100644 --- a/src/client/ply-boot-client.c +++ b/src/client/ply-boot-client.c @@ -468,6 +468,18 @@ ply_boot_client_ask_daemon_for_password (ply_boot_client_t *cli } void +ply_boot_client_tell_daemon_to_show_splash (ply_boot_client_t *client, + ply_boot_client_response_handler_t handler, + ply_boot_client_response_handler_t failed_handler, + void *user_data) +{ + assert (client != NULL); + + ply_boot_client_queue_request (client, PLY_BOOT_PROTOCOL_REQUEST_TYPE_SHOW_SPLASH, + NULL, handler, failed_handler, user_data); +} + +void ply_boot_client_tell_daemon_to_quit (ply_boot_client_t *client, ply_boot_client_response_handler_t handler, ply_boot_client_response_handler_t failed_handler, diff --git a/src/client/ply-boot-client.h b/src/client/ply-boot-client.h index 4c72db2..c3240cd 100644 --- a/src/client/ply-boot-client.h +++ b/src/client/ply-boot-client.h @@ -40,7 +40,7 @@ typedef void (* ply_boot_client_disconnect_handler_t) (void *user_d #ifndef PLY_HIDE_FUNCTION_DECLARATIONS ply_boot_client_t *ply_boot_client_new (void); - + void ply_boot_client_free (ply_boot_client_t *client); bool ply_boot_client_connect (ply_boot_client_t *client, ply_boot_client_disconnect_handler_t disconnect_handler, @@ -62,6 +62,10 @@ void ply_boot_client_tell_daemon_system_is_initialized (ply_boot_client_t ply_boot_client_response_handler_t handler, ply_boot_client_response_handler_t failed_handler, void *user_data); +void ply_boot_client_tell_daemon_to_show_splash (ply_boot_client_t *client, + ply_boot_client_response_handler_t handler, + ply_boot_client_response_handler_t failed_handler, + void *user_data); void ply_boot_client_tell_daemon_to_quit (ply_boot_client_t *client, ply_boot_client_response_handler_t handler, ply_boot_client_response_handler_t failed_handler, diff --git a/src/client/plymouth.c b/src/client/plymouth.c index 048563d..df503fc 100644 --- a/src/client/plymouth.c +++ b/src/client/plymouth.c @@ -59,7 +59,7 @@ on_disconnect (ply_event_loop_t *loop) void print_usage (void) { - ply_log ("rhgb-client [--ping] [--update=STATUS] [--details] [--sysinit] [--quit]"); + ply_log ("rhgb-client [--ping] [--update=STATUS] [--show-splash] [--details] [--sysinit] [--quit]"); ply_flush_log (); } @@ -69,7 +69,7 @@ main (int argc, { ply_event_loop_t *loop; ply_boot_client_t *client; - bool should_quit, should_ping, should_update, should_sysinit, should_ask_for_password; + bool should_quit, should_ping, should_update, should_sysinit, should_ask_for_password, should_show_splash; char *status; int exit_code; int i; @@ -89,6 +89,7 @@ main (int argc, should_update = false; should_quit = false; should_ask_for_password = false; + should_show_splash = false; status = NULL; for (i = 1; i < argc; i++) { @@ -103,6 +104,8 @@ main (int argc, should_ping = true; else if (strstr (argv[i], "--sysinit") != NULL) should_sysinit = true; + else if (strstr (argv[i], "--show-splash") != NULL) + should_show_splash = true; else if (strstr (argv[i], "--ask-for-password") != NULL) should_ask_for_password = true; else if (strstr (argv[i], "--update") != NULL) @@ -142,7 +145,13 @@ main (int argc, ply_boot_client_attach_to_event_loop (client, loop); - if (should_quit) + if (should_show_splash) + ply_boot_client_tell_daemon_to_show_splash (client, + (ply_boot_client_response_handler_t) + on_success, + (ply_boot_client_response_handler_t) + on_failure, loop); + else if (should_quit) ply_boot_client_tell_daemon_to_quit (client, (ply_boot_client_response_handler_t) on_success, |
