From patchwork Wed Jan 27 16:47:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix regression in option parsing Date: Wed, 27 Jan 2010 06:47:52 -0000 From: Anthony Liguori X-Patchwork-Id: 43825 Message-Id: <1264610872-11802-1-git-send-email-aliguori@us.ibm.com> To: qemu-devel@nongnu.org Cc: Amit Shah , Anthony Liguori Commit ec229bbe7 broke invocation without a specific -hda. IOW, qemu foo.img. The lack of an optind update caused an infinite loop. Reported-by: Amit Shah Signed-off-by: Anthony Liguori --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 1cd355c..6f1e1ab 100644 --- a/vl.c +++ b/vl.c @@ -4819,6 +4819,7 @@ int main(int argc, char **argv, char **envp) while (optind < argc) { if (argv[optind][0] != '-') { /* disk image */ + optind++; continue; } else { const QEMUOption *popt;