diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2012-11-09 20:44:52 +0000 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2012-11-09 20:44:52 +0000 |
commit | 820fd62a86a88b3c53d5ebe1939e4dc51cc8bcdc (patch) | |
tree | c68a3c36dfae599c50c1f1dcda92113dab70effc /mdk-stage1/bootsplash.c | |
parent | 0db2372d5a031bad0f5df98b83f7fb7d648215ed (diff) | |
download | drakx-backup-do-not-use-820fd62a86a88b3c53d5ebe1939e4dc51cc8bcdc.tar drakx-backup-do-not-use-820fd62a86a88b3c53d5ebe1939e4dc51cc8bcdc.tar.gz drakx-backup-do-not-use-820fd62a86a88b3c53d5ebe1939e4dc51cc8bcdc.tar.bz2 drakx-backup-do-not-use-820fd62a86a88b3c53d5ebe1939e4dc51cc8bcdc.tar.xz drakx-backup-do-not-use-820fd62a86a88b3c53d5ebe1939e4dc51cc8bcdc.zip |
Do not mix tabs and spaces
Diffstat (limited to 'mdk-stage1/bootsplash.c')
-rw-r--r-- | mdk-stage1/bootsplash.c | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/mdk-stage1/bootsplash.c b/mdk-stage1/bootsplash.c index 9d0d53327..839b4562e 100644 --- a/mdk-stage1/bootsplash.c +++ b/mdk-stage1/bootsplash.c @@ -23,48 +23,53 @@ 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; - } - } + 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"); + 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); - } + 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); + 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); + update_progression_only(current_size); + update_progression_raw(current_size); } void end_progression(void) { - end_progression_raw(); + end_progression_raw(); } |