Show proper message if boot log is empty

This commit is contained in:
Lauri Kenttä
2023-12-20 07:00:03 +02:00
parent c6108ffd62
commit 518d7c8a97

View File

@@ -494,6 +494,9 @@ public class Efi {
public static string GetHackBGRTLog() {
try {
var log = GetVariable("HackBGRTLog", EFI_HACKBGRT_GUID);
if (log.Data == null) {
return "(null)";
}
return new string(BytesToUInt16s(log.Data).Select(i => (char)i).ToArray());
} catch (Exception e) {
return $"Log not found: {e.ToString()}";