mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alan Ott <alan@signal11.us>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] common: Make MENU select PROCESS_ESCAPE_SEQUENCE if HUSH_SHELL is selected
Date: Tue, 22 May 2012 21:04:34 +0200	[thread overview]
Message-ID: <20120522190434.GO30400@pengutronix.de> (raw)
In-Reply-To: <4FBBAC03.1000006@signal11.us>

On Tue, May 22, 2012 at 11:08:51AM -0400, Alan Ott wrote:
> On 05/22/2012 05:27 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 23:32 Mon 21 May     , Alan Ott wrote:
> >> print_menu_entry() in common/menu.c calls on process_escape_sequence() when
> >> HUSH_SHELL is selected.
> >>
> >> Signed-off-by: Alan Ott <alan@signal11.us>
> >> ---
> >>  common/Kconfig |    1 +
> >>  1 files changed, 1 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/common/Kconfig b/common/Kconfig
> >> index 73d620a..7cd0666 100644
> >> --- a/common/Kconfig
> >> +++ b/common/Kconfig
> >> @@ -342,6 +342,7 @@ config AUTO_COMPLETE
> >>  config MENU
> >>  	bool
> >>  	prompt "Menu Framework"
> >> +	select PROCESS_ESCAPE_SEQUENCE if SHELL_HUSH
> >>  	help
> >>  	   a menu framework that allow us to create list menu to simplify
> >>  	   barebox and make it more user-frendly
> > you miss the point of the code
> >
> > the PROCESS_ESCAPE_SEQUENCE is optionnal and need to stay optionnal
> > evenif Hush is enable
> 
> It's required if both HUSH_SHELL _and_ MENU are selected. The code in
> common/menu.c looks like this:
> 
>                 if (IS_ENABLED(CONFIG_SHELL_HUSH)) {
>                         process_escape_sequence(m->display,
> m->display_buffer,
>                                                 m->display_buffer_size);
>                         puts(m->display_buffer);
>                 } else {
>                         puts(m->display);
>                 }

From what I see your v2 patch is correct. Another possibility would
maybe be replacing the if above with
IS_ENABLED(CONFIG_PROCESS_ESCAPE_SEQUENCE), but I don't know if that
would produce correct code.

Jean-Christophe?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-05-22 19:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 15:53 [PATCH] common: Make MENU depend on PROCESS_ESCAPE_SEQUENCE Alan Ott
2012-05-21 20:06 ` Sascha Hauer
2012-05-22  2:40   ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-22  3:35     ` Alan Ott
2012-05-21 22:44 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-22  2:22   ` [PATCH] common: Make HUSH_SHELL select PROCESS_ESCAPE_SEQUENCE Alan Ott
2012-05-22  3:32     ` [PATCH v2] common: Make MENU select PROCESS_ESCAPE_SEQUENCE if HUSH_SHELL is selected Alan Ott
2012-05-22  9:27       ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-22 15:08         ` Alan Ott
2012-05-22 19:04           ` Sascha Hauer [this message]
2012-05-22  2:24   ` [PATCH] common: Make MENU depend on PROCESS_ESCAPE_SEQUENCE Alan Ott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120522190434.GO30400@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=alan@signal11.us \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox