* [Qemu-devel] [PATCH 1/3] cleanup: bios_error in pc_init1()
@ 2009-03-31 14:26 Leandro Dorileo
2009-03-31 17:52 ` [Qemu-devel] " Leandro Dorileo
0 siblings, 1 reply; 2+ messages in thread
From: Leandro Dorileo @ 2009-03-31 14:26 UTC (permalink / raw)
To: qemu-devel
Moved bios_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 176730e..7539a4f 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -847,9 +847,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
bios_offset = qemu_ram_alloc(bios_size);
ret = load_image(buf, phys_ram_base + bios_offset);
if (ret != bios_size) {
- bios_error:
- fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", buf);
- exit(1);
+ goto bios_error;
}
if (cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled) {
@@ -1108,6 +1106,10 @@ vga_bios_error:
virtio_console_init(pci_bus, virtcon_hds[i]);
}
}
+
+bios_error:
+ fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", buf);
+ exit(1);
}
static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size,
--
1.6.2.1
--
(°= Leandro Dorileo
//\ ldorileo@gmail.com - http://www.dorilex.net
V_/ Software is a matter of freedom.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH 1/3] cleanup: bios_error in pc_init1()
2009-03-31 14:26 [Qemu-devel] [PATCH 1/3] cleanup: bios_error in pc_init1() Leandro Dorileo
@ 2009-03-31 17:52 ` Leandro Dorileo
0 siblings, 0 replies; 2+ messages in thread
From: Leandro Dorileo @ 2009-03-31 17:52 UTC (permalink / raw)
To: qemu-devel
Please ignore those patches, it was written based on
git://git.savannah.nongnu.org/qemu.git
Sorry.
On Tue, Mar 31, 2009 at 10:26 AM, Leandro Dorileo <ldorileo@gmail.com> wrote:
> Moved bios_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 176730e..7539a4f 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -847,9 +847,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
> bios_offset = qemu_ram_alloc(bios_size);
> ret = load_image(buf, phys_ram_base + bios_offset);
> if (ret != bios_size) {
> - bios_error:
> - fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", buf);
> - exit(1);
> + goto bios_error;
> }
>
> if (cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled) {
> @@ -1108,6 +1106,10 @@ vga_bios_error:
> virtio_console_init(pci_bus, virtcon_hds[i]);
> }
> }
> +
> +bios_error:
> + fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", buf);
> + exit(1);
> }
>
> static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size,
> --
--
(°= Leandro Dorileo
//\ ldorileo@gmail.com - http://www.dorilex.net
V_/ Software is a matter of freedom.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-31 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 14:26 [Qemu-devel] [PATCH 1/3] cleanup: bios_error in pc_init1() Leandro Dorileo
2009-03-31 17:52 ` [Qemu-devel] " Leandro Dorileo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.