On 2012-02-17 09:52, Wen Congyang wrote: >>> +static DumpState *dump_init(int fd, Error **errp) >>> +{ >>> + CPUState *env; >>> + DumpState *s = dump_get_current(); >>> + int ret; >>> + >>> + vm_stop(RUN_STATE_PAUSED); >> >> I would save the current vm state first and restore it when finished. > > There is no API to get current vm state. If you want this feature, I will > add API to get it.
You are looking for runstate_is_running(). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux