From: Andreas Reichel <[email protected]>
Signed-off-by: Andreas Reichel <[email protected]>
---
include/utils.h | 1 +
main.c | 3 +++
utils.c | 6 ++++++
3 files changed, 10 insertions(+)
diff --git a/include/utils.h b/include/utils.h
index 8f7b333..d8a7db5 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -43,5 +43,6 @@ EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device,
CHAR16 *payloadpath);
CHAR16 *GetBootMediumPath(CHAR16 *input);
BOOLEAN IsOnBootMedium(EFI_DEVICE_PATH *dp);
+VOID Color(EFI_SYSTEM_TABLE *system_table, char fgcolor, char bgcolor);
#endif // __H_UTILS__
diff --git a/main.c b/main.c
index 8c08df9..9fe8bbe 100644
--- a/main.c
+++ b/main.c
@@ -21,6 +21,7 @@
#include <bootguard.h>
#include <configuration.h>
#include "version.h"
+#include "utils.h"
extern const unsigned long init_array_start[];
extern const unsigned long init_array_end[];
@@ -113,7 +114,9 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle,
EFI_SYSTEM_TABLE *system_table)
this_image = image_handle;
InitializeLib(this_image, system_table);
+ Color(system_table, 3, 0);
Print(L"\nEFI Boot Guard %s\n", L""EFIBOOTGUARD_VERSION);
+ Color(system_table, 7, 0);
status =
uefi_call_wrapper(BS->OpenProtocol, 6, this_image,
diff --git a/utils.c b/utils.c
index 3b0044c..d74cc7c 100644
--- a/utils.c
+++ b/utils.c
@@ -319,3 +319,9 @@ CHAR16 *GetBootMediumPath(CHAR16 *input)
return dst;
}
+
+VOID Color(EFI_SYSTEM_TABLE *system_table, char fgcolor, char bgcolor)
+{
+ EFI_SIMPLE_TEXT_OUT_PROTOCOL *con = system_table->ConOut;
+ (VOID)uefi_call_wrapper(con->SetAttribute, 3, con, (bgcolor << 8) |
fgcolor);
+}
--
2.19.1
--
You received this message because you are subscribed to the Google Groups "EFI
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/efibootguard-dev/20181025153853.27705-2-andreas.reichel.ext%40siemens.com.
For more options, visit https://groups.google.com/d/optout.