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 <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
b4bf0a9a69
commit
28e68d68b0
1
vl.c
1
vl.c
@ -4819,6 +4819,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
if (argv[optind][0] != '-') {
|
if (argv[optind][0] != '-') {
|
||||||
/* disk image */
|
/* disk image */
|
||||||
|
optind++;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
const QEMUOption *popt;
|
const QEMUOption *popt;
|
||||||
|
Loading…
Reference in New Issue
Block a user