diff options
-rw-r--r-- | flashrom.c | 4 | ||||
-rw-r--r-- | programmer.h | 1 |
2 files changed, 4 insertions, 1 deletions
@@ -534,6 +534,8 @@ const struct programmer_entry programmer_table[] = { #endif }; +const size_t programmer_table_size = ARRAY_SIZE(programmer_table); + #define SHUTDOWN_MAXFN 32 static int shutdown_fn_count = 0; /** @private */ @@ -2189,7 +2191,7 @@ int selfcheck(void) /* Safety check. Instead of aborting after the first error, check * if more errors exist. */ - if (ARRAY_SIZE(programmer_table) != PROGRAMMER_INVALID) { + if (programmer_table_size != PROGRAMMER_INVALID) { msg_gerr("Programmer table miscompilation!\n"); ret = 1; } diff --git a/programmer.h b/programmer.h index a0ff6bc6..945d0a7f 100644 --- a/programmer.h +++ b/programmer.h @@ -176,6 +176,7 @@ struct programmer_entry { }; extern const struct programmer_entry programmer_table[]; +extern const size_t programmer_table_size; int programmer_init(enum programmer prog, const char *param); int programmer_shutdown(void); |