diff options
author | Simon Glass <sjg@chromium.org> | 2016-06-30 10:52:14 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-14 18:22:29 -0400 |
commit | 56d7ab74767c60c4ec48061864df0c421e4799e7 (patch) | |
tree | 56870ba61b51e06a02a814bb1393f2baa1c7dfbe /common/image.c | |
parent | 555f45d8f9168b09b406a241e7cee7980104d902 (diff) | |
download | u-boot-imx-56d7ab74767c60c4ec48061864df0c421e4799e7.zip u-boot-imx-56d7ab74767c60c4ec48061864df0c421e4799e7.tar.gz u-boot-imx-56d7ab74767c60c4ec48061864df0c421e4799e7.tar.bz2 |
image: Create a table of information for each category
Add a table that contains the category name, the number of items in each
category and a pointer to the table of items. This will allow us to use
generic code to deal with the categories.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/image.c b/common/image.c index 0be09e5..4e503b3 100644 --- a/common/image.c +++ b/common/image.c @@ -176,6 +176,19 @@ static const table_entry_t uimage_comp[] = { { -1, "", "", }, }; +struct table_info { + const char *desc; + int count; + const table_entry_t *table; +}; + +static const struct table_info table_info[IH_COUNT] = { + { "architecture", IH_ARCH_COUNT, uimage_arch }, + { "compression", IH_COMP_COUNT, uimage_comp }, + { "operating system", IH_OS_COUNT, uimage_os }, + { "image type", IH_TYPE_COUNT, uimage_type }, +}; + /*****************************************************************************/ /* Legacy format routines */ /*****************************************************************************/ |