From cf4f0a719991e410dcebfaaba910ae41a5895abc Mon Sep 17 00:00:00 2001 From: okuji Date: Mon, 10 Mar 2003 01:12:26 +0000 Subject: [PATCH] 2003-03-10 Yoshinori K. Okuji From Tilmann Bubeck: * stage2/builtins.c [SUPPORT_SERIAL] (terminfo_func): Unescape arguments before copying them, and escape sequences before printing them. * stage2/terminfo.h (TERMINFO_LEN): Changed to 40. --- ChangeLog | 8 ++++++++ docs/grub.8 | 2 +- stage2/builtins.c | 19 ++++++++++++------- stage2/terminfo.h | 4 ++-- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e4253b49..f013d19c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-03-10 Yoshinori K. Okuji + + From Tilmann Bubeck: + * stage2/builtins.c [SUPPORT_SERIAL] (terminfo_func): Unescape + arguments before copying them, and escape sequences before + printing them. + * stage2/terminfo.h (TERMINFO_LEN): Changed to 40. + 2003-02-20 Yoshinori K. Okuji * util/grub-install.in (find_device): Fix the sed script. diff --git a/docs/grub.8 b/docs/grub.8 index 52665e53c..65c65906e 100644 --- a/docs/grub.8 +++ b/docs/grub.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB "8" "February 2003" "grub (GNU GRUB 0.93)" FSF +.TH GRUB "8" "March 2003" "grub (GNU GRUB 0.93)" FSF .SH NAME grub \- the grub shell .SH SYNOPSIS diff --git a/stage2/builtins.c b/stage2/builtins.c index 68fbca8e8..1b5d1f21e 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -1,7 +1,7 @@ /* builtins.c - the GRUB builtin commands */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc. + * Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -4188,7 +4188,7 @@ terminfo_func (char *arg, int flags) if (! grub_memcmp (arg, name, len)) { - grub_strcpy (options[i].var, arg + len); + grub_strcpy (options[i].var, ti_unescape_string (arg + len)); break; } } @@ -4215,11 +4215,16 @@ terminfo_func (char *arg, int flags) /* No option specifies printing out current settings. */ term = ti_get_term (); - grub_printf ("name=%s\n", term.name); - grub_printf ("cursor_address=%s\n", term.cursor_address); - grub_printf ("clear_screen=%s\n", term.clear_screen); - grub_printf ("enter_standout_mode=%s\n", term.enter_standout_mode); - grub_printf ("exit_standout_mode=%s\n", term.exit_standout_mode); + grub_printf ("name=%s\n", + ti_escape_string (term.name)); + grub_printf ("cursor_address=%s\n", + ti_escape_string (term.cursor_address)); + grub_printf ("clear_screen=%s\n", + ti_escape_string (term.clear_screen)); + grub_printf ("enter_standout_mode=%s\n", + ti_escape_string (term.enter_standout_mode)); + grub_printf ("exit_standout_mode=%s\n", + ti_escape_string (term.exit_standout_mode)); } return 0; diff --git a/stage2/terminfo.h b/stage2/terminfo.h index 28c832e3c..aad054a54 100644 --- a/stage2/terminfo.h +++ b/stage2/terminfo.h @@ -1,7 +1,7 @@ /* terminfo.h - read a terminfo entry from the command line */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2002 Free Software Foundation, Inc. + * Copyright (C) 2002,2003 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ #ifndef GRUB_TERMCAP_HEADER #define GRUB_TERMCAP_HEADER 1 -#define TERMINFO_LEN 32 +#define TERMINFO_LEN 40 typedef struct terminfo {