mirror of
https://github.com/Metabolix/HackBGRT.git
synced 2025-12-06 17:15:42 -08:00
Don't require Windows Boot Manager entry if it's not needed
This commit is contained in:
@@ -206,9 +206,6 @@ public class EfiBootEntries {
|
|||||||
*/
|
*/
|
||||||
public void MakeOwnEntry(bool alwaysCopyFromMS, bool dryRun = false) {
|
public void MakeOwnEntry(bool alwaysCopyFromMS, bool dryRun = false) {
|
||||||
var (msNum, msVar, msEntry) = WindowsEntry;
|
var (msNum, msVar, msEntry) = WindowsEntry;
|
||||||
if (msEntry == null) {
|
|
||||||
throw new Exception("MakeOwnEntry: Windows Boot Manager not found.");
|
|
||||||
}
|
|
||||||
var (ownNum, ownVar, ownEntry) = OwnEntry;
|
var (ownNum, ownVar, ownEntry) = OwnEntry;
|
||||||
if (ownVar == null) {
|
if (ownVar == null) {
|
||||||
(ownNum, ownVar, ownEntry) = FreeEntry;
|
(ownNum, ownVar, ownEntry) = FreeEntry;
|
||||||
@@ -236,6 +233,9 @@ public class EfiBootEntries {
|
|||||||
ownEntry.Arguments = new byte[0];
|
ownEntry.Arguments = new byte[0];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (msEntry == null) {
|
||||||
|
throw new Exception("MakeOwnEntry: Windows Boot Manager not found.");
|
||||||
|
}
|
||||||
ownEntry = msEntry;
|
ownEntry = msEntry;
|
||||||
ownEntry.Arguments = new byte[0];
|
ownEntry.Arguments = new byte[0];
|
||||||
ownEntry.Label = "HackBGRT";
|
ownEntry.Label = "HackBGRT";
|
||||||
|
|||||||
Reference in New Issue
Block a user