1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

cbfs: Move result variable into the struct

Move the result variable into the struct also, so that it can be used when
BSS is not available. Add a function to read it.

Note that all functions sill use the BSS version of the data.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2019-08-14 19:56:13 -06:00
committed by Bin Meng
parent 02e4af63a9
commit c7f1693474
3 changed files with 37 additions and 22 deletions

View File

@@ -29,7 +29,7 @@ static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
}
}
file_cbfs_init(end_of_rom);
if (file_cbfs_result != CBFS_SUCCESS) {
if (cbfs_get_result() != CBFS_SUCCESS) {
printf("%s.\n", file_cbfs_error());
return 1;
}
@@ -67,7 +67,7 @@ static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc,
file = file_cbfs_find(argv[2]);
if (!file) {
if (file_cbfs_result == CBFS_FILE_NOT_FOUND)
if (cbfs_get_result() == CBFS_FILE_NOT_FOUND)
printf("%s: %s\n", file_cbfs_error(), argv[2]);
else
printf("%s.\n", file_cbfs_error());