1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

programmer_table: convert entries to pointers

Allows us to move the individual entries into their respective driver files.

Change-Id: Ifbb0ee4db5a85b1cd2afeafe4dca838579f79878
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Thomas Heijligen
2021-03-31 19:09:44 +02:00
committed by Nico Huber
parent 9e09095877
commit dee884ebc5
7 changed files with 572 additions and 410 deletions

View File

@ -407,7 +407,7 @@ int main(int argc, char *argv[])
"for details.\n");
}
for (prog = 0; prog < PROGRAMMER_INVALID; prog++) {
name = programmer_table[prog].name;
name = programmer_table[prog]->name;
namelen = strlen(name);
if (strncmp(optarg, name, namelen) == 0) {
switch (optarg[namelen]) {
@ -545,7 +545,7 @@ int main(int argc, char *argv[])
/* We need to strdup here because we free(pparam) unconditionally later. */
pparam = strdup(CONFIG_DEFAULT_PROGRAMMER_ARGS);
msg_pinfo("Using default programmer \"%s\" with arguments \"%s\".\n",
programmer_table[CONFIG_DEFAULT_PROGRAMMER].name, pparam);
programmer_table[CONFIG_DEFAULT_PROGRAMMER]->name, pparam);
} else {
msg_perr("Please select a programmer with the --programmer parameter.\n"
#if CONFIG_INTERNAL == 1