diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-04 23:45:04 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-06-28 05:09:51 +0300 |
commit | 66995164ddbedd3449673052a10fc35917bf3d78 (patch) | |
tree | 1201e640dcd7b0b55d0e4809707fa87c3f7ff911 | |
parent | 7750ee45a62c7834f170f817232e432b8d2a14d3 (diff) | |
download | u-boot-66995164ddbedd3449673052a10fc35917bf3d78.tar.xz |
sandbox: show error if the device-tree cannot be loaded
U-Boot's printf() used before setting up U-Boot's serial driver does not
create any output. Use os_printf() for error messages related to loading
the device-tree.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index 7a82798c36..d077948dd7 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -331,27 +331,27 @@ void *board_fdt_blob_setup(int *ret) err = setup_auto_tree(blob); if (!err) goto done; - printf("Unable to create empty FDT: %s\n", fdt_strerror(err)); + os_printf("Unable to create empty FDT: %s\n", fdt_strerror(err)); *ret = -EINVAL; goto fail; } err = os_get_filesize(fname, &size); if (err < 0) { - printf("Failed to find FDT file '%s'\n", fname); + os_printf("Failed to find FDT file '%s'\n", fname); *ret = err; goto fail; } fd = os_open(fname, OS_O_RDONLY); if (fd < 0) { - printf("Failed to open FDT file '%s'\n", fname); + os_printf("Failed to open FDT file '%s'\n", fname); *ret = -EACCES; goto fail; } if (os_read(fd, blob, size) != size) { os_close(fd); - printf("Failed to read FDT file '%s'\n", fname); + os_printf("Failed to read FDT file '%s'\n", fname); *ret = -EIO; goto fail; } |