Prepair piece structure for device & hw revisions

This commit is contained in:
Pali Rohár committed 2012-06-23 13:02:52 +02:00
1 parent dc910a5317
commit 1ddf269c69
2 files changed
+9 -3

No files matched your search

+3 -1
View File
@@ -59,7 +59,9 @@ extern int verbose;
struct piece_t {
char *name;
char *type;
char *vers;
char *device;
char *hwrevs;
char *version;
};
enum flash_mode {
+6 -2
View File
@@ -52,7 +52,9 @@ int add_piece(char *piece)
pcs[pcs_n].name = strdup(file);
pcs[pcs_n].type = strdup(piece);
pcs[pcs_n].vers = NULL; // TODO version string not yet supported
pcs[pcs_n].device = NULL;
pcs[pcs_n].hwrevs = NULL;
pcs[pcs_n].version = NULL; // TODO version string not yet supported
} else {
/*/ autodetect piece type */
pcs[pcs_n].type = (char *)fpid_file(piece);
@@ -66,7 +68,9 @@ int add_piece(char *piece)
} else {
pcs[pcs_n].name = strdup(piece);
pcs[pcs_n].type = strdup(pcs[pcs_n].type);
pcs[pcs_n].vers = NULL;
pcs[pcs_n].device = NULL;
pcs[pcs_n].hwrevs = NULL;
pcs[pcs_n].version = NULL;
}
}