summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@googlemail.com>2012-09-11 07:30:45 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-11 09:50:28 +0200
commit910d0132905ca3ff12dddbcbceb94b4b5112ab5c (patch)
tree0c2348a481e92d3541b24ed7e8e9fa24dad5d65b /arch/sandbox
parent650ef3853994b49182d0ee64b445ef7866fabe86 (diff)
downloadbarebox-910d0132905ca3ff12dddbcbceb94b4b5112ab5c.tar.gz
sandbox: add missed case statement
Add missed case statement to ignore 'i' parameter in first getopt loop. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/os/common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c
index e296574c93..d2aea383fb 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) {