aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-10-30 16:01:54 -0400
committerTom Rini <trini@konsulko.com>2023-10-30 16:01:54 -0400
commitcbba1b7766bd93d74e28202c46e69095ac13760b (patch)
treeba75e840777ea0213e0c97fb72234d1ea4ed7769 /tools
parentc594b430225c36189a8fee2a710264d0458dc3d6 (diff)
parent5ed1c55fb4c23dc9f14b9c8d1d687f8c0ee703ac (diff)
Merge branch '2023-10-30-assorted-general-updates'
- Two Kconfig content fixes, fix some issues reported by Coverity, resync get_maintainer.pl (two small fixees), update i2c_eeprom, and fix an off by one in addrmap_set_entry
Diffstat (limited to 'tools')
-rw-r--r--tools/sfspl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/sfspl.c b/tools/sfspl.c
index ec18a0a77e..c76420ce21 100644
--- a/tools/sfspl.c
+++ b/tools/sfspl.c
@@ -99,7 +99,7 @@ static int sfspl_image_extract_subimage(void *ptr,
{
struct spl_hdr *hdr = (void *)ptr;
unsigned char *buf = ptr;
- int fd;
+ int fd, ret = EXIT_SUCCESS;
unsigned int hdr_size = le32_to_cpu(hdr->hdr_size);
unsigned int file_size = le32_to_cpu(hdr->file_size);
@@ -110,16 +110,16 @@ static int sfspl_image_extract_subimage(void *ptr,
fd = open(params->outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd == -1) {
- perror("Can write file");
+ perror("Cannot open file");
return EXIT_FAILURE;
}
if (write(fd, &buf[hdr_size], file_size) != file_size) {
perror("Cannot write file");
- return EXIT_FAILURE;
+ ret = EXIT_FAILURE;
}
close(fd);
- return EXIT_SUCCESS;
+ return ret;
}
static int sfspl_check_image_type(uint8_t type)