@@ -351,7 +351,7 @@ void axisdev88_init(MachineState *machine)
cris_load_image(cpu, &li);
} else if (!qtest_enabled()) {
fprintf(stderr, "Kernel image must be specified\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -107,7 +107,7 @@ static void lm32_evr_init(MachineState *machine)
cpu = cpu_lm32_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "qemu: unable to find CPU '%s'\n", cpu_model);
- exit(1);
+ exit(EXIT_FAILURE);
}
env = &cpu->env;
@@ -158,7 +158,7 @@ static void lm32_evr_init(MachineState *machine)
if (kernel_size < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -208,7 +208,7 @@ static void lm32_uclinux_init(MachineState *machine)
cpu = cpu_lm32_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "qemu: unable to find CPU '%s'\n", cpu_model);
- exit(1);
+ exit(EXIT_FAILURE);
}
env = &cpu->env;
@@ -260,7 +260,7 @@ static void lm32_uclinux_init(MachineState *machine)
if (kernel_size < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -114,7 +114,7 @@ milkymist_init(MachineState *machine)
cpu = cpu_lm32_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "qemu: unable to find CPU '%s'\n", cpu_model);
- exit(1);
+ exit(EXIT_FAILURE);
}
env = &cpu->env;
@@ -155,7 +155,7 @@ milkymist_init(MachineState *machine)
if (!kernel_filename && !dinfo && !bios_filename && !qtest_enabled()) {
fprintf(stderr, "qemu: could not load Milkymist One bios '%s'\n",
bios_name);
- exit(1);
+ exit(EXIT_FAILURE);
}
g_free(bios_filename);
@@ -194,7 +194,7 @@ milkymist_init(MachineState *machine)
if (kernel_size < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -89,7 +89,7 @@ static void cpu_openrisc_load_kernel(ram_addr_t ram_size,
if (kernel_size < 0) {
fprintf(stderr, "QEMU: couldn't load the kernel '%s'\n",
kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
cpu->env.pc = entry;
}
@@ -112,7 +112,7 @@ static void openrisc_sim_init(MachineState *machine)
cpu = cpu_openrisc_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "Unable to find CPU definition!\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
qemu_register_reset(main_cpu_reset, cpu);
main_cpu_reset(cpu);
@@ -52,7 +52,7 @@ static void tricore_load_kernel(CPUTriCoreState *env)
if (kernel_size <= 0) {
error_report("qemu: no kernel file '%s'",
tricoretb_binfo.kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
env->PC = entry;
@@ -77,7 +77,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id)
cpu = cpu_tricore_init(machine->cpu_model);
if (!cpu) {
error_report("Unable to find CPU definition");
- exit(1);
+ exit(EXIT_FAILURE);
}
env = &cpu->env;
memory_region_init_ram(ext_cram, NULL, "powerlink_ext_c.ram", 2*1024*1024,
@@ -101,7 +101,7 @@ static void puv3_load_kernel(const char *kernel_filename)
KERNEL_MAX_SIZE);
if (size < 0) {
error_report("Load kernel error: '%s'", kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* cheat curses that we have a graphic console, only under ocd console */
@@ -119,7 +119,7 @@ static void puv3_init(MachineState *machine)
if (initrd_filename) {
error_report("Please use kernel built-in initramdisk");
- exit(1);
+ exit(EXIT_FAILURE);
}
if (!cpu_model) {
@@ -129,7 +129,7 @@ static void puv3_init(MachineState *machine)
cpu = uc32_cpu_init(cpu_model);
if (!cpu) {
error_report("Unable to find CPU definition");
- exit(1);
+ exit(EXIT_FAILURE);
}
env = &cpu->env;
This patch is the result of coccinelle script scripts/coccinelle/exit.cocci Signed-off-by: Laurent Vivier <lvivier@redhat.com> --- hw/cris/axis_dev88.c | 2 +- hw/lm32/lm32_boards.c | 8 ++++---- hw/lm32/milkymist.c | 6 +++--- hw/openrisc/openrisc_sim.c | 4 ++-- hw/tricore/tricore_testboard.c | 4 ++-- hw/unicore32/puv3.c | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-)