diff options
author | Sven Roederer <devel-sven@geroedel.de> | 2020-04-27 02:08:39 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-01 11:34:01 -0400 |
commit | ea5d3731b843b14f1c48d0d0f2c7d2877ecbf673 (patch) | |
tree | 2a4e136bf4dfee4c16b243eb42a26670fdf947b7 /tools | |
parent | fc21a88f801c41a535397a359b3b5bdc3ef8e79f (diff) | |
download | u-boot-ea5d3731b843b14f1c48d0d0f2c7d2877ecbf673.tar.gz u-boot-ea5d3731b843b14f1c48d0d0f2c7d2877ecbf673.tar.bz2 u-boot-ea5d3731b843b14f1c48d0d0f2c7d2877ecbf673.zip |
tools/fit-image: print a warning when cmd-line for dtc might be truncated
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/fit_image.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c index 4aeabbcfe9..88ff093d05 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -17,6 +17,7 @@ #include "fit_common.h" #include "mkimage.h" #include <image.h> +#include <string.h> #include <stdarg.h> #include <version.h> #include <u-boot/crc.h> @@ -744,6 +745,9 @@ static int fit_handle_file(struct image_tool_params *params) snprintf(cmd, sizeof(cmd), "cp \"%s\" \"%s\"", params->imagefile, tmpfile); } + if (strlen(cmd) >= MKIMAGE_MAX_DTC_CMDLINE_LEN - 1) { + fprintf(stderr, "WARNING: command-line for FIT creation might be truncated and will probably fail.\n"); + } if (*cmd && system(cmd) == -1) { fprintf (stderr, "%s: system(%s) failed: %s\n", |