]> xenbits.xen.org Git - xenclient/toolstack.git/commitdiff
Merge branch 'master' of git://git.uk.xensource.com/xenclient/toolstack
authorChristian Limpach <chris@rogan.ad.xensource.com>
Tue, 22 Dec 2009 19:24:33 +0000 (19:24 +0000)
committerChristian Limpach <chris@rogan.ad.xensource.com>
Tue, 22 Dec 2009 19:24:33 +0000 (19:24 +0000)
1  2 
xenvm/vmact.ml
xenvm/vmconfig.ml

diff --cc xenvm/vmact.ml
Simple merge
index f04188c12dc31b5c2cc63ea561881fff630f8ade,fbe536cf88afeae30f632dc3f5cfbaf922d507ec..62e0b2606578f335bc311fbe9ed742cfcb486bbe
@@@ -342,18 -342,27 +342,20 @@@ let config_disk_of_string s 
                                | _        -> acc
                        ) [] left in
                        (physpath, Device.Vbd.physty_of_string physty_s,
-                       virtpath, Device.Vbd.mode_of_string mode_s,
-                       Device.Vbd.devty_of_string devtype_s, kvs)
+                        virtpath, Device.Vbd.mode_of_string mode_s,
+                        Device.Vbd.devty_of_string devtype_s,
+                        snapshot_mode_of_string snapshotmode_s,
+                        kvs)
                | _ ->
-                       failwith "need at least 5 arguments for disk"
+                       failwith "need at least 6 arguments for disk"
                in
 -      let crypt_cipher, crypt_key_size, crypt_key_file =
 -              (try Some (List.assoc "cipher" kvs) with Not_found -> None),
 -              (try Some (List.assoc "key-size" kvs) with Not_found -> None),
 -              (try Some (List.assoc "key-file" kvs) with Not_found -> None)
 -              in
        let dc =
 -              if crypt_cipher = None && crypt_key_size = None && crypt_key_file = None then
 -                      None
 -              else
 -                      Some {
 -                              disk_crypt_cipher = (match crypt_cipher with None -> "aes-xts-plain" | Some c -> c);
 -                              disk_crypt_key_size = (match crypt_key_size with None -> 256 | Some i -> int_of_string i);
 -                              disk_crypt_key_file = "";
 +              try Some {
 +                              disk_crypt_key_file = (List.assoc "key-file" kvs);
 +                              disk_crypt_cipher = (try (List.assoc "cipher" kvs) with Not_found -> "aes-xts-plain");
 +                              disk_crypt_key_size = (try int_of_string (List.assoc "key-size" kvs) with Not_found -> 256);
                        }
 +              with Not_found -> None
                in
        {
                disk_physpath = physpath;