]> git.proxmox.com Git - qemu.git/commitdiff
Fix regression in option parsing
authorAnthony Liguori <aliguori@us.ibm.com>
Wed, 27 Jan 2010 16:46:00 +0000 (10:46 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 27 Jan 2010 16:50:14 +0000 (10:50 -0600)
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 <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c

diff --git a/vl.c b/vl.c
index 1cd355c6981598c887708a10e3a30d71fdaf473d..6f1e1ab71fdc0e8db91e190d6b21c22d835cd0bc 100644 (file)
--- 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;