Commit e388818682ebce3ae8132c1b8ed2089d6c8ec07c

Authored by bellard
1 parent 02d2c54c

BSD getopt fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1103 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 4 deletions
qemu-img.c
... ... @@ -333,7 +333,6 @@ static int img_create(int argc, char **argv)
333 333 break;
334 334 }
335 335 }
336   - optind++;
337 336 if (optind >= argc)
338 337 help();
339 338 filename = argv[optind++];
... ... @@ -403,7 +402,6 @@ static int img_commit(int argc, char **argv)
403 402 break;
404 403 }
405 404 }
406   - optind++;
407 405 if (optind >= argc)
408 406 help();
409 407 filename = argv[optind++];
... ... @@ -511,7 +509,6 @@ static int img_convert(int argc, char **argv)
511 509 break;
512 510 }
513 511 }
514   - optind++;
515 512 if (optind >= argc)
516 513 help();
517 514 filename = argv[optind++];
... ... @@ -639,7 +636,6 @@ static int img_info(int argc, char **argv)
639 636 break;
640 637 }
641 638 }
642   - optind++;
643 639 if (optind >= argc)
644 640 help();
645 641 filename = argv[optind++];
... ... @@ -686,6 +682,7 @@ int main(int argc, char **argv)
686 682 if (argc < 2)
687 683 help();
688 684 cmd = argv[1];
  685 + optind++;
689 686 if (!strcmp(cmd, "create")) {
690 687 img_create(argc, argv);
691 688 } else if (!strcmp(cmd, "commit")) {
... ...