Fix qemu-img argument handling
PATCH 1/1 Fix qemu-img argument handling
Hi,
qemu-img doesn't work on MS Windows, when compiled with MinGW Runtime package >= 3.15
According to http://sourceforge.net/tracker/index.php?func=detail&aid=2222263&group_id=2435&atid=102435 , qemu-img shouldn't skip the first argument (command name) by doing optind++.
Attached patch fixes the problems, and repairs qemu-img parsing with MinGW Runtime package >= 3.15
Hervé
qemu-img.c +2 -1
@@ -865,7 +865,8 @@if (argc <2 )help (); cmd = argv[1 ]; - optind++; + argc--; + argv++;if (!strcmp (cmd,"create" )) {img_create (argc, argv); }else if (!strcmp (cmd,"commit" )) {
Quoted 4 lines · Hervé Poussineau
According to
http://sourceforge.net/tracker/index.php?func=detail&aid=2222263&group_id=2435&atid=102435
, qemu-img shouldn't skip the first argument (command name) by doing optind++.
Oh, that was me in November. ;-)
Quoted 2 lines
Attached patch fixes the problems, and repairs qemu-img parsing with MinGW Runtime package >= 3.15
Thanks for this patch! :-)
Robert Riebisch
Signature · 2 lines
BTTR Software http://www.bttr-software.de/
Aurelien Jarno
AppliedQuoted 9 lines · Hervé Poussineau
Hi,
qemu-img doesn't work on MS Windows, when compiled with MinGW Runtime package >= 3.15
According to
http://sourceforge.net/tracker/index.php?func=detail&aid=2222263&group_id=2435&atid=102435
, qemu-img shouldn't skip the first argument (command name) by doing optind++.
Quoted 4 lines
Attached patch fixes the problems, and repairs qemu-img parsing with MinGW Runtime package >= 3.15
Signed-off-by Hervé Poussineau <[email protected]>
Thanks, applied.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 2 lines · Hervé Poussineau
qemu-img doesn't work on MS Windows, when compiled with MinGW Runtime package >= 3.15
Keith Marshall of MinGW submitted a patch to getopt() behaviour:
https://sourceforge.net/tracker/?func=detail&atid=352435&aid=2222263&group_id=2435
Robert Riebisch
Signature · 2 lines
BTTR Software http://www.bttr-software.de/
Quoted 8 lines · Hervé Poussineau
Hi,
qemu-img doesn't work on MS Windows, when compiled with MinGW Runtime package >= 3.15
According to http://sourceforge.net/tracker/index.php?func=detail&aid=2222263&group_id=2435&atid=102435 , qemu-img shouldn't skip the first argument (command name) by doing optind++.Attached patch fixes the problems, and repairs qemu-img parsing with MinGW Runtime package >= 3.15
Signed-off-by Hervé Poussineau <[email protected]>
This resend either inlining the patch or attaching it with text/plan.
Regards,
Anthony Liguori
Quoted 1 line
Hervé