From: Ray Strode Date: Thu, 21 Aug 2008 20:04:35 +0000 (-0400) Subject: Add notification to splash plugins when / gets mounted X-Git-Tag: 0.6.0~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3822e3573da3f89928e9dc0cbda692ab923f89eb;p=thirdparty%2Fplymouth.git Add notification to splash plugins when / gets mounted We'll need it to know when we can dlopen support libraries for rendering text. --- diff --git a/src/libplybootsplash/ply-boot-splash-plugin.h b/src/libplybootsplash/ply-boot-splash-plugin.h index 920bdccb..25b3fe68 100644 --- a/src/libplybootsplash/ply-boot-splash-plugin.h +++ b/src/libplybootsplash/ply-boot-splash-plugin.h @@ -49,6 +49,7 @@ typedef struct void (* on_boot_output) (ply_boot_splash_plugin_t *plugin, const char *output, size_t size); + void (* on_root_mounted) (ply_boot_splash_plugin_t *plugin); void (* hide_splash_screen) (ply_boot_splash_plugin_t *plugin, ply_event_loop_t *loop, ply_window_t *window); diff --git a/src/main.c b/src/main.c index afa0f82f..e5bceae4 100644 --- a/src/main.c +++ b/src/main.c @@ -158,6 +158,8 @@ on_newroot (state_t *state, chdir(root_dir); chroot("."); chdir("/"); + + ply_boot_splash_root_mounted (state->boot_splash); } static void diff --git a/src/ply-boot-splash.c b/src/ply-boot-splash.c index 69b7c356..e5c6b5b2 100644 --- a/src/ply-boot-splash.c +++ b/src/ply-boot-splash.c @@ -214,6 +214,15 @@ ply_boot_splash_update_output (ply_boot_splash_t *splash, splash->plugin_interface->on_boot_output (splash->plugin, output, size); } +void +ply_boot_splash_root_mounted (ply_boot_splash_t *splash) +{ + assert (splash != NULL); + + if (splash->plugin_interface->on_root_mounted != NULL) + splash->plugin_interface->on_root_mounted (splash->plugin); +} + void ply_boot_splash_ask_for_password (ply_boot_splash_t *splash, const char *prompt, diff --git a/src/ply-boot-splash.h b/src/ply-boot-splash.h index 94c032ce..aeddc249 100644 --- a/src/ply-boot-splash.h +++ b/src/ply-boot-splash.h @@ -45,6 +45,7 @@ void ply_boot_splash_update_status (ply_boot_splash_t *splash, void ply_boot_splash_update_output (ply_boot_splash_t *splash, const char *output, size_t size); +void ply_boot_splash_root_mounted (ply_boot_splash_t *splash); void ply_boot_splash_ask_for_password (ply_boot_splash_t *splash, const char *prompt,