mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
efi_selftest: allow to select a single test for execution
Environment variable efi_selftest is passed as load options to the selftest application. It is used to select a single test to be executed. The load options are an UTF8 string. Yet I decided to keep the name propertiy of the tests as char[] to reduce code size. Special value 'list' displays a list of all available tests. Tests get an on_request property. If this property is set the tests are only executed if explicitly requested. The invocation of efi_selftest is changed to reflect that bootefi selftest with efi_selftest = 'list' will call the Exit bootservice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
committed by
Alexander Graf
parent
1f66a12e23
commit
d78e40d651
@@ -142,6 +142,7 @@ void efi_st_printf(const char *fmt, ...)
|
||||
const char *c;
|
||||
u16 *pos = buf;
|
||||
const char *s;
|
||||
const u16 *u;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
@@ -179,9 +180,18 @@ void efi_st_printf(const char *fmt, ...)
|
||||
case 'p':
|
||||
++c;
|
||||
switch (*c) {
|
||||
/* MAC address */
|
||||
case 'm':
|
||||
mac(va_arg(args, void*), &pos);
|
||||
break;
|
||||
|
||||
/* u16 string */
|
||||
case 's':
|
||||
u = va_arg(args, u16*);
|
||||
/* Ensure string fits into buffer */
|
||||
for (; *u && pos < buf + 120; ++u)
|
||||
*pos++ = *u;
|
||||
break;
|
||||
default:
|
||||
--c;
|
||||
pointer(va_arg(args, void*), &pos);
|
||||
|
Reference in New Issue
Block a user