MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / console_write_c

Function console_write_c

loader/efi/include/debug.h:76–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static inline void
77console_write_c(char const c)
78{
79 char buf[4] = {0};
80
81 if (c == '\n') {
82 console_write("\r\n");
83 return;
84 }
85
86 if (c == '\r') {
87 return;
88 }
89
90 /**
91 * NOTE:
92 * - We cannot simply send the string to OutputString as it is expecting
93 * a unicode string.
94 * - The minimum sized unicode string is one character (2 bytes) and a
95 * second character for the \0, which is why we have a 4 byte array.
96 * One byte to store the character we wish to print, and a second to
97 * tell OutputString to stop.
98 * - This, of course would not be needed if EFI has a character output
99 * function, which is basically what this function needs to emulate.
100 */
101
102 buf[0] = c;
103 g_st->ConOut->OutputString(g_st->ConOut, ((CHAR16 *)buf));
104}
105
106/**
107 * <!-- description -->

Callers 1

platform_dump_vmmFunction · 0.85

Calls 1

console_writeFunction · 0.85

Tested by

no test coverage detected