]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Fix argument check for the case of both and not fast
authorhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 1 Sep 2009 04:59:52 +0000 (04:59 +0000)
committerhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 1 Sep 2009 04:59:52 +0000 (04:59 +0000)
linux/flasher.c

index beea754eefe348ca52be9764585f70c4981a700c..a89435132528838f23a5280149d4efed96e51535 100644 (file)
@@ -120,7 +120,7 @@ int main(int argc, char **argv) {
        BOOL fastflash = 0, flashboth = 0;
        UsbCommand c;
 
-       if (argc != 3 && ! ((argc == 4 && *argv[3] == 'f') || (argc == 5 && *argv[4] == 'f'))) {
+       if (argc != 3 && ! ((argc == 4 && (*argv[3] == 'f' || strcmp(argv[1], "both") == 0) ) || (argc == 5 && *argv[4] == 'f'))) {
                fprintf(stderr,"Usage: %s {bootrom|os|fpga} image.s19 [f]ast\n", argv[0]);
                fprintf(stderr,"       %s {both} osimage.s19 fpgaimage.s19 [f]ast\n", argv[0]);
                exit(EXIT_FAILURE);
Impressum, Datenschutz