[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 <m8@semihalf.com>
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 @@
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 @@
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__ */