diff options
author | Mystery Man <unknown@mandriva.org> | 2005-12-18 12:19:48 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2005-12-18 12:19:48 +0000 |
commit | de25dab468737adae2c3f5d45a8bd7eb3fdc83e6 (patch) | |
tree | 874cebd5583c01c90ba083411b4b495dfb517b9a /mdk-stage1/bootsplash.c | |
parent | 575a03f47cd0de3af62c1b2f2685324943feb08a (diff) | |
download | drakx-backup-do-not-use-de25dab468737adae2c3f5d45a8bd7eb3fdc83e6.tar drakx-backup-do-not-use-de25dab468737adae2c3f5d45a8bd7eb3fdc83e6.tar.gz drakx-backup-do-not-use-de25dab468737adae2c3f5d45a8bd7eb3fdc83e6.tar.bz2 drakx-backup-do-not-use-de25dab468737adae2c3f5d45a8bd7eb3fdc83e6.tar.xz drakx-backup-do-not-use-de25dab468737adae2c3f5d45a8bd7eb3fdc83e6.zip |
This commit was manufactured by cvs2svn to create tag 'V10_4_6_1mdk'.V10_4_6_1mdk
Diffstat (limited to 'mdk-stage1/bootsplash.c')
-rw-r--r-- | mdk-stage1/bootsplash.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/mdk-stage1/bootsplash.c b/mdk-stage1/bootsplash.c deleted file mode 100644 index d51deb543..000000000 --- a/mdk-stage1/bootsplash.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Pixel (pixel@mandrakesoft.com) - * - * Copyright 2004 Mandrakesoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include <stdio.h> -#include "bootsplash.h" -#include "frontend.h" -#include "log.h" - -static int total_size; -static float previous; -static FILE* splash = NULL; - -static void update_progression_only(int current_size) -{ - if (splash && total_size) { - float ratio = (float) (current_size + 1) / total_size; - if (ratio > previous + 0.01) { - fprintf(splash, "show %d\n", (int) (ratio * 65534)); - fflush(splash); - previous = ratio; - } - } -} - -static void open_bootsplash(void) -{ - if (!splash) splash = fopen("/proc/splash", "w"); - if (!splash) log_message("opening /proc/splash failed"); -} - -void exit_bootsplash(void) -{ - log_message("exiting bootsplash"); - open_bootsplash(); - if (splash) { - fprintf(splash, "verbose\n"); - fflush(splash); - } -} - - -void init_progression(char *msg, int size) -{ - previous = 0; total_size = size; - open_bootsplash(); - update_progression_only(0); - init_progression_raw(msg, size); -} - -void update_progression(int current_size) -{ - update_progression_only(current_size); - update_progression_raw(current_size); -} - -void end_progression(void) -{ - end_progression_raw(); -} |