[U-Boot-Users] [PATCH 02/13] [new uImage] Define a API for image handling operations

Wolfgang Denk wd at denx.de
Sat Jan 12 02:04:44 CET 2008


In message <20080111142800.8025.66590.stgit at hekate.izotz.org> you wrote:
> - Add inline helper macros for basic header processing
> - Move common non inline code common/image.c
> - Replace direct header access with the API routines
> - Rename IH_CPU_* to IH_ARCH_*

Please review your patches and make sure to keep  the  original  for-
matting of the U-Boot output; for example:

--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
...
-			if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
-				puts ("   Bad Data CRC\n");
-			}
-			puts ("OK\n");
+			if (!image_check_dcrc(hdr))
+				puts ("Bad Data CRC\n");

This is IMO a change to the worse. Please fix.


--- a/include/image.h
+++ b/include/image.h
...
+char *strncpy(char *dest, const char *src, size_t count);

Please don't do this! Include the appropriate header file instead.


+static inline int image_check_target_arch(image_header_t *hdr)

Theoretical thought: could it  ever  happen  that  we  might  have  a
multi-architecture image?




Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q:  What is "SMOORPLAY"?
A:  It's what SMURFS do before they SMUCK, of course!




More information about the U-Boot mailing list