diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-09 16:44:06 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-09 16:44:06 +0000 |
commit | e388818682ebce3ae8132c1b8ed2089d6c8ec07c (patch) | |
tree | d058689d22b1158259b90bd2b2f09b056b4ae92a /qemu-img.c | |
parent | 02d2c54cd3e1a65ce4eaf1555b7f73d0a50eaec4 (diff) |
BSD getopt fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1103 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c index 196e0287f2..132428cf6d 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -333,7 +333,6 @@ static int img_create(int argc, char **argv) break; } } - optind++; if (optind >= argc) help(); filename = argv[optind++]; @@ -403,7 +402,6 @@ static int img_commit(int argc, char **argv) break; } } - optind++; if (optind >= argc) help(); filename = argv[optind++]; @@ -511,7 +509,6 @@ static int img_convert(int argc, char **argv) break; } } - optind++; if (optind >= argc) help(); filename = argv[optind++]; @@ -639,7 +636,6 @@ static int img_info(int argc, char **argv) break; } } - optind++; if (optind >= argc) help(); filename = argv[optind++]; @@ -686,6 +682,7 @@ int main(int argc, char **argv) if (argc < 2) help(); cmd = argv[1]; + optind++; if (!strcmp(cmd, "create")) { img_create(argc, argv); } else if (!strcmp(cmd, "commit")) { |