Wolfgang Denk wrote:
> In message <[EMAIL PROTECTED]> you wrote:
>> As suggested by Wolfgang Denk:
>> - remove wrappers for image printing function
>> - merge getenv_verify and getenv_autostart into one parametrized function
> ...
>> -    image_print_contents (hdr);
>> +    image_print_contents (hdr, "   ");
> 
> Now we have some 20+ calls of
> 
>       image_print_contents (hdr, "   ");
> 
> plus two calls of
> 
>       image_print_contents (hdr, "");
> 
> Maybe there is some clever way to get rid of this second argument?

We could use the following two facts:
1. the image contents are printed with only two indentations: 0 or 3 spaces,
2. indentation with 3 spaces is used in U-Boot, indentation with 0
spaces is used in mkimage.

With the following change we could then drop the second argument altogether:

--- a/common/image.c
+++ b/common/image.c
@@ -301,8 +301,16 @@ static void image_print_type (image_header_t *hdr)
   * returns:
   *     no returned results
   */
-void image_print_contents (image_header_t *hdr, const char *p)
+void image_print_contents (image_header_t *hdr)
  {
+       const char *p;
+
+#ifdef USE_HOSTCC
+       p = "";
+#else
+       p = "   ";
+#endif
+


If the above is what is wanted, I'll prepare a patch -- comments are
welcome.

Regards,
Bartlomiej

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to