forked from mirage/mirage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OS] Add a module type in OS.Types, just defining BLKIF for now. This…
… may not be the right place for it, but it'll do for now. Also define a similar module type for a readonly filesystem in block/direct
- Loading branch information
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Manager | ||
RO | ||
Types | ||
Simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module type RO = sig | ||
type t | ||
exception Error | ||
val create : Manager.interface -> t Lwt.t | ||
val iter_s : t -> (string -> unit Lwt.t) -> unit Lwt.t | ||
|
||
val size : t -> string -> int64 Lwt.t | ||
val read : t -> string -> Bitstring.t Lwt_stream.t Lwt.t | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ Console | |
Netif | ||
Main | ||
Blkif | ||
Types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module type BLKIF = sig | ||
type t | ||
type id = string | ||
|
||
val create : (id -> t -> unit Lwt.t) -> unit Lwt.t | ||
val destroy : t -> unit Lwt.t | ||
val read_page : t -> int64 -> Bitstring.t Lwt.t | ||
val sector_size: t -> int | ||
end |