From d27b3c46e71c21bb09f85341d5c9d64acc2e3d9b Mon Sep 17 00:00:00 2001 From: Joe Millenbach Date: Thu, 19 Jul 2012 18:04:37 -0700 Subject: [PATCH] --- yaml --- r: 318409 b: refs/heads/master c: e605a425975b073aafebbb2c09d3ae266be2fd3e h: refs/heads/master i: 318407: e807473f03b230befde8ce90b0d2931c0a6c4434 v: v3 --- [refs] | 2 +- trunk/arch/x86/boot/compressed/misc.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index fff5bfc85e12..2d3fa79ccc52 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9f4e4392cbf72d731a489a3217fe810820b8ba96 +refs/heads/master: e605a425975b073aafebbb2c09d3ae266be2fd3e diff --git a/trunk/arch/x86/boot/compressed/misc.c b/trunk/arch/x86/boot/compressed/misc.c index 8f2355d5858a..49c6d5632ef7 100644 --- a/trunk/arch/x86/boot/compressed/misc.c +++ b/trunk/arch/x86/boot/compressed/misc.c @@ -223,6 +223,12 @@ void __putstr(int error, const char *s) outb(0xff & (pos >> 1), vidport+1); } +static void debug_putstr(const char *s) +{ + if (debug) + putstr(s); +} + void *memset(void *s, int c, size_t n) { int i; @@ -293,8 +299,7 @@ static void parse_elf(void *output) return; } - if (debug) - putstr("Parsing ELF... "); + debug_putstr("Parsing ELF... "); phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); if (!phdrs) @@ -346,8 +351,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, cols = real_mode->screen_info.orig_video_cols; console_init(); - if (debug) - putstr("early console in decompress_kernel\n"); + debug_putstr("early console in decompress_kernel\n"); free_mem_ptr = heap; /* Heap */ free_mem_end_ptr = heap + BOOT_HEAP_SIZE; @@ -366,11 +370,9 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, error("Wrong destination address"); #endif - if (debug) - putstr("\nDecompressing Linux... "); + debug_putstr("\nDecompressing Linux... "); decompress(input_data, input_len, NULL, NULL, output, NULL, error); parse_elf(output); - if (debug) - putstr("done.\nBooting the kernel.\n"); + debug_putstr("done.\nBooting the kernel.\n"); return; }