mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/6] menu: enable the fancy color support only if HUSH is enabled
Date: Sat, 14 Apr 2012 18:02:18 +0200	[thread overview]
Message-ID: <1334419343-1121-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20120414155623.GA30672@game.jcrosoft.org>

So we can use the menu for the xloader too.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/menu.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/common/menu.c b/common/menu.c
index 50af36e..83821ec 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -174,12 +174,17 @@ static void print_menu_entry(struct menu *m, struct menu_entry *me,
 		puts("   ");
 	}
 
-	process_escape_sequence(me->display, m->display_buffer,
-				m->display_buffer_size);
+	if (IS_ENABLED(CONFIG_SHELL_HUSH))
+		process_escape_sequence(me->display, m->display_buffer,
+					m->display_buffer_size);
+
 	printf(" %d: ", me->num);
 	if (selected)
 		puts("\e[7m");
-	puts(m->display_buffer);
+	if (IS_ENABLED(CONFIG_SHELL_HUSH))
+		puts(m->display_buffer);
+	else
+		puts(me->display);
 
 	if (selected)
 		puts("\e[m");
@@ -236,9 +241,13 @@ static void print_menu(struct menu *m)
 	clear();
 	gotoXY(1, 2);
 	if(m->display) {
-		process_escape_sequence(m->display, m->display_buffer,
-					m->display_buffer_size);
-		puts(m->display_buffer);
+		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);
+		}
 	} else {
 		puts("Menu : ");
 		puts(m->name);
-- 
1.7.9.1


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

  reply	other threads:[~2012-04-14 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14 15:56 [PATCH 0/6] some fixes Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 16:02 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-04-14 16:02 ` [PATCH 2/6] at91sam9263ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 16:02 ` [PATCH 3/6] defaultenv/update: add oftree support Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 16:02 ` [PATCH 4/6] net: use net_alloc_packet to allocate packet Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 16:02 ` [PATCH 5/6] mx53/loco: udpate defconfig with USB host Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 16:02 ` [PATCH 6/6] arm: bootm: zImage: add error message when can not request the memory Jean-Christophe PLAGNIOL-VILLARD
2012-04-15 16:30   ` Sascha Hauer

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=1334419343-1121-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --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