summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/env/fw_env_main.c2
-rw-r--r--tools/imximage.c2
-rw-r--r--tools/mkimage.c5
3 files changed, 4 insertions, 5 deletions
diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
index d93a915fd1..fb4afa5ee9 100644
--- a/tools/env/fw_env_main.c
+++ b/tools/env/fw_env_main.c
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
argv += optind;
if (env_opts.lockname) {
- lockname = malloc(sizeof(env_opts.lockname) +
+ lockname = malloc(strlen(env_opts.lockname) +
sizeof(CMD_PRINTENV) + 10);
if (!lockname) {
fprintf(stderr, "Unable allocate memory");
diff --git a/tools/imximage.c b/tools/imximage.c
index ed9d935903..6dabb13520 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -516,7 +516,7 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
offs = (char *)&hdr_v2->data.dcd_table
- (char *)hdr_v2;
- printf("HAB Blocks: %08x %08x %08x\n",
+ printf("HAB Blocks: 0x%08x 0x%08x 0x%08x\n",
(uint32_t)fhdr_v2->self, 0,
hdr_v2->boot_data.size - imximage_ivt_offset -
imximage_csf_size);
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 28ff35e670..4e561820e7 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -588,9 +588,8 @@ int main(int argc, char **argv)
if (tparams->print_header)
tparams->print_header (ptr);
else {
- fprintf (stderr, "%s: Can't print header for %s: %s\n",
- params.cmdname, tparams->name, strerror(errno));
- exit (EXIT_FAILURE);
+ fprintf (stderr, "%s: Can't print header for %s\n",
+ params.cmdname, tparams->name);
}
(void) munmap((void *)ptr, sbuf.st_size);