mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-02 17:41:08 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* efi_selftest_textoutput
|
|
*
|
|
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
|
|
*
|
|
* Test the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
|
|
*
|
|
* The following services are tested:
|
|
* OutputString, TestString, SetAttribute.
|
|
*/
|
|
|
|
#include <efi_selftest.h>
|
|
|
|
/*
|
|
* Execute unit test.
|
|
*
|
|
* @return: EFI_ST_SUCCESS for success
|
|
*/
|
|
static int execute(void)
|
|
{
|
|
size_t foreground;
|
|
size_t background;
|
|
size_t attrib;
|
|
efi_status_t ret;
|
|
|
|
/* SetAttribute */
|
|
efi_st_printf("\nColor palette\n");
|
|
for (foreground = 0; foreground < 0x10; ++foreground) {
|
|
for (background = 0; background < 0x80; background += 0x10) {
|
|
attrib = foreground | background;
|
|
con_out->set_attribute(con_out, attrib);
|
|
efi_st_printf("%p", (void *)attrib);
|
|
}
|
|
con_out->set_attribute(con_out, 0);
|
|
efi_st_printf("\n");
|
|
}
|
|
/* TestString */
|
|
ret = con_out->test_string(con_out,
|
|
L" !\"#$%&'()*+,-./0-9:;<=>?@A-Z[\\]^_`a-z{|}~\n");
|
|
if (ret != EFI_ST_SUCCESS) {
|
|
efi_st_error("TestString failed for ANSI characters\n");
|
|
return EFI_ST_FAILURE;
|
|
}
|
|
return EFI_ST_SUCCESS;
|
|
}
|
|
|
|
EFI_UNIT_TEST(textoutput) = {
|
|
.name = "text output",
|
|
.phase = EFI_EXECUTE_BEFORE_BOOTTIME_EXIT,
|
|
.execute = execute,
|
|
};
|