Skip to content

Commit

Permalink
Merge pull request #13 from euanh/master
Browse files Browse the repository at this point in the history
vhd-tool fixes
  • Loading branch information
djs55 committed Apr 9, 2014
2 parents 42aaec1 + 0758153 commit a832702
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.7.3 (2014-04-04)
* sparse_dd: Fix references to Vhd_lwt.File.use_unbuffered

0.7.2 (2014-02-03)
* sparse_dd: extra config file options to use ionice

Expand Down
3 changes: 2 additions & 1 deletion src/impl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ let serve_tar_to_raw total_size c dest prezeroed progress expected_prefix ignore
else
let p_len = String.length p in
let file_name_len = String.length hdr.Tar.Header.file_name in
return (String.sub hdr.Tar.Header.file_name p_len (file_name_len - p_len)) ) >>= fun filename ->
let filename = String.sub hdr.Tar.Header.file_name p_len (file_name_len - p_len) in
return (Filename.basename filename)) >>= fun filename ->
let zero = Cstruct.sub header 0 (Tar.Header.compute_zero_padding_length hdr) in
(* either 'counter' or 'counter.checksum' *)
if endswith ".checksum" filename then begin
Expand Down
4 changes: 2 additions & 2 deletions src/sparse_dd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ let options =
name, Arg.String (fun x -> var_ref := Some x), (fun () -> string_opt !var_ref), description
in
[
"unbuffered", Arg.Bool (fun b -> File.use_unbuffered := b), (fun () -> string_of_bool !File.use_unbuffered), "use unbuffered I/O via O_DIRECT";
"unbuffered", Arg.Bool (fun b -> Vhd_lwt.File.use_unbuffered := b), (fun () -> string_of_bool !Vhd_lwt.File.use_unbuffered), "use unbuffered I/O via O_DIRECT";
"encryption-mode", Arg.String (fun x -> encryption_mode := encryption_mode_of_string x), (fun () -> string_of_encryption_mode !encryption_mode), "how to use encryption";
(* Want to ignore bad values for "nice" etc. so not using Arg.Int *)
str_option "nice" nice "If supplied, the scheduling priority will be set using this value as argument to the 'nice' command.";
Expand Down Expand Up @@ -214,7 +214,7 @@ let progress_cb =
last_percent := new_percent

let _ =
File.use_unbuffered := true;
Vhd_lwt.File.use_unbuffered := true;
Xcp_service.configure ~options ();

let src = match !src with
Expand Down

0 comments on commit a832702

Please sign in to comment.