]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
use a specific config reader for memory since the set/get expect a value in kilobytes
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Thu, 23 Jul 2009 13:20:41 +0000 (14:20 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Thu, 23 Jul 2009 13:20:41 +0000 (14:20 +0100)
whereas the config file is in megabytes

xenvm/vmconfig.ml

index 249341998c56d553cf326f29c12fffd678b04847..dcd5f8aae06b344287a88129d1152012fb6be967 100644 (file)
@@ -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;