0001-console-Fix-a-typo-in-the-EFI-warning-list-in-gnu-ef.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From b00d7f63df7ee6f74a63515f1469768e9cb2aa7a Mon Sep 17 00:00:00 2001
  2. From: Peter Jones <pjones@redhat.com>
  3. Date: Mon, 26 Aug 2019 16:12:05 -0400
  4. Subject: [PATCH] console: Fix a typo in the EFI warning list in gnu-efi
  5. Some versions of gnu-efi have a typo, in which "EFI_WARN_UNKNOWN_GLYPH"
  6. is accidentally "EFI_WARN_UNKOWN_GLYPH". Work around that, so that we
  7. can use the not-silly one in console.c's list of error and warning
  8. messages.
  9. This is a backport from devel for:
  10. commit 5f62b22ccd636d326b3229a2b196118701c6f3f7
  11. Author: Peter Jones <pjones@redhat.com>
  12. Date: Mon Aug 26 16:12:05 2019 -0400
  13. Signed-off-by: Peter Jones <pjones@redhat.com>
  14. Upstream: d230d02f990f02293736dca78b108f86c86d1bd0
  15. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  16. ---
  17. include/console.h | 6 ++++++
  18. lib/console.c | 2 +-
  19. 2 files changed, 7 insertions(+), 1 deletion(-)
  20. diff --git a/include/console.h b/include/console.h
  21. index deb4fa3..00da98d 100644
  22. --- a/include/console.h
  23. +++ b/include/console.h
  24. @@ -7,6 +7,12 @@
  25. #define PrintAt(fmt, ...) \
  26. ({"Do not directly call PrintAt() use console_print_at() instead" = 1;});
  27. +#if !defined(EFI_WARN_UNKNOWN_GLYPH) && defined(EFI_WARN_UNKOWN_GLYPH)
  28. +#define EFI_WARN_UNKNOWN_GLYPH EFI_WARN_UNKOWN_GLYPH
  29. +#elif !defined(EFI_WARN_UNKNOWN_GLYPH)
  30. +#define EFI_WARN_UNKNOWN_GLYPH EFIWARN(1)
  31. +#endif
  32. +
  33. EFI_STATUS
  34. console_get_keystroke(EFI_INPUT_KEY *key);
  35. UINTN
  36. diff --git a/lib/console.c b/lib/console.c
  37. index 3aee41c..ccd4d4d 100644
  38. --- a/lib/console.c
  39. +++ b/lib/console.c
  40. @@ -445,7 +445,7 @@ static struct {
  41. { EFI_SECURITY_VIOLATION, L"Security Violation"},
  42. // warnings
  43. - { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"},
  44. + { EFI_WARN_UNKNOWN_GLYPH, L"Warning Unknown Glyph"},
  45. { EFI_WARN_DELETE_FAILURE, L"Warning Delete Failure"},
  46. { EFI_WARN_WRITE_FAILURE, L"Warning Write Failure"},
  47. { EFI_WARN_BUFFER_TOO_SMALL, L"Warning Buffer Too Small"},
  48. --
  49. 2.30.2