diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c
index 60df887..fb022dd 100644
--- a/hw/cris/axis_dev88.c
+++ b/hw/cris/axis_dev88.c
@@ -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);
     }
 }
 
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index 8f0c307..7e4ccc3 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -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);
         }
     }
 
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index 5cae0f1..de1147e 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -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);
         }
     }
 
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 6d06d5b..48764b6 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -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);
diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
index 19dd587..ccc0703 100644
--- a/hw/tricore/tricore_testboard.c
+++ b/hw/tricore/tricore_testboard.c
@@ -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,
diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index 31cd171..f9c65be 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -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;
 
