X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Fao-usbload%2Fao-usbload.c;h=6da57bace36b6b53ad6ff51bf0b078373311ebf9;hb=3703aef1b8b043697e8b99df24b987ba696909bc;hp=758eb6961ca21a2acd5d525bf98109ce1c103a9d;hpb=3ea30c1909b3ae23918ea6d0a53d2c4065b08763;p=fw%2Faltos diff --git a/ao-tools/ao-usbload/ao-usbload.c b/ao-tools/ao-usbload/ao-usbload.c index 758eb696..6da57bac 100644 --- a/ao-tools/ao-usbload/ao-usbload.c +++ b/ao-tools/ao-usbload/ao-usbload.c @@ -96,7 +96,7 @@ static void usage(char *program) exit(1); } -void +static void done(struct cc_usb *cc, int code) { /* cc_usb_printf(cc, "a\n"); */ @@ -124,7 +124,7 @@ ucs2len(uint16_t *ucs2) return len; } -int +static int putucs4(uint32_t c, FILE *file) { char d; @@ -162,23 +162,14 @@ main (int argc, char **argv) { char *device = NULL; char *filename; - Elf *e; int raw = 0; char *serial_end; unsigned int serial = 0; - char *serial_ucs2; - int serial_ucs2_len; - char serial_int[2]; - unsigned int s; - int i; - int string_num; uint32_t cal = 0; - char cal_int[4]; char *cal_end; int c; int was_flashed = 0; struct ao_hex_image *load; - int tries; struct cc_usb *cc = NULL; char *tty = NULL; int success; @@ -402,9 +393,9 @@ main (int argc, char **argv) old_len = ucs2len(old_product); 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); }