|
@@ -8,6 +8,7 @@
|
|
|
*/
|
|
|
|
|
|
#include "qemu/osdep.h"
|
|
|
+#include "qemu/error-report.h"
|
|
|
#include "qapi/error.h"
|
|
|
#include <libfdt.h>
|
|
|
#include "hw/hw.h"
|
|
@@ -690,7 +691,7 @@ static void load_image_to_fw_cfg(FWCfgState *fw_cfg, uint16_t size_key,
|
|
|
gsize length;
|
|
|
|
|
|
if (!g_file_get_contents(image_name, &contents, &length, NULL)) {
|
|
|
- fprintf(stderr, "failed to load \"%s\"\n", image_name);
|
|
|
+ error_report("failed to load \"%s\"", image_name);
|
|
|
exit(1);
|
|
|
}
|
|
|
size = length;
|
|
@@ -956,8 +957,7 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
|
|
|
is_linux = 1;
|
|
|
}
|
|
|
if (kernel_size < 0) {
|
|
|
- fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
|
|
- info->kernel_filename);
|
|
|
+ error_report("could not load kernel '%s'", info->kernel_filename);
|
|
|
exit(1);
|
|
|
}
|
|
|
info->entry = entry;
|
|
@@ -976,8 +976,8 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
|
|
|
info->initrd_start);
|
|
|
}
|
|
|
if (initrd_size < 0) {
|
|
|
- fprintf(stderr, "qemu: could not load initrd '%s'\n",
|
|
|
- info->initrd_filename);
|
|
|
+ error_report("could not load initrd '%s'",
|
|
|
+ info->initrd_filename);
|
|
|
exit(1);
|
|
|
}
|
|
|
} else {
|
|
@@ -1021,9 +1021,9 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
|
|
|
} else {
|
|
|
fixupcontext[FIXUP_ARGPTR] = info->loader_start + KERNEL_ARGS_ADDR;
|
|
|
if (info->ram_size >= (1ULL << 32)) {
|
|
|
- fprintf(stderr, "qemu: RAM size must be less than 4GB to boot"
|
|
|
- " Linux kernel using ATAGS (try passing a device tree"
|
|
|
- " using -dtb)\n");
|
|
|
+ error_report("RAM size must be less than 4GB to boot"
|
|
|
+ " Linux kernel using ATAGS (try passing a device tree"
|
|
|
+ " using -dtb)");
|
|
|
exit(1);
|
|
|
}
|
|
|
}
|