From c6b34f1b8c17e6aba32f8b36e4d914ec27a64930 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Thu, 23 Jul 2009 14:20:41 +0100 Subject: [PATCH] use a specific config reader for memory since the set/get expect a value in kilobytes whereas the config file is in megabytes --- xenvm/vmconfig.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xenvm/vmconfig.ml b/xenvm/vmconfig.ml index 2493419..dcd5f8a 100644 --- a/xenvm/vmconfig.ml +++ b/xenvm/vmconfig.ml @@ -466,6 +466,7 @@ let of_file uuid error_report file = and debug = ref (!cfg.debug) and output = ref (!cfg.output) and no_mem_check = ref (!cfg.no_mem_check) + and memory = ref (-1) in let set_action ref_var s = @@ -489,6 +490,7 @@ let of_file uuid error_report file = ("output", Config.Set_string output); ("uuid", Config.String (fun s -> __uuid := Some s)); ("debug", Config.Set_bool debug); + ("memory", Config.Set_int memory); ("no_mem_check", Config.Set_bool no_mem_check); ] in let kv k v = @@ -505,10 +507,10 @@ let of_file uuid error_report file = with Config.Error ls -> error_report ls end; - { !cfg with __uuid = !__uuid; debug = !debug; + memory = Int64.mul (Int64.of_int !memory) 1024L; startup = !startup; output = !output; no_mem_check = !no_mem_check; -- 2.39.5