summaryrefslogtreecommitdiff
path: root/cmd/cbfs.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-15 04:56:13 +0300
committerBin Meng <bmeng.cn@gmail.com>2019-08-18 16:54:10 +0300
commitc7f16934749b054ce1f0b75bd664d22af8b7c588 (patch)
treedca5553d140b2e79cc3c9ec545b8e9a51201e852 /cmd/cbfs.c
parent02e4af63a9f5531b7975d21828edea04d6d519d2 (diff)
downloadu-boot-c7f16934749b054ce1f0b75bd664d22af8b7c588.tar.xz
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>
Diffstat (limited to 'cmd/cbfs.c')
-rw-r--r--cmd/cbfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/cbfs.c b/cmd/cbfs.c
index 3d1fc95972..98e652a4e7 100644
--- a/cmd/cbfs.c
+++ b/cmd/cbfs.c
@@ -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());