diff options
Diffstat (limited to 'tools/ocaml/xenstored/connection.ml')
-rw-r--r-- | tools/ocaml/xenstored/connection.ml | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml index 70cdbbfa91..e149a5b6f6 100644 --- a/tools/ocaml/xenstored/connection.ml +++ b/tools/ocaml/xenstored/connection.ml @@ -27,7 +27,7 @@ type watch = { } and t = { - xb: Xb.t; + xb: Xenbus.Xb.t; dom: Domain.t option; transactions: (int, Transaction.t) Hashtbl.t; mutable next_tid: int; @@ -93,10 +93,10 @@ let create xbcon dom = Logging.new_connection ~tid:Transaction.none ~con:(get_domstr con); con -let get_fd con = Xb.get_fd con.xb +let get_fd con = Xenbus.Xb.get_fd con.xb let close con = Logging.end_connection ~tid:Transaction.none ~con:(get_domstr con); - Xb.close con.xb + Xenbus.Xb.close con.xb let get_perm con = con.perm @@ -108,9 +108,9 @@ let set_target con target_domid = con.perm <- Perms.Connection.set_target (get_perm con) ~perms:[Perms.READ; Perms.WRITE] target_domid let send_reply con tid rid ty data = - Xb.queue con.xb (Xb.Packet.create tid rid ty data) + Xenbus.Xb.queue con.xb (Xenbus.Xb.Packet.create tid rid ty data) -let send_error con tid rid err = send_reply con tid rid Xb.Op.Error (err ^ "\000") +let send_error con tid rid err = send_reply con tid rid Xenbus.Xb.Op.Error (err ^ "\000") let send_ack con tid rid ty = send_reply con tid rid ty "OK\000" let get_watch_path con path = @@ -166,7 +166,7 @@ let list_watches con = let fire_single_watch watch = let data = Utils.join_by_null [watch.path; watch.token; ""] in - send_reply watch.con Transaction.none 0 Xb.Op.Watchevent data + send_reply watch.con Transaction.none 0 Xenbus.Xb.Op.Watchevent data let fire_watch watch path = let new_path = @@ -179,7 +179,7 @@ let fire_watch watch path = path in let data = Utils.join_by_null [ new_path; watch.token; "" ] in - send_reply watch.con Transaction.none 0 Xb.Op.Watchevent data + send_reply watch.con Transaction.none 0 Xenbus.Xb.Op.Watchevent data let find_next_tid con = let ret = con.next_tid in con.next_tid <- con.next_tid + 1; ret @@ -203,15 +203,15 @@ let end_transaction con tid commit = let get_transaction con tid = Hashtbl.find con.transactions tid -let do_input con = Xb.input con.xb -let has_input con = Xb.has_in_packet con.xb -let pop_in con = Xb.get_in_packet con.xb -let has_more_input con = Xb.has_more_input con.xb +let do_input con = Xenbus.Xb.input con.xb +let has_input con = Xenbus.Xb.has_in_packet con.xb +let pop_in con = Xenbus.Xb.get_in_packet con.xb +let has_more_input con = Xenbus.Xb.has_more_input con.xb -let has_output con = Xb.has_output con.xb -let has_new_output con = Xb.has_new_output con.xb -let peek_output con = Xb.peek_output con.xb -let do_output con = Xb.output con.xb +let has_output con = Xenbus.Xb.has_output con.xb +let has_new_output con = Xenbus.Xb.has_new_output con.xb +let peek_output con = Xenbus.Xb.peek_output con.xb +let do_output con = Xenbus.Xb.output con.xb let incr_ops con = con.stat_nb_ops <- con.stat_nb_ops + 1 |