Files
xen/tools/ocaml/test/dmesg.ml
T
Christian Lindig f99941871a tools/ocaml: cleanup to reduce compiler warnings
This commit cleans up code to reduce compiler warnings:

* remove unused open statements (warning 33)
* remove unused 'rec' declarations (warnign 39)
* remove unused type declarations (warning 34)
* mark unused variables with an underscore (warning 27)
* mark unused value declarations with an underscore (warning 32)

This commit does not include changes to fix compiler warnings 52
(matching against strings in exceptions). These changes have no impact
on functionality.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2018-11-14 18:22:09 +00:00

18 lines
403 B
OCaml

let _ =
Xenlight.register_exceptions ();
let logger = Xtl.create_stdio_logger ~level:Xentoollog.Debug () in
let ctx = Xenlight.ctx_alloc logger in
let open Xenlight.Host in
let reader = xen_console_read_start ctx 0 in
(try
while true do
let line = xen_console_read_line ctx reader in
print_string line
done
with End_of_file -> ());
let _ = xen_console_read_finish ctx reader in
()