mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] menu: shell fix do_menu_select
Date: Mon,  6 Sep 2010 14:07:48 +0200	[thread overview]
Message-ID: <1283774869-6086-1-git-send-email-plagnioj@jcrosoft.com> (raw)

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 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


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

             reply	other threads:[~2010-09-06 12:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 12:07 Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-09-06 12:07 ` [PATCH 2/2] menu: add auto select support Jean-Christophe PLAGNIOL-VILLARD
2010-09-06 14:44   ` [PATCH 2/2 v2] " Jean-Christophe PLAGNIOL-VILLARD
2010-09-16 15:06   ` [PATCH 2/2] " Sascha Hauer
2010-09-16 15:57     ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283774869-6086-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox