From b1cfc3181bc83b43e07f3b801166c8c8181cecf8 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sat, 23 Jun 2012 13:05:46 +0200 Subject: Prepair flash_image for specifing device and hw revisions --- src/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4217c92..6f37334 100644 --- a/src/main.c +++ b/src/main.c @@ -146,9 +146,11 @@ int flash_callback(struct header_t *header) return 1; } - type = (char *)fpid_file(header->name); + type = header->type; + if (!type[0]) + type = (char *)fpid_file(header->name); printf("\nFlashing %s (%s)\n", header->name, type); - flash_image(header->name, type, NULL); + flash_image(header->name, type, header->device, header->hwrevs, header->version); return 0; } @@ -447,7 +449,7 @@ int main(int argc, char **argv) for(c=0;c