mirror of
https://xff.cz/git/u-boot/
synced 2025-09-21 10:32:07 +02:00
tools/fit-image: print a warning when cmd-line for dtc might be truncated
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include "fit_common.h"
|
#include "fit_common.h"
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
#include <u-boot/crc.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\"",
|
snprintf(cmd, sizeof(cmd), "cp \"%s\" \"%s\"",
|
||||||
params->imagefile, tmpfile);
|
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) {
|
if (*cmd && system(cmd) == -1) {
|
||||||
fprintf (stderr, "%s: system(%s) failed: %s\n",
|
fprintf (stderr, "%s: system(%s) failed: %s\n",
|
||||||
|
Reference in New Issue
Block a user