Skip to content
Browse files

[xen] provider skeleton for blkif

  • Loading branch information...
1 parent 7966d6e commit 359c52543da6ef5e60125aed0e34b675b3a930bd @avsm committed Sep 15, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 lib/os/xen/blkif.ml
View
22 lib/os/xen/blkif.ml
@@ -339,3 +339,25 @@ let read_512 t sector num_sectors =
)
)
)
+
+let provider_t () =
+ let plug_mvar = Lwt_mvar.create_empty () in
+ let unplug_mvar = Lwt_mvar.create_empty () in
+ let provider = object(self)
+ method id = "Xen.Blkif"
+ method plug = plug_mvar
+ method unplug = unplug_mvar
+ method create ~deps ~cfg id =
+ lwt blkif = create ~id in
+ let entry = Devices.({
+ provider=self;
+ id=self#id;
+ depends=[];
+ node=Blkif blkif }) in
+ return entry
+ end in
+ (* Watch xenstore *)
+ Main.at_enter (fun () ->
+ (* TODO *)
+ return ()
+ )

0 comments on commit 359c525

Please sign in to comment.
Something went wrong with that request. Please try again.