@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "cpu.h"
@@ -60,8 +61,8 @@ static void load_kernel(MoxieCPU *cpu, LoaderParams *loader_params)
0, 0);
if (kernel_size <= 0) {
- fprintf(stderr, "qemu: could not load kernel '%s'\n",
- loader_params->kernel_filename);
+ error_report("could not load kernel '%s'",
+ loader_params->kernel_filename);
exit(1);
}
@@ -74,9 +75,8 @@ static void load_kernel(MoxieCPU *cpu, LoaderParams *loader_params)
initrd_offset = (kernel_high + ~TARGET_PAGE_MASK)
& TARGET_PAGE_MASK;
if (initrd_offset + initrd_size > loader_params->ram_size) {
- fprintf(stderr,
- "qemu: memory too small for initial ram disk '%s'\n",
- loader_params->initrd_filename);
+ error_report("memory too small for initial ram disk '%s'",
+ loader_params->initrd_filename);
exit(1);
}
initrd_size = load_image_targphys(loader_params->initrd_filename,
@@ -84,8 +84,8 @@ static void load_kernel(MoxieCPU *cpu, LoaderParams *loader_params)
ram_size);
}
if (initrd_size == (target_ulong)-1) {
- fprintf(stderr, "qemu: could not load initial ram disk '%s'\n",
- loader_params->initrd_filename);
+ error_report("could not load initial ram disk '%s'",
+ loader_params->initrd_filename);
exit(1);
}
}