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
let () =
printf (f_ "\nSending /dev/%s (%.3f GB) to remote machine\n\n%!")
- origin_dev ((Int64.to_float size) /. (1024.*.1024.*.1024.)) in
+ (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