print a carriage return as well as a newline, in grub_putchar instead of console_putchar.
This commit is contained in:
parent
563b471fc7
commit
a1fafbfb0e
3 changed files with 14 additions and 17 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2000-08-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* 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 <okuji@gnu.org>
|
2000-08-27 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* lib/device.c [__linux__]: Don't include linux/fs.h.
|
* lib/device.c [__linux__]: Don't include linux/fs.h.
|
||||||
|
|
10
stage2/asm.S
10
stage2/asm.S
|
@ -1396,16 +1396,6 @@ ENTRY(console_putchar)
|
||||||
|
|
||||||
movb 0x10(%esp), %bl
|
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)
|
call EXT_C(prot_to_real)
|
||||||
.code16
|
.code16
|
||||||
|
|
||||||
|
|
|
@ -878,6 +878,9 @@ checkkey (void)
|
||||||
void
|
void
|
||||||
grub_putchar (int c)
|
grub_putchar (int c)
|
||||||
{
|
{
|
||||||
|
if (c == '\n')
|
||||||
|
grub_putchar ('\r');
|
||||||
|
|
||||||
#ifdef STAGE1_5
|
#ifdef STAGE1_5
|
||||||
|
|
||||||
/* In Stage 1.5, only the normal console is supported. */
|
/* In Stage 1.5, only the normal console is supported. */
|
||||||
|
@ -890,12 +893,7 @@ grub_putchar (int c)
|
||||||
|
|
||||||
# ifdef SUPPORT_SERIAL
|
# ifdef SUPPORT_SERIAL
|
||||||
if (terminal & TERMINAL_SERIAL)
|
if (terminal & TERMINAL_SERIAL)
|
||||||
{
|
|
||||||
if (c == '\n')
|
|
||||||
serial_putchar ('\r');
|
|
||||||
|
|
||||||
serial_putchar (c);
|
serial_putchar (c);
|
||||||
}
|
|
||||||
# endif /* SUPPORT_SERIAL */
|
# endif /* SUPPORT_SERIAL */
|
||||||
|
|
||||||
#endif /* ! STAGE1_5 */
|
#endif /* ! STAGE1_5 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue