The code to validate the usb id and product name had some debug hacks
left enabled, which caused it to fail. The short -f version of the
force flag was also not getting parsed correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
int has_flash_size = 0;
int force = 0;
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;
switch (c) {
case 'T':
tty = optarg;
}
new_len = ucs2len(new_product);
old_len = ucs2len(old_product);
}
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 ");
fprintf(stderr, "USB product mismatch (device is ");
putucs2str(new_product, stderr);
fprintf(stderr, ", image is ");
if (!ao_editaltos(load, serial, cal))
done(cc, 1);
}
if (!ao_editaltos(load, serial, cal))
done(cc, 1);
}
/* And flash the resulting image to the device
*/
/* And flash the resulting image to the device
*/