From: Vincent Hanquez Date: Wed, 10 Jun 2009 12:22:47 +0000 (+0100) Subject: fix restore that got completly mishandled during the last code refactor X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fb9b96e437e5c0aa7be51060818fb7b4c0740de7;p=xenclient%2Ftoolstack.git fix restore that got completly mishandled during the last code refactor --- diff --git a/xenvm/vmact.ml b/xenvm/vmact.ml index c383283..f42598f 100644 --- a/xenvm/vmact.ml +++ b/xenvm/vmact.ml @@ -362,13 +362,13 @@ let build_info_of_cfg cfg = Domain.priv = spec_info; } -let build_vm xc xs state f = +let build_vm xc xs state f restore = let cfg = state.vm_cfg in let domid = state.vm_domid in try f state cfg; set_cpuid xc domid cfg; - add_devices xc xs domid state false; + add_devices xc xs domid state restore; with exn -> warn "receive exception building vm: %s" (Printexc.to_string exn); stop_vm xc xs state; @@ -391,7 +391,7 @@ let start_vm xc xs state = state.vm_arch <- arch; ) in create_vm xc xs state; - build_vm xc xs state from_scratch; + build_vm xc xs state from_scratch false; if cfg.startup = StartupStart then ( try @@ -411,7 +411,7 @@ let restart_vm xc xs state fd = Domain.restore ~xc ~xs info state.vm_domid fd; ) in create_vm xc xs state; - build_vm xc xs state from_fd; + build_vm xc xs state from_fd true; try Domain.unpause ~xc state.vm_domid; change_vmstate state VmRunning;