Add .gitignore file for git.
[virt-p2v.git] / virt-p2v
index 954f035..29228b2 100755 (executable)
--- a/virt-p2v
+++ b/virt-p2v
@@ -689,7 +689,7 @@ let get_all_block_devices () =
   let devices = devices @ get "sd" filter in
 
   (* Search for cciss. *)
-  let rex = Pcre.regexp "^cciss!c(\\d)d(\\d)$" in
+  let rex = Pcre.regexp "^cciss!c(\\d+)d(\\d+)$" in
   let filter name =
     try
       let subs = Pcre.exec ~rex name in
@@ -1820,7 +1820,9 @@ let rec main ttyname =
   (match config_root_filesystem with
    | Part (dev, p) ->
        let snapshot_dev = snapshot_name dev in
-       sh ("mount " ^ quote ("/dev/mapper/" ^ snapshot_dev) ^ " /mnt/root")
+       sh ("mount "
+          ^ quote ("/dev/mapper/" ^ snapshot_dev ^ p)
+          ^ " /mnt/root")
 
    | (LV _) as lv ->
        (* The LV will be backed by a snapshot device, so just mount
@@ -2051,8 +2053,9 @@ let rec main ttyname =
        with Not_found -> assert false (* internal error *) in
 
       let () =
-       printf (f_ "\nSending /dev/%s (%.3f GB) to remote machine\n\n%!")
-         origin_dev ((Int64.to_float size) /. (1024.*.1024.*.1024.)) in
+       printf (f_ "\nSending %s (%.3f GB) to remote machine\n\n%!")
+         (dev_of_block_device origin_dev)
+         ((Int64.to_float size) /. (1024.*.1024.*.1024.)) in
 
       (* Open the snapshot device. *)
       let fd = openfile ("/dev/mapper/" ^ snapshot_dev) [O_RDONLY] 0 in