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/flash.c | 2 +- src/main.c | 8 +++++--- src/main.h | 2 +- src/qmode.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/flash.c b/src/flash.c index 43c79bb..d1d7efd 100644 --- a/src/flash.c +++ b/src/flash.c @@ -74,7 +74,7 @@ void check_nolo_order() check_nolo_order_failed(); } -void flash_image(const char *filename, const char *piece, const char *version) +void flash_image(const char *filename, const char *piece, const char *device, const char *hwrevs, const char *version) { FILE *fd; int vlen = 0; 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