This function should return a useful error for U-Boot, rather than -1.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
ret = os_get_filesize(fname, &size);
if (ret < 0) {
printf("Cannot find sandbox state file '%s'\n", fname);
ret = os_get_filesize(fname, &size);
if (ret < 0) {
printf("Cannot find sandbox state file '%s'\n", fname);
}
state->state_fdt = os_malloc(size);
if (!state->state_fdt) {
}
state->state_fdt = os_malloc(size);
if (!state->state_fdt) {