summaryrefslogtreecommitdiff
path: root/tools/image-host.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-04-12 12:50:57 -0600
committerTom Rini <trini@konsulko.com>2024-04-12 12:50:57 -0600
commitef8ef5f77c9a998f76a48277a883af1645b54117 (patch)
tree52fdcdbbf87dfa777fa87e8ac9e27577003f5d0a /tools/image-host.c
parentd5e6401011a269328d3ea69468532b4125fd2bb9 (diff)
parent4341fb73326907faecfc9e3b711bbfcd3937b525 (diff)
Merge branch '2024-04-12-assorted-updates'
- Assorted sandbox fixes, cleanup some of the partition table code and a few other fixes
Diffstat (limited to 'tools/image-host.c')
-rw-r--r--tools/image-host.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/image-host.c b/tools/image-host.c
index b2a0f2e6d16..7bfc0cb6b18 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -346,17 +346,17 @@ static int fit_image_read_key_iv_data(const char *keydir, const char *key_iv_nam
unsigned char *key_iv_data, int expected_size)
{
char filename[PATH_MAX];
- int ret = -1;
+ int ret;
ret = snprintf(filename, sizeof(filename), "%s/%s%s",
keydir, key_iv_name, ".bin");
if (ret >= sizeof(filename)) {
- printf("Can't format the key or IV filename when setting up the cipher: insufficient buffer space\n");
- ret = -1;
+ fprintf(stderr, "Can't format the key or IV filename when setting up the cipher: insufficient buffer space\n");
+ return -1;
}
if (ret < 0) {
- printf("Can't format the key or IV filename when setting up the cipher: snprintf error\n");
- ret = -1;
+ fprintf(stderr, "Can't format the key or IV filename when setting up the cipher: snprintf error\n");
+ return -1;
}
ret = fit_image_read_data(filename, key_iv_data, expected_size);