From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 31.mail-out.ovh.net ([213.186.62.10]) by bombadil.infradead.org with smtp (Exim 4.72 #1 (Red Hat Linux)) id 1OwbHP-0007Aa-IW for barebox@lists.infradead.org; Fri, 17 Sep 2010 13:47:08 +0000 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 17 Sep 2010 15:45:52 +0200 Message-Id: <1284731154-20167-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/3 v3] menu: shell fix do_menu_select To: barebox@lists.infradead.org invert the error report Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- 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