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

David Wagner david.wagner at free-electrons.com
Wed Dec 21 01:58:40 CET 2011


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 at 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(-)

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;
 	}
 
-- 
1.7.5.4



More information about the U-Boot mailing list