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>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/52945
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/cli_classic.c b/cli_classic.c
index ea25d19..89a6c83 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -307,7 +307,7 @@
"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]) {
@@ -441,7 +441,7 @@
/* 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