Without this patch when '-no-acpi' is added to the command line and the
user issues a 'system_powerdown' qemu monitor command, we get a segmentation
fault.

Signed-off-by: Uri Lublin <[EMAIL PROTECTED]>
---
 qemu/hw/acpi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c
index e44c8b5..9033ee2 100644
--- a/qemu/hw/acpi.c
+++ b/qemu/hw/acpi.c
@@ -530,7 +530,7 @@ i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t 
smb_io_base,
 #if defined(TARGET_I386)
 void qemu_system_powerdown(void)
 {
-    if(pm_state->pmen & PWRBTN_EN) {
+    if(pm_state && (pm_state->pmen & PWRBTN_EN)) {
         pm_state->pmsts |= PWRBTN_EN;
        pm_update_sci(pm_state);
     }
-- 
1.5.4.2


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to