mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@googlemail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] sandbox: add missed case statement
Date: Tue, 11 Sep 2012 07:30:45 +0200	[thread overview]
Message-ID: <1347341445-2476-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1347341445-2476-1-git-send-email-alex.aring@gmail.com>

Add missed case statement to ignore 'i' parameter
in first getopt loop.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 arch/sandbox/os/common.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c
index e296574..d2aea38 100644
--- a/arch/sandbox/os/common.c
+++ b/arch/sandbox/os/common.c
@@ -306,6 +306,8 @@ int main(int argc, char *argv[])
 		case 'm':
 			malloc_size = strtoul(optarg, NULL, 0);
 			break;
+		case 'i':
+			break;
 		case 'e':
 			sprintf(str, "env%d", envno);
 			ret = add_image(optarg, str);
@@ -343,7 +345,11 @@ int main(int argc, char *argv[])
 	}
 	mem_malloc_init(ram, ram + malloc_size - 1);
 
-	/* reset getopt */
+	/*
+	 * Reset getopt.
+	 * We need to run a second getopt to count -i parameters.
+	 * This is for /dev/fd# devices.
+	 */
 	optind = 1;
 
 	while (1) {
-- 
1.7.12


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

  parent reply	other threads:[~2012-09-11  5:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  5:30 [PATCH 1/3] sandbox-unaligned: better usement of ifdef Alexander Aring
2012-09-11  5:30 ` [PATCH 2/3] sandbox: fix posix_types Alexander Aring
2012-09-11  5:30 ` Alexander Aring [this message]
2012-09-11  7:51 ` [PATCH 1/3] sandbox-unaligned: better usement of ifdef Sascha Hauer

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=1347341445-2476-3-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@googlemail.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