aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/e500.c
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@xilinx.com>2018-02-03 09:43:10 +0100
committerMarkus Armbruster <armbru@redhat.com>2018-02-06 18:29:26 +0100
commit6f76b817b51806f7a41e963e637804e73b30b46a (patch)
treeed0e3cd17f940d3c8d5b3f07db57f67ed5b0a6a1 /hw/ppc/e500.c
parent0151abe4f5318d0913b5ead27db1bb28de3cc4d2 (diff)
hw/ppc: Replace fprintf(stderr, "*\n" with error_report()
Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + Some lines were then manually tweaked to pass checkpatch and some curly braces were added to match QEMU style. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Cc: qemu-ppc@nongnu.org Conversions that aren't followed by exit() dropped, because they might be inappropriate. Also trim trailing punctuation from error messages. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180203084315.20497-10-armbru@redhat.com>
Diffstat (limited to 'hw/ppc/e500.c')
-rw-r--r--hw/ppc/e500.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index c4fe06ea2a..343bba93ce 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -811,8 +811,8 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
cs = CPU(cpu);
if (env->mmu_model != POWERPC_MMU_BOOKE206) {
- fprintf(stderr, "MMU model %i not supported by this machine.\n",
- env->mmu_model);
+ error_report("MMU model %i not supported by this machine",
+ env->mmu_model);
exit(1);
}
@@ -959,8 +959,8 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
cur_base,
ram_size - cur_base);
if (kernel_size < 0) {
- fprintf(stderr, "qemu: could not load kernel '%s'\n",
- machine->kernel_filename);
+ error_report("could not load kernel '%s'",
+ machine->kernel_filename);
exit(1);
}
@@ -974,8 +974,8 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
ram_size - initrd_base);
if (initrd_size < 0) {
- fprintf(stderr, "qemu: could not load initial ram disk '%s'\n",
- machine->initrd_filename);
+ error_report("could not load initial ram disk '%s'",
+ machine->initrd_filename);
exit(1);
}
@@ -1016,7 +1016,7 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
kernel_size = load_uimage(filename, &bios_entry, &loadaddr, NULL,
NULL, NULL);
if (kernel_size < 0) {
- fprintf(stderr, "qemu: could not load firmware '%s'\n", filename);
+ error_report("could not load firmware '%s'", filename);
exit(1);
}
}
@@ -1029,7 +1029,7 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
initrd_base, initrd_size,
kernel_base, kernel_size);
if (dt_size < 0) {
- fprintf(stderr, "couldn't load device tree\n");
+ error_report("couldn't load device tree");
exit(1);
}
assert(dt_size < DTB_MAX_SIZE);