qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/3] cleanup: option_rom_error in pc_init1()


From: Leandro Dorileo
Subject: [Qemu-devel] [PATCH 3/3] cleanup: option_rom_error in pc_init1()
Date: Tue, 31 Mar 2009 10:28:36 -0400

Moved option_rom_error to the end of pc_init1() function, making the
code a bit more readable.

---
 hw/pc.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index f4cdcb5..9cab2ba 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -906,9 +906,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
             option_rom_offset = qemu_ram_alloc(size);
             ret = load_image(option_rom[i], phys_ram_base + option_rom_offset);
             if (ret != size) {
-            option_rom_error:
-                fprintf(stderr, "Too many option ROMS\n");
-                exit(1);
+                goto option_rom_error;
             }
             size = (size + 4095) & ~4095;
             cpu_register_physical_memory(0xd0000 + offset,
@@ -1112,6 +1110,10 @@ bios_error:
 vga_bios_error:
     fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf);
     exit(1);
+
+option_rom_error:
+    fprintf(stderr, "Too many option ROMS\n");
+    exit(1);
 }

 static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size,
-- 
1.6.2.1

-- 
(°=   Leandro Dorileo
//\    address@hidden   -   http://www.dorilex.net
V_/  Software is a matter of freedom.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]