From: Wei Liu Date: Wed, 7 Feb 2018 17:09:34 +0000 (+0000) Subject: ocaml/libs/xb: don't generate *.mli automatically X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~610 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c93014ad3aa6aa88dfa5e96f66e8adb561483b8d;p=xen.git ocaml/libs/xb: don't generate *.mli automatically To stay in line with other parts of the ocaml code base. This requires committing a bunch of mli files in tree. Signed-off-by: Wei Liu Acked-by: Christian Lindig --- diff --git a/tools/ocaml/libs/xb/Makefile b/tools/ocaml/libs/xb/Makefile index 09d1bc8946..be4499147e 100644 --- a/tools/ocaml/libs/xb/Makefile +++ b/tools/ocaml/libs/xb/Makefile @@ -39,10 +39,6 @@ xenbus.cmo : $(foreach obj, $(OBJS), $(obj).cmo) $(E) " CMO $@" $(OCAMLC) -pack -o $@ $^ -%.mli: %.ml - $(E) " MLI $@" - $(Q)$(OCAMLC) $(OCAMLINCLUDE) -i $< $o - .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) diff --git a/tools/ocaml/libs/xb/op.mli b/tools/ocaml/libs/xb/op.mli new file mode 100644 index 0000000000..ecabfff0d1 --- /dev/null +++ b/tools/ocaml/libs/xb/op.mli @@ -0,0 +1,29 @@ +type operation = + Debug + | Directory + | Read + | Getperms + | Watch + | Unwatch + | Transaction_start + | Transaction_end + | Introduce + | Release + | Getdomainpath + | Write + | Mkdir + | Rm + | Setperms + | Watchevent + | Error + | Isintroduced + | Resume + | Set_target + | Reset_watches + | Invalid +val operation_c_mapping : operation array +val size : int +val array_search : 'a -> 'a array -> int +val of_cval : int -> operation +val to_cval : operation -> int +val to_string : operation -> string diff --git a/tools/ocaml/libs/xb/packet.mli b/tools/ocaml/libs/xb/packet.mli new file mode 100644 index 0000000000..f4e53c73a8 --- /dev/null +++ b/tools/ocaml/libs/xb/packet.mli @@ -0,0 +1,13 @@ +type t = { tid : int; rid : int; ty : Op.operation; data : string; } +exception Error of string +exception DataError of string +external string_of_header : int -> int -> int -> int -> string + = "stub_string_of_header" +val create : int -> int -> Op.operation -> string -> t +val of_partialpkt : Partial.pkt -> t +val to_string : t -> string +val unpack : t -> int * int * Op.operation * string +val get_tid : t -> int +val get_ty : t -> Op.operation +val get_data : t -> string +val get_rid : t -> int diff --git a/tools/ocaml/libs/xb/partial.mli b/tools/ocaml/libs/xb/partial.mli new file mode 100644 index 0000000000..359a75e88d --- /dev/null +++ b/tools/ocaml/libs/xb/partial.mli @@ -0,0 +1,14 @@ +type pkt = { + tid : int; + rid : int; + ty : Op.operation; + len : int; + buf : Buffer.t; +} +external header_size : unit -> int = "stub_header_size" +external header_of_string_internal : string -> int * int * int * int + = "stub_header_of_string" +val xenstore_payload_max : int +val of_string : string -> pkt +val append : pkt -> string -> int -> unit +val to_complete : pkt -> int