[PATCH 1/2] menu: shell fix do_menu_select
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Sep 6 08:07:48 EDT 2010
invert the error report
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
commands/menu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/commands/menu.c b/commands/menu.c
index ab35cf9..2c9ddc3 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -203,7 +203,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
More information about the barebox
mailing list