diff --git a/bochs/pc_system.cc b/bochs/pc_system.cc index bb3573fc0..83f405cb1 100644 --- a/bochs/pc_system.cc +++ b/bochs/pc_system.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: pc_system.cc,v 1.45 2005-12-04 17:43:08 vruppert Exp $ +// $Id: pc_system.cc,v 1.46 2005-12-26 17:16:32 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -221,7 +221,8 @@ Bit8u bx_pc_system_c::IAC(void) void bx_pc_system_c::exit(void) { - DEV_cmos_save_image(); + if (DEV_cmos_present()) + DEV_cmos_save_image(); if (DEV_hd_present()) DEV_hd_close_harddrive(); diff --git a/bochs/plugin.h b/bochs/plugin.h index 63d95cb32..8dd8c8c31 100644 --- a/bochs/plugin.h +++ b/bochs/plugin.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: plugin.h,v 1.45 2005-12-04 17:43:09 vruppert Exp $ +// $Id: plugin.h,v 1.46 2005-12-26 17:16:32 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // This file provides macros and types needed for plugins. It is based on @@ -102,6 +102,7 @@ extern "C" { #define DEV_cmos_checksum() (bx_devices.pluginCmosDevice->checksum_cmos()) #define DEV_cmos_get_timeval() (bx_devices.pluginCmosDevice->get_timeval()) #define DEV_cmos_save_image() (bx_devices.pluginCmosDevice->save_image()) +#define DEV_cmos_present() (bx_devices.pluginCmosDevice != &bx_devices.stubCmos) ///////// keyboard macros #define DEV_mouse_motion(dx, dy, state) \