diff --git a/ChangeLog b/ChangeLog index 5ccb34159..29e774b09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-08-28 OKUJI Yoshinori + + * stage2/asm.S (console_putchar): Don't print a carriage return + when C is a newline. + * stage2/char_io.c (grub_putchar): Call grub_putchar with the + arugment set to a carriage return, if C is a newline. + [!STAGE1_5 && SUPPORT_SERIAL]: Don't print a carriage return + when C is a newline. + 2000-08-27 OKUJI Yoshinori * lib/device.c [__linux__]: Don't include linux/fs.h. diff --git a/stage2/asm.S b/stage2/asm.S index c1321bb04..830c8aaf4 100644 --- a/stage2/asm.S +++ b/stage2/asm.S @@ -1395,17 +1395,7 @@ ENTRY(console_putchar) push %ebx movb 0x10(%esp), %bl - - /* if not '\n', just print the character */ - cmpb $0xa, %bl - jne pc_notnewline - - /* if newline, print CR as well */ - pushl $0xd - call EXT_C(console_putchar) - popl %eax - -pc_notnewline: + call EXT_C(prot_to_real) .code16 diff --git a/stage2/char_io.c b/stage2/char_io.c index 0cc3b8926..955be86fd 100644 --- a/stage2/char_io.c +++ b/stage2/char_io.c @@ -878,6 +878,9 @@ checkkey (void) void grub_putchar (int c) { + if (c == '\n') + grub_putchar ('\r'); + #ifdef STAGE1_5 /* In Stage 1.5, only the normal console is supported. */ @@ -890,12 +893,7 @@ grub_putchar (int c) # ifdef SUPPORT_SERIAL if (terminal & TERMINAL_SERIAL) - { - if (c == '\n') - serial_putchar ('\r'); - - serial_putchar (c); - } + serial_putchar (c); # endif /* SUPPORT_SERIAL */ #endif /* ! STAGE1_5 */