X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Fao-usbload%2Fao-usbload.c;h=31ee138a3679584779eeda813997667b8ba3ffd9;hb=71a51b4857f5bd49c0cba2578fb54b1d5b2c738b;hp=d0579de1c4a5d4229f0aab1f9ce71370aec0a4e2;hpb=462039c769f2db9328b04759807c30691f2b96c2;p=fw%2Faltos diff --git a/ao-tools/ao-usbload/ao-usbload.c b/ao-tools/ao-usbload/ao-usbload.c index d0579de1..31ee138a 100644 --- a/ao-tools/ao-usbload/ao-usbload.c +++ b/ao-tools/ao-usbload/ao-usbload.c @@ -189,7 +189,7 @@ main (int argc, char **argv) int has_flash_size = 0; int force = 0; - while ((c = getopt_long(argc, argv, "wrT:D:c:s:v:", options, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "wrfT:D:c:s:v:", options, NULL)) != -1) { switch (c) { case 'T': tty = optarg; @@ -400,11 +400,11 @@ main (int argc, char **argv) } new_len = ucs2len(new_product); old_len = ucs2len(old_product); - if (1 || new_len != old_len || memcmp(new_product, old_product, new_len * 2) != 0) { + if (new_len != old_len || memcmp(new_product, old_product, new_len * 2) != 0) { fprintf(stderr, "USB product mismatch (device is "); - putucs2str(new_product, stderr); - fprintf(stderr, ", image is "); putucs2str(old_product, stderr); + fprintf(stderr, ", image is "); + putucs2str(new_product, stderr); fprintf(stderr, ")\n"); done(cc, 1); } @@ -413,7 +413,6 @@ main (int argc, char **argv) if (!ao_editaltos(load, serial, cal)) done(cc, 1); } - done(cc, 0); /* And flash the resulting image to the device */