diff options
Diffstat (limited to 'DcsInt')
-rw-r--r-- | DcsInt/DcsInt.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c index 3fe90d6..46398c9 100644 --- a/DcsInt/DcsInt.c +++ b/DcsInt/DcsInt.c @@ -826,7 +826,9 @@ OnExit( retValue = AsciiStrDecimalToUintn(exitStatusStr);
}
- OnExitGetParam(action, "file", NULL, &fileStr);
+ if (!OnExitGetParam(action, "file", NULL, &fileStr)) {
+ fileStr = NULL;
+ }
if (OnExitGetParam(action, "printinfo", NULL, NULL)) {
@@ -863,12 +865,18 @@ OnExit( EfiCpuHalt();
}
// Try to exec
- res = EfiExec(h, fileStr);
- if (EFI_ERROR(res)) {
- ERR_PRINT(L"\nStart %s - %r\n", fileStr, res);
+ if (fileStr != NULL) {
+ res = EfiExec(h, fileStr);
+ if (EFI_ERROR(res)) {
+ ERR_PRINT(L"\nStart %s - %r\n", fileStr, res);
+ EfiCpuHalt();
+ }
+ }
+ else {
+ ERR_PRINT(L"\nNo EFI execution path specified. Halting!\n");
EfiCpuHalt();
}
- }
+ }
if (fileStr != NULL) {
EfiSetVar(L"DcsExecCmd", NULL, fileStr, (StrLen(fileStr) + 1) * 2, EFI_VARIABLE_BOOTSERVICE_ACCESS);
|