Create OsIndications if it's missing

This commit is contained in:
Lauri Kenttä
2018-07-19 19:00:24 +03:00
parent 1980e5c05c
commit 449dc6acc6

View File

@@ -170,6 +170,10 @@ public class Efi {
*/
public static void SetBootToFW() {
Variable tmp = GetVariable("OsIndications");
if (tmp.Data == null) {
tmp.Data = new byte[8];
tmp.Attributes = 7;
}
tmp.Data[0] |= 1;
SetVariable(tmp);
}