diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-23 19:33:36 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-23 19:35:31 -0700 |
commit | 9d1cde418a4f0dc6cccf4af7eae340e75de2f3d4 (patch) | |
tree | b106d1fc14c146652ece9df7023c7fe3726a5cba /com32/libutil/ansiline.c | |
parent | ee89890b4008c40bd7d6ea5ddb1016b47fee7bbf (diff) | |
download | syslinux-9d1cde418a4f0dc6cccf4af7eae340e75de2f3d4.tar.gz syslinux-9d1cde418a4f0dc6cccf4af7eae340e75de2f3d4.tar.xz syslinux-9d1cde418a4f0dc6cccf4af7eae340e75de2f3d4.zip |
Don't set the autocr flag on the serial console; clean up crapsyslinux-3.81-pre12
libutil would set the autocr flag on the serial console, which really
never was any point -- we already do \n -> \r\n conversion explicitly
in the serial code. This was always very annoying to deal with if the
menu was interrupted.
Furthermore, drop completely unnecessary
initialization/deinitialization routines that completely duplicated
other code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/libutil/ansiline.c')
-rw-r--r-- | com32/libutil/ansiline.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/com32/libutil/ansiline.c b/com32/libutil/ansiline.c index 4cdac024..fffb2baa 100644 --- a/com32/libutil/ansiline.c +++ b/com32/libutil/ansiline.c @@ -38,16 +38,9 @@ #include <unistd.h> #include <console.h> -static void __attribute__((destructor)) console_cleanup(void) -{ - /* For the serial console, be nice and clean up */ - fputs("\033[0m\033[20l", stdout); -} - void console_ansi_std(void) { openconsole(&dev_stdcon_r, &dev_ansiserial_w); - fputs("\033[0m\033[20h", stdout); } #else @@ -64,7 +57,6 @@ static void __attribute__((constructor)) console_init(void) static void __attribute__((destructor)) console_cleanup(void) { - fputs("\033[0m\033[20l", stdout); tcsetattr(0, TCSANOW, &original_termios_settings); } @@ -83,8 +75,10 @@ void console_ansi_std(void) tio.c_iflag &= ~ICRNL; tio.c_iflag |= IGNCR; tio.c_lflag |= ICANON|ECHO; + if (!tio.c_oflag & OPOST) + tio.c_oflag = 0; + tio.c_oflag |= OPOST|ONLCR; tcsetattr(0, TCSANOW, &tio); - fputs("\033[0m\033[20h", stdout); } #endif |