diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-22 22:55:50 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-03-14 19:18:28 -0400 |
commit | cef2e51489567260857984c3e95d98eb03c97fe9 (patch) | |
tree | 7fe3c1d3f1d436477a0bb5cf1c5781fb7ca87c12 /include | |
parent | 3837ce65bd57991ebd7f8235db4040596d3125a4 (diff) | |
download | u-boot-imx-cef2e51489567260857984c3e95d98eb03c97fe9.zip u-boot-imx-cef2e51489567260857984c3e95d98eb03c97fe9.tar.gz u-boot-imx-cef2e51489567260857984c3e95d98eb03c97fe9.tar.bz2 |
image: Add functions to obtain short names
Sometimes it is useful to obtain the short name for an Operating System,
architecture or compression mechanism. Provide functions for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/image.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h index b2fb3d9..92c7884 100644 --- a/include/image.h +++ b/include/image.h @@ -413,7 +413,25 @@ int get_table_entry_id(const table_entry_t *table, char *get_table_entry_name(const table_entry_t *table, char *msg, int id); const char *genimg_get_os_name(uint8_t os); + +/** + * genimg_get_os_short_name() - get the short name for an OS + * + * @param os OS (IH_OS_...) + * @return OS short name, or "unknown" if unknown + */ +const char *genimg_get_os_short_name(uint8_t comp); + const char *genimg_get_arch_name(uint8_t arch); + +/** + * genimg_get_arch_short_name() - get the short name for an architecture + * + * @param arch Architecture type (IH_ARCH_...) + * @return architecture short name, or "unknown" if unknown + */ +const char *genimg_get_arch_short_name(uint8_t arch); + const char *genimg_get_type_name(uint8_t type); /** @@ -425,6 +443,15 @@ const char *genimg_get_type_name(uint8_t type); const char *genimg_get_type_short_name(uint8_t type); const char *genimg_get_comp_name(uint8_t comp); + +/** + * genimg_get_comp_short_name() - get the short name for a compression method + * + * @param comp compression method (IH_COMP_...) + * @return compression method short name, or "unknown" if unknown + */ +const char *genimg_get_comp_short_name(uint8_t comp); + int genimg_get_os_id(const char *name); int genimg_get_arch_id(const char *name); int genimg_get_type_id(const char *name); |