Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cb49ca4

Browse files
committedAug 31, 2011
[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
·
1 parent df35c76 commit cb49ca4

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed
 

‎lib/block/direct/block.smlpack

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Manager
2-
RO
2+
Types
3+
Simple

‎lib/block/direct/types.ml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module type RO = sig
2+
type t
3+
exception Error
4+
val create : Manager.interface -> t Lwt.t
5+
val iter_s : t -> (string -> unit Lwt.t) -> unit Lwt.t
6+
7+
val size : t -> string -> int64 Lwt.t
8+
val read : t -> string -> Bitstring.t Lwt_stream.t Lwt.t
9+
end

‎lib/os/unix/oS.smlpack

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Console
66
Netif
77
Main
88
Blkif
9+
Types

‎lib/os/unix/types.ml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module type BLKIF = sig
2+
type t
3+
type id = string
4+
5+
val create : (id -> t -> unit Lwt.t) -> unit Lwt.t
6+
val destroy : t -> unit Lwt.t
7+
val read_page : t -> int64 -> Bitstring.t Lwt.t
8+
val sector_size: t -> int
9+
end

0 commit comments

Comments
 (0)
Please sign in to comment.