Permalink
Browse files

[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...
1 parent df35c76 commit cb49ca40c0a62dd29bf0546d31c8e2945089dd76 @avsm committed Aug 31, 2011
Showing with 21 additions and 1 deletion.
  1. +2 −1 lib/block/direct/block.smlpack
  2. +9 −0 lib/block/direct/types.ml
  3. +1 −0 lib/os/unix/oS.smlpack
  4. +9 −0 lib/os/unix/types.ml
@@ -1,2 +1,3 @@
Manager
-RO
+Types
+Simple
@@ -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
View
@@ -6,3 +6,4 @@ Console
Netif
Main
Blkif
+Types
View
@@ -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

0 comments on commit cb49ca4

Please sign in to comment.