Skip to content

Commit

Permalink
Place UefiSeven.skiperrors in the same directory to ignore any warnin…
Browse files Browse the repository at this point in the history
…gs and errors during boot
  • Loading branch information
manatails committed Aug 6, 2020
1 parent 5e84f3f commit 3c16e04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions MdeModulePkg/Application/UefiSeven/UefiSeven.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ DISPLAY_INFO DisplayInfo;
EFI_HANDLE UefiSevenImage;
EFI_LOADED_IMAGE_PROTOCOL *UefiSevenImageInfo;
BOOLEAN VerboseMode = FALSE;
BOOLEAN SkipErrors = FALSE;


/**
Expand Down Expand Up @@ -60,6 +61,7 @@ UefiMain (
CHAR16 *LaunchPath = NULL;
CHAR16 *EfiFilePath = NULL;
CHAR16 *VerboseFilePath = NULL;
CHAR16 *SkipFilePath = NULL;

//
// Claim real mode IVT memory area before any allocation can
Expand All @@ -79,6 +81,16 @@ UefiMain (
goto Exit;
}

//
// Check if we should skip warnings and prompts
//
EfiFilePath = PathCleanUpDirectories(ConvertDevicePathToText(UefiSevenImageInfo->FilePath, FALSE, FALSE));
Status = GetFilenameInSameDirectory(EfiFilePath, L"UefiSeven.skiperrors", (VOID **)&SkipFilePath);
FreePool(EfiFilePath);
if (!EFI_ERROR(Status) && FileExists(SkipFilePath)) {
SkipErrors = TRUE;
}

//
// Check if we should run in verbose mode (directory contains .verbose file or 'v' is pressed).
//
Expand Down Expand Up @@ -122,7 +134,8 @@ UefiMain (
PrintError(L"It is likely that Windows might fail to boot even with the handler installed.\n");
PrintError(L"Press Enter to try a new 'hack' that will force the display driver to work.\n");
PrintError(L"The display might be glitchy but it will be able to provide a workable screen.\n");
WaitForEnter(FALSE);
if(!SkipErrors)
WaitForEnter(FALSE);
ForceVideoModeHack(1024, 768);
}

Expand Down Expand Up @@ -199,7 +212,8 @@ UefiMain (
IvtInt10hHandlerEntry->Segment, IvtInt10hHandlerEntry->Offset,
NewInt10hHandlerEntry.Segment, NewInt10hHandlerEntry.Offset);
PrintError(L"Press Enter to try to continue.\n");
WaitForEnter(FALSE);
if(!SkipErrors)
WaitForEnter(FALSE);
}

//
Expand All @@ -210,7 +224,8 @@ UefiMain (
} else {
PrintError(L"Pre-boot Int10h sanity check failed\n");
PrintError(L"Press Enter to continue.\n");
WaitForEnter(FALSE);
if(!SkipErrors)
WaitForEnter(FALSE);
}

Exit:
Expand Down
2 changes: 1 addition & 1 deletion MdeModulePkg/Application/UefiSeven/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
#ifndef __VERSION_H
#define __VERSION_H

#define VERSION L"1.21"
#define VERSION L"1.22"

#endif

0 comments on commit 3c16e04

Please sign in to comment.