package mirage-block-lwt
Utilities and module definitions for dealing with block devices
Install
Dune Dependency
Authors
Maintainers
Sources
mirage-block-lwt-1.0.0.tbz
sha256=a43b8337b5e1bd71dae9b7f1259b5dc5adad1e523541b4a87e09dab3a57d64f4
md5=c451b6d5dd1d4e7d6a41b1d378c9b906
Description
This library is primarily useful in the context of a Mirage project.
README
Block implementations for mirage
This repo contains generic operations over Mirage BLOCK
devices.
Please consult the API documentation.
Example usage
In a top-level like utop:
# #require "io-page.unix";;
# #require "mirage-block";;
# #require "mirage-block-ramdisk";;
# #require "lwt.syntax";;
# lwt t_or_error = Ramdisk.create ~name:"hello" ~size_sectors:1024L ~sector_size:512;;
val t_or_error : [ `Error of Ramdisk.error | `Ok of Ramdisk.t ] = `Ok <abstr>
# let t = Mirage_block.Error.ok_exn t_or_error;;
val t : Ramdisk.t = <abstr>
# let page = Io_page.(to_cstruct (get 1));;
val page : Ramdisk.page_aligned_buffer =
{Cstruct.buffer = <abstr>; off = 0; len = 4096}
# lwt result_or_error = Ramdisk.read t 0L [ page ];;
val result_or_error : [ `Error of Ramdisk.error | `Ok of unit ] = `Ok ()
# lwt ok_or_error = Mirage_block.sparse_copy (module Ramdisk) t (module Ramdisk) t;;
val ok_or_error :
[ `Error of [> `Different_sizes | `Is_read_only | `Msg of bytes ]
| `Ok of unit ] = `Ok ()
Dependencies (11)
-
result
< "1.5"
-
mirage-block
= "1.0.0"
- logs
-
lwt
>= "2.4.7"
- io-page
-
cstruct
>= "2.0.0" & < "6.0.1"
- base-bytes
-
topkg
build
-
ocamlfind
build
-
ocamlbuild
build
-
ocaml
>= "4.02.0"
Dev Dependencies
None
Used by (10)
-
fat-filesystem
>= "0.12.0" & < "0.14.0"
-
mirage-block-ramdisk
>= "0.3" & < "0.5"
-
mirage-block-solo5
>= "0.2.1" & < "0.6.1"
-
mirage-block-unix
>= "2.5.0" & < "2.12.0"
-
mirage-block-xen
>= "1.5.0" & < "1.7.0"
-
mirage-types-lwt
>= "3.0.0" & < "3.4.0"
-
nbd
>= "3.0.0" & < "6.0.0"
-
qcow
>= "0.8.1" & < "0.11.0"
-
qcow-tool
< "0.11.0"
-
tar-mirage
= "1.1.0"
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page