From: Anthony Liguori Date: Wed, 27 Jan 2010 16:46:00 +0000 (-0600) Subject: Fix regression in option parsing X-Git-Tag: pull-nvme-20200902~12853 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=28e68d68b0c88cb5eb0d9fa6c30914a3cdddebfc;p=qemu-nvme.git Fix regression in option parsing 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 --- diff --git a/vl.c b/vl.c index 1cd355c698..6f1e1ab71f 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;