1 2let _ = 3 Xenlight.register_exceptions (); 4 let logger = Xtl.create_stdio_logger ~level:Xentoollog.Debug () in 5 let ctx = Xenlight.ctx_alloc logger in 6 7 let open Xenlight.Host in 8 let reader = xen_console_read_start ctx 0 in 9 (try 10 while true do 11 let line = xen_console_read_line ctx reader in 12 print_string line 13 done 14 with End_of_file -> ()); 15 let _ = xen_console_read_finish ctx reader in 16 () 17 18