summaryrefslogtreecommitdiff
path: root/boot/image.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-09-07 05:26:52 +0300
committerTom Rini <trini@konsulko.com>2022-09-29 23:07:57 +0300
commitf3543e69442ca393e52df253d9c5d45bc189d471 (patch)
tree99423df56b15a01188099161332c6c8aed301972 /boot/image.c
parentda79b2f25e5352a8e09b96ecef56df009f03c0b5 (diff)
downloadu-boot-f3543e69442ca393e52df253d9c5d45bc189d471.tar.xz
treewide: Drop image_header_t typedef
This is not needed and we should avoid typedefs. Use the struct instead and rename it to indicate that it really is a legacy struct. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/image.c')
-rw-r--r--boot/image.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/boot/image.c b/boot/image.c
index a0d0cc2403..9f95b3260a 100644
--- a/boot/image.c
+++ b/boot/image.c
@@ -220,11 +220,11 @@ static const struct table_info table_info[IH_COUNT] = {
/*****************************************************************************/
/* Legacy format routines */
/*****************************************************************************/
-int image_check_hcrc(const image_header_t *hdr)
+int image_check_hcrc(const struct legacy_img_hdr *hdr)
{
ulong hcrc;
ulong len = image_get_header_size();
- image_header_t header;
+ struct legacy_img_hdr header;
/* Copy header so we can blank CRC field for re-calculation */
memmove(&header, (char *)hdr, image_get_header_size());
@@ -235,7 +235,7 @@ int image_check_hcrc(const image_header_t *hdr)
return (hcrc == image_get_hcrc(hdr));
}
-int image_check_dcrc(const image_header_t *hdr)
+int image_check_dcrc(const struct legacy_img_hdr *hdr)
{
ulong data = image_get_data(hdr);
ulong len = image_get_data_size(hdr);
@@ -257,7 +257,7 @@ int image_check_dcrc(const image_header_t *hdr)
* returns:
* number of components
*/
-ulong image_multi_count(const image_header_t *hdr)
+ulong image_multi_count(const struct legacy_img_hdr *hdr)
{
ulong i, count = 0;
uint32_t *size;
@@ -290,7 +290,7 @@ ulong image_multi_count(const image_header_t *hdr)
* data address and size of the component, if idx is valid
* 0 in data and len, if idx is out of range
*/
-void image_multi_getimg(const image_header_t *hdr, ulong idx,
+void image_multi_getimg(const struct legacy_img_hdr *hdr, ulong idx,
ulong *data, ulong *len)
{
int i;
@@ -326,7 +326,7 @@ void image_multi_getimg(const image_header_t *hdr, ulong idx,
}
}
-static void image_print_type(const image_header_t *hdr)
+static void image_print_type(const struct legacy_img_hdr *hdr)
{
const char __maybe_unused *os, *arch, *type, *comp;
@@ -352,7 +352,7 @@ static void image_print_type(const image_header_t *hdr)
*/
void image_print_contents(const void *ptr)
{
- const image_header_t *hdr = (const image_header_t *)ptr;
+ const struct legacy_img_hdr *hdr = (const struct legacy_img_hdr *)ptr;
const char __maybe_unused *p;
p = IMAGE_INDENT_STRING;