summaryrefslogtreecommitdiffstats
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
parente85c6bb0a7d20e74ec47970647ae696df92d4c24 (diff)
downloadbarebox-3212e8462e876bd47fa14a0ba9fd455f37458d52.tar.gz
barebox-3212e8462e876bd47fa14a0ba9fd455f37458d52.tar.xz
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>
-rw-r--r--commands/menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/menu.c b/commands/menu.c
index f734db3874..7b8e8bec58 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;
}