summaryrefslogtreecommitdiffstats
path: root/commands/menu.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-09-17 15:45:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-20 08:58:52 +0200
commit3212e8462e876bd47fa14a0ba9fd455f37458d52 (patch)
tree21f952cb04e9e7994e7249d53482471cf6275be8 /commands/menu.c
parente85c6bb0a7d20e74ec47970647ae696df92d4c24 (diff)
downloadbarebox-3212e8462e876bd47fa14a0ba9fd455f37458d52.tar.gz
menu: shell fix do_menu_select
invert the error report Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/menu.c')
-rw-r--r--commands/menu.c2
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;
}