diff options
| author | Tom Rini <[email protected]> | 2023-06-01 11:23:23 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-06-01 11:23:23 -0400 |
| commit | f415495e2a261cab52cb03c46a92b7b457728380 (patch) | |
| tree | eecf08dd3376548353ec92e67c4ad56215c95fe4 /cmd | |
| parent | e863c7b2854bf9a882939f828023508fb1a1bc16 (diff) | |
| parent | 229d689e3c32164875667da282e496b858dbc608 (diff) | |
Merge branch '2023-05-31-assorted-fixes-and-improvements' into next
- Makefile logic fixes, address some issues that clang uncovers on ARM,
assorted code cleanups
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/fdt.c | 2 | ||||
| -rw-r--r-- | cmd/fs.c | 2 | ||||
| -rw-r--r-- | cmd/legacy-mtd-utils.c | 5 | ||||
| -rw-r--r-- | cmd/sf.c | 5 | ||||
| -rw-r--r-- | cmd/version.c | 2 |
5 files changed, 14 insertions, 2 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c index aae3278526c..2401ea8b44c 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -733,7 +733,7 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) gd->fdt_blob = blob; cfg_noffset = fit_conf_get_node(working_fdt, NULL); - if (!cfg_noffset) { + if (cfg_noffset < 0) { printf("Could not find configuration node: %s\n", fdt_strerror(cfg_noffset)); return CMD_RET_FAILURE; @@ -20,7 +20,7 @@ U_BOOT_CMD( "determine a file's size", "<interface> <dev[:part]> <filename>\n" " - Find file 'filename' from 'dev' on 'interface'\n" - " and determine its size." + " determine its size, and store in the 'filesize' variable." ); static int do_load_wrapper(struct cmd_tbl *cmdtp, int flag, int argc, diff --git a/cmd/legacy-mtd-utils.c b/cmd/legacy-mtd-utils.c index ac7139f84d6..5903a90fe53 100644 --- a/cmd/legacy-mtd-utils.c +++ b/cmd/legacy-mtd-utils.c @@ -88,6 +88,11 @@ int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off, return -1; } + if (*size == 0) { + debug("ERROR: Invalid size 0\n"); + return -1; + } + print: printf("device %d ", *idx); if (*size == chipsize) @@ -353,6 +353,11 @@ static int do_spi_flash_erase(int argc, char *const argv[]) if (ret != 1) return CMD_RET_USAGE; + if (size == 0) { + debug("ERROR: Invalid size 0\n"); + return CMD_RET_FAILURE; + } + /* Consistency checking */ if (offset + size > flash->size) { printf("ERROR: attempting %s past flash size (%#x)\n", diff --git a/cmd/version.c b/cmd/version.c index 190ef6a9061..87e1fa4159c 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -19,6 +19,8 @@ U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING const char version_string[] = U_BOOT_VERSION_STRING; +const unsigned short version_num = U_BOOT_VERSION_NUM; +const unsigned char version_num_patch = U_BOOT_VERSION_NUM_PATCH; static int do_version(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
