summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-06-23 13:05:46 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-06-23 13:05:46 +0200
commitb1cfc3181bc83b43e07f3b801166c8c8181cecf8 (patch)
tree6fa045db48f7aa8d9b27f464bd9c4b984df57001 /src/main.c
parent1ddf269c699c4028d4f5ae580b22cad0dd62d274 (diff)
download0xFFFF-b1cfc3181bc83b43e07f3b801166c8c8181cecf8.tar.bz2
Prepair flash_image for specifing device and hw revisions
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
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<pcs_n;c++) {
printf("Flashing %s (%s)\n", pcs[c].type, pcs[c].name);
- flash_image(pcs[c].name, pcs[c].type, pcs[c].vers);
+ flash_image(pcs[c].name, pcs[c].type, pcs[c].device, pcs[c].hwrevs, pcs[c].version);
}
}