mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
sandbox: test: Tidy up spl_test_load() calls
Use the new sandbox_find_next_phase() function, which does what is needed here. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7c19e4cbfe
commit
79e1d289b7
1 changed files with 1 additions and 5 deletions
|
@ -56,7 +56,6 @@ struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
|
||||||
|
|
||||||
static int spl_test_load(struct unit_test_state *uts)
|
static int spl_test_load(struct unit_test_state *uts)
|
||||||
{
|
{
|
||||||
const char *cur_prefix, *next_prefix;
|
|
||||||
struct spl_image_info image;
|
struct spl_image_info image;
|
||||||
struct image_header *header;
|
struct image_header *header;
|
||||||
struct text_ctx text_ctx;
|
struct text_ctx text_ctx;
|
||||||
|
@ -69,10 +68,7 @@ static int spl_test_load(struct unit_test_state *uts)
|
||||||
load.bl_len = 512;
|
load.bl_len = 512;
|
||||||
load.read = read_fit_image;
|
load.read = read_fit_image;
|
||||||
|
|
||||||
cur_prefix = spl_phase_prefix(spl_phase());
|
ret = sandbox_find_next_phase(fname, sizeof(fname), true);
|
||||||
next_prefix = spl_phase_prefix(spl_next_phase());
|
|
||||||
ret = os_find_u_boot(fname, sizeof(fname), true, cur_prefix,
|
|
||||||
next_prefix);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printf("(%s not found, error %d)\n", fname, ret);
|
printf("(%s not found, error %d)\n", fname, ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue