mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] menu: add support to do not display the entry number
Date: Fri, 1 Jun 2012 08:34:36 +0200	[thread overview]
Message-ID: <20120601063436.GG30400@pengutronix.de> (raw)
In-Reply-To: <1338127033-10348-1-git-send-email-plagnioj@jcrosoft.com>

On Sun, May 27, 2012 at 03:57:12PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> @@ -416,6 +421,7 @@ static const __maybe_unused char cmd_menu_help[] =
>  "  -m  menu\n"
>  "  -l  list\n"
>  "  -s  show\n"
> +"  -N  do not display number\n"

'do not number menu entries'?

Sascha

>  #if defined(CONFIG_CMD_MENU_MANAGEMENT)
>  "Advanced\n"
>  "  -e  menu entry\n"
> diff --git a/common/menu.c b/common/menu.c
> index 070170e..12812a5 100644
> --- a/common/menu.c
> +++ b/common/menu.c
> @@ -178,7 +178,8 @@ static void print_menu_entry(struct menu *m, struct menu_entry *me,
>  		process_escape_sequence(me->display, m->display_buffer,
>  					m->display_buffer_size);
>  
> -	printf(" %d: ", me->num);
> +	if (m->display_num)
> +		printf(" %d: ", me->num);
>  	if (selected)
>  		puts("\e[7m");
>  	if (IS_ENABLED(CONFIG_SHELL_HUSH))
> diff --git a/include/menu.h b/include/menu.h
> index 74abcfb..5a7e8ca 100644
> --- a/include/menu.h
> +++ b/include/menu.h
> @@ -56,6 +56,8 @@ struct menu {
>  	int auto_select;
>  	char *auto_display;
>  
> +	int display_num;
> +
>  	struct list_head list;
>  	struct list_head entries;
>  
> -- 
> 1.7.9.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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

      parent reply	other threads:[~2012-06-01  6:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-27 13:57 Jean-Christophe PLAGNIOL-VILLARD
2012-05-27 13:57 ` [PATCH 2/2] menu: add support for disable entry Jean-Christophe PLAGNIOL-VILLARD
2012-05-29  8:35   ` Sascha Hauer
2012-05-29 10:35     ` Jean-Christophe PLAGNIOL-VILLARD
2012-06-01  6:34 ` Sascha Hauer [this message]

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=20120601063436.GG30400@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /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