Deleted Added
full compact
1/*-
2 * Copyright (c) 2000 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef lint
28static const char rcsid[] =
29 "$FreeBSD: head/sys/boot/efi/libefi/efi_console.c 78327 2001-06-16 05:56:13Z obrien $";
30#endif /* not lint */
31
32#include <efi.h>
33#include <efilib.h>
34
35#include "bootstrap.h"
36
37static SIMPLE_TEXT_OUTPUT_INTERFACE *conout;

--- 26 unchanged lines hidden (view full) ---

64
65 conout->OutputString(conout, buf);
66}
67
68int
69efi_cons_getchar()
70{
71 EFI_INPUT_KEY key;
72 UINTN junk;
73
74 BS->WaitForEvent(1, &conin->WaitForKey, &junk);
75 conin->ReadKeyStroke(conin, &key);
76 return key.UnicodeChar;
77}
78
79int
80efi_cons_poll()
81{
82 return BS->CheckEvent(conin->WaitForKey) == EFI_SUCCESS;
83}
84
85struct console efi_console = {
86 "efi",
87 "EFI console",
88 0,
89 efi_cons_probe,
90 efi_cons_init,
91 efi_cons_putchar,
92 efi_cons_getchar,
93 efi_cons_poll
94};