]> xenbits.xensource.com Git - people/aperard/mini-os.git/commit
use file_ops and get_file_from_fd() for console
authorJuergen Gross <jgross@suse.com>
Sun, 16 Jan 2022 08:33:25 +0000 (09:33 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Jan 2022 18:26:43 +0000 (18:26 +0000)
commit02d4145d14d3d77d92cb2b31aae90f64fe213369
tree1d697389a3c40324221c2a9d2e60b09e09ae18d2
parent44bd6fe4c1a4ec06cc1613d51fa19113693d49b5
use file_ops and get_file_from_fd() for console

Add struct file_ops for the console related file types (FTYPE_CONSOLE
and savefile). FTYPE_CONSOLE remains statically defined, as it is used
to statically init stdin, stdout and stderr.

Instead of directly accessing the files[] array use get_file_from_fd().

With CONSOLE now handled via file_ops the bogus file descriptor case in
select_poll() now needs to be handled more explicit instead of dropping
into console handling, assuming that this case was basically meant to
cover SAVEFILE.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
console/console.c
console/xenbus.c
console/xencons_ring.c
include/console.h
include/lib.h
lib/sys.c