efi_loader: EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 5 Jul 2018 06:17:59 +0000 (08:17 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 25 Jul 2018 12:59:44 +0000 (14:59 +0200)
Implement the reset service of the EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

This should resolve the error reported by the SCT in
Protocol/SimpleTextIn/BlackBoxTest/SimpleTextInBBTestFunction.c:193

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_console.c

index ce66c935ecbf7cff0eb019712c465c4cf2a7d2da..1d5275345695fe6b0e9d58b89553348c79b0a857 100644 (file)
@@ -381,7 +381,12 @@ static efi_status_t EFIAPI efi_cin_reset(
                        bool extended_verification)
 {
        EFI_ENTRY("%p, %d", this, extended_verification);
-       return EFI_EXIT(EFI_UNSUPPORTED);
+
+       /* Empty input buffer */
+       while (tstc())
+               getc();
+
+       return EFI_EXIT(EFI_SUCCESS);
 }
 
 /*