Module Console_xen

Text console input/output operations.

include Mirage_console.S
type t

The type representing the internal state of the console.

val disconnect : t -> unit Lwt.t

Disconnect from the console. While this might take some time to complete, it can never result in an error.

include Mirage_flow.S with type flow := t
type error
val pp_error : error Fmt.t
type nonrec write_error = private [>
| Mirage_flow.write_error
]
val pp_write_error : write_error Fmt.t
val read : t -> (Cstruct.t Mirage_flow.or_eoferror) Stdlib.result Lwt.t
val write : t -> Cstruct.t -> (unit, write_error) Stdlib.result Lwt.t
val writev : t -> Cstruct.t list -> (unit, write_error) Stdlib.result Lwt.t
val close : t -> unit Lwt.t
val log : t -> string -> unit Lwt.t

log t str writes str to the console t, appending appropriate line endings. If close was called on the console before, str is discarded silently.

val connect : string -> t Lwt.t