]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/arm/boot: Report error msg if loading elf/dtb failed
authorChangbin Du <changbin.du@huawei.com>
Tue, 3 Sep 2024 13:39:40 +0000 (21:39 +0800)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 Sep 2024 12:12:37 +0000 (13:12 +0100)
Print errors before exit. Do not exit silently.

Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Changbin Du <changbin.du@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240903133940.3447430-1-changbin.du@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/boot.c

index d480a7da02cf16fe5f5ef60b81cdbb383f6b4bef..6c895e05cbc0faef69d3852c9300f2a4bf1a35dc 100644 (file)
@@ -839,6 +839,8 @@ static ssize_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry,
                       1, data_swab, as);
     if (ret <= 0) {
         /* The header loaded but the image didn't */
+        error_report("Couldn't load elf '%s': %s",
+                     info->kernel_filename, load_elf_strerror(ret));
         exit(1);
     }