From: Janne Grunau <j...@jannau.net>

Draw symbols from code page 437 code points 0x01 - 01f used by UEFI
applications to draw user interfaces using
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.

Add a simple test to displaying the Konami code using symbols used by
grub2. The output has to be checked manually on the screen for
correctness.

Signed-off-by: Janne Grunau <j...@jannau.net>
---
 lib/efi_selftest/efi_selftest_textoutput.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/efi_selftest/efi_selftest_textoutput.c 
b/lib/efi_selftest/efi_selftest_textoutput.c
index cc11a22eee..9e5d944fa0 100644
--- a/lib/efi_selftest/efi_selftest_textoutput.c
+++ b/lib/efi_selftest/efi_selftest_textoutput.c
@@ -46,6 +46,8 @@ u"left bottom \u2502 right bottom  
\u2502\n\u2514\u2500\u2500\u2500"
 u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534"
 u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"
 u"\u2500\u2500\u2500\u2500\u2518\n";
+       const u16 konami[] =
+u"Konami code: \u25b2 \u25b2 \u25bc \u25bc \u25c4 \u25ba \u25c4 \u25ba B A\n";
 
        /* SetAttribute */
        efi_st_printf("\nColor palette\n");
@@ -144,6 +146,11 @@ u"\u2500\u2500\u2500\u2500\u2518\n";
                efi_st_error("OutputString failed for box drawing chars\n");
                return EFI_ST_FAILURE;
        }
+       ret = con_out->output_string(con_out, konami);
+       if (ret != EFI_ST_SUCCESS) {
+               efi_st_error("OutputString failed for symbol chars\n");
+               return EFI_ST_FAILURE;
+       }
        con_out->output_string(con_out, u"waiting for admiration...\n");
        EFI_CALL(systab.boottime->stall(3000000));
        efi_st_printf("\n");

-- 
2.43.0

Reply via email to