[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/9] i386: move bios load error message
From: |
Gerd Hoffmann |
Subject: |
[PULL 7/9] i386: move bios load error message |
Date: |
Tue, 26 Apr 2022 13:03:55 +0200 |
Switch to usual goto-end-of-function error handling style.
No functional change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220425135051.551037-2-kraxel@redhat.com>
---
hw/i386/x86.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index bb6727279097..ced31f67b9a8 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -1120,9 +1120,7 @@ void x86_bios_rom_init(MachineState *ms, const char
*default_firmware,
}
ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1);
if (ret != 0) {
- bios_error:
- fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
- exit(1);
+ goto bios_error;
}
g_free(filename);
@@ -1143,6 +1141,11 @@ void x86_bios_rom_init(MachineState *ms, const char
*default_firmware,
memory_region_add_subregion(rom_memory,
(uint32_t)(-bios_size),
bios);
+ return;
+
+bios_error:
+ fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
+ exit(1);
}
bool x86_machine_is_smm_enabled(const X86MachineState *x86ms)
--
2.35.1
- [PULL 0/9] Kraxel 20220426 patches, Gerd Hoffmann, 2022/04/26
- [PULL 1/9] hw/display/vmware_vga: do not discard screen updates, Gerd Hoffmann, 2022/04/26
- [PULL 2/9] Replacing CONFIG_VNC_PNG with CONFIG_PNG, Gerd Hoffmann, 2022/04/26
- [PULL 3/9] Added parameter to take screenshot with screendump as PNG, Gerd Hoffmann, 2022/04/26
- [PULL 6/9] avocado/vnc: add test_change_listen, Gerd Hoffmann, 2022/04/26
- [PULL 7/9] i386: move bios load error message,
Gerd Hoffmann <=
- [PULL 8/9] i386: factor out x86_firmware_configure(), Gerd Hoffmann, 2022/04/26
- [PULL 9/9] i386: firmware parsing and sev setup for -bios loaded firmware, Gerd Hoffmann, 2022/04/26
- [PULL 5/9] qapi/ui: add 'display-update' command for changing listen address, Gerd Hoffmann, 2022/04/26
- [PULL 4/9] ui/vnc: refactor arrays of addresses to SocketAddressList, Gerd Hoffmann, 2022/04/26