summaryrefslogtreecommitdiffstats
path: root/commands/uimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/uimage.c')
-rw-r--r--commands/uimage.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/commands/uimage.c b/commands/uimage.c
index 982da7101a..72b827b5b2 100644
--- a/commands/uimage.c
+++ b/commands/uimage.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
#include <common.h>
#include <command.h>
#include <image.h>
@@ -11,7 +13,7 @@
static int uimage_fd;
-static int uimage_flush(void *buf, unsigned int len)
+static long uimage_flush(void *buf, unsigned long len)
{
return write_full(uimage_fd, buf, len);
}
@@ -19,7 +21,7 @@ static int uimage_flush(void *buf, unsigned int len)
static int do_uimage(int argc, char *argv[])
{
struct uimage_handle *handle;
- int ret;
+ int ret = 0;
int verify = 0;
int fd;
int opt;
@@ -84,7 +86,7 @@ static int do_uimage(int argc, char *argv[])
err:
uimage_close(handle);
- return ret ? 1 : 0;
+ return ret ? COMMAND_ERROR : COMMAND_SUCCESS;
}
BAREBOX_CMD_HELP_START(uimage)