mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3 v3] menu: shell fix do_menu_select
@ 2010-09-17 13:45 Jean-Christophe PLAGNIOL-VILLARD
  2010-09-17 13:45 ` [PATCH 2/3 v3] menu: add auto select support Jean-Christophe PLAGNIOL-VILLARD
  2010-09-17 13:45 ` [PATCH 3/3 v3] Menu: add box style entry Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-17 13:45 UTC (permalink / raw)
  To: barebox

invert the error report

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

diff --git a/commands/menu.c b/commands/menu.c
index f734db3..7b8e8be 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -202,7 +202,7 @@ static int do_menu_select(struct cmd_menu *cm)
 		return -EINVAL;
 	}
 
-	if (!menu_set_selected(m, cm->num)) {
+	if (menu_set_selected(m, cm->num) < 0) {
 		eprintf("Entry '%d' not found\n", cm->num);
 		return -EINVAL;
 	}
-- 
1.7.1


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-17 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-17 13:45 [PATCH 1/3 v3] menu: shell fix do_menu_select Jean-Christophe PLAGNIOL-VILLARD
2010-09-17 13:45 ` [PATCH 2/3 v3] menu: add auto select support Jean-Christophe PLAGNIOL-VILLARD
2010-09-17 13:45 ` [PATCH 3/3 v3] Menu: add box style entry Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox