Patchwork [U-Boot,PATCHv2,03/10] mkenvimage: Correct the includes and add a missing one

login
register
mail settings
Submitter David Wagner
Date Dec. 21, 2011, 12:58 a.m.
Message ID <1324429120-10141-1-git-send-email-david.wagner@free-electrons.com>
Download mbox | patch
Permalink /patch/132544/
State Accepted
Headers show

Comments

David Wagner - Dec. 21, 2011, 12:58 a.m.
compiler.h and u-boot/crc.h need to be included from U-Boot's headers.

stdlib.h was missing.

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
---

This version is rebased on top of 'next' (it didn't apply anymore, after Horst
Kronstorfer's patches).

 tools/mkenvimage.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)
Wolfgang Denk - Jan. 5, 2012, 4:28 p.m.
Dear David Wagner,

In message <1324429120-10141-1-git-send-email-david.wagner@free-electrons.com> you wrote:
> compiler.h and u-boot/crc.h need to be included from U-Boot's headers.
> 
> stdlib.h was missing.
> 
> Signed-off-by: David Wagner <david.wagner@free-electrons.com>
> ---
> 
> This version is rebased on top of 'next' (it didn't apply anymore, after Horst
> Kronstorfer's patches).

Please rebase against current master and resubmit.  Thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 5f7d6ea..b8b5c3a 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -28,14 +28,15 @@ 
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
 #include <unistd.h>
-#include <compiler.h>
+#include "compiler.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#include <u-boot/crc.h>
+#include "u-boot/crc.h"
 #include <version.h>
 
 #define CRC_SIZE sizeof(uint32_t)
@@ -188,19 +189,9 @@  int main(int argc, char **argv)
 		}
 		ret = close(txt_fd);
 	}
-<<<<<<< HEAD
-	/*
-	 * The right test to do is "=>" (not ">") because of the additional
-	 * ending \0. See below.
-	 */
-	if (filesize >= envsize) {
-		fprintf(stderr, "The input file is larger than the "
-				"environment partition size\n");
-=======
 	/* The +1 is for the additionnal ending \0. See below. */
 	if (filesize + 1 > envsize) {
 		fprintf(stderr, "The input file is larger than the environment partition size\n");
->>>>>>> mkenvimage: correct and clarify comments and error messages
 		return EXIT_FAILURE;
 	}