diff mbox

[U-Boot,3/3] efi_loader: no debug message on wait for key

Message ID 20170705174715.28626-4-xypron.glpk@gmx.de
State Rejected
Delegated to: Alexander Graf
Headers show

Commit Message

Heinrich Schuchardt July 5, 2017, 5:47 p.m. UTC
If efi_check_event is called in a loop waiting for keyboard input
the screen is flooded with debug messages.

So only write debug message for other events.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/efi_loader/efi_boottime.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Alexander Graf July 12, 2017, 11:05 a.m. UTC | #1
On 05.07.17 19:47, Heinrich Schuchardt wrote:
> If efi_check_event is called in a loop waiting for keyboard input
> the screen is flooded with debug messages.
> 
> So only write debug message for other events.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Hm, I don't really like that patch :). Is there no other way? Maybe we 
should add a verbosity level to EFI_ENTRY()?

Alex

> ---
>   lib/efi_loader/efi_boottime.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index f509d457a7..ec29143306 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -341,7 +341,12 @@ static efi_status_t EFIAPI efi_check_event(void *event)
>   {
>   	int i;
>   
> -	EFI_ENTRY("%p", event);
> +	/* Dont spam us on wait for key */
> +	if (event == &efi_events[0])
> +		efi_restore_gd();
> +	else
> +		EFI_ENTRY("%p", event);
> +
>   	efi_timer_check();
>   	for (i = 0; i < ARRAY_SIZE(efi_events); ++i) {
>   		if (event != &efi_events[i])
>
diff mbox

Patch

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index f509d457a7..ec29143306 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -341,7 +341,12 @@  static efi_status_t EFIAPI efi_check_event(void *event)
 {
 	int i;
 
-	EFI_ENTRY("%p", event);
+	/* Dont spam us on wait for key */
+	if (event == &efi_events[0])
+		efi_restore_gd();
+	else
+		EFI_ENTRY("%p", event);
+
 	efi_timer_check();
 	for (i = 0; i < ARRAY_SIZE(efi_events); ++i) {
 		if (event != &efi_events[i])