From 42b73e8ee00d48004791dea64b8093fb974c57e1 Mon Sep 17 00:00:00 2001 From: Marian Balakowicz Date: Thu, 31 Jan 2008 13:20:07 +0100 Subject: [new uImage] Factor out common routines for getting os/arch/type/comp names Move numeric-id to name translation for image os/arch/type/comp header fields to a helper routines: image_get_os_name(), image_get_arch_name(), image_get_type_name(), image_get_comp_name(). Signed-off-by: Marian Balakowicz --- include/image.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/image.h') diff --git a/include/image.h b/include/image.h index c605d66..9ac25c9 100644 --- a/include/image.h +++ b/include/image.h @@ -290,6 +290,10 @@ static inline int image_check_os (image_header_t *hdr, uint8_t os) return (image_get_os (hdr) == os); } +ulong image_multi_count (image_header_t *hdr); +void image_multi_getimg (image_header_t *hdr, ulong idx, + ulong *data, ulong *len); + #ifndef USE_HOSTCC static inline int image_check_target_arch (image_header_t *hdr) { @@ -322,10 +326,11 @@ static inline int image_check_target_arch (image_header_t *hdr) return 1; } -#endif -ulong image_multi_count (image_header_t *hdr); -void image_multi_getimg (image_header_t *hdr, ulong idx, - ulong *data, ulong *len); +const char* image_get_os_name (uint8_t os); +const char* image_get_arch_name (uint8_t arch); +const char* image_get_type_name (uint8_t type); +const char* image_get_comp_name (uint8_t comp); +#endif /* USE_HOSTCCa */ #endif /* __IMAGE_H__ */ -- cgit v1.1