Skip to content

Commit

Permalink
fixup! CP-47001: [xapi-fdcaps]: add operations module and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edwintorok committed Dec 21, 2023
1 parent a75c71c commit 936dc6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/xapi-fdcaps/operations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ let check_output cmd args =
| _ ->
failwith (Printf.sprintf "%s exited nonzero" cmd)

let with_temp_blk ?(sector_size = 512) name f
=
let with_temp_blk ?(sector_size = 512) name f =
let blkdev =
check_output "losetup"
[
Expand Down
5 changes: 1 addition & 4 deletions lib/xapi-fdcaps/operations.mli
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,7 @@ val with_tempfile :
Deletes the temporary file when [f] finishes. *)

val with_temp_blk :
?sector_size:int
-> string
-> (string * ([> rdwr], [> blk]) make -> 'a)
-> 'a
?sector_size:int -> string -> (string * ([> rdwr], [> blk]) make -> 'a) -> 'a
(** [with_temp_blk ?sector_size path f] calls [f (name, fd)] with a name and file descriptor pointing to a block device.
The block device is temporarily created on top of [path].
Expand Down

0 comments on commit 936dc6a

Please sign in to comment.