From 2d4d3ab4ed0ee86d46fe2b44ca1e56a3d2916f68 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 8 Nov 2019 23:06:25 +0100 Subject: Fix "ActionFailed" not working and add "ActionCancelled" to customize handling of user hitting ESC on password prompt --- DcsInt/DcsInt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DcsInt') diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c index 8133726..7dd98ec 100644 --- a/DcsInt/DcsInt.c +++ b/DcsInt/DcsInt.c @@ -804,6 +804,7 @@ enum OnExitTypes{ OnExitAuthFaild = 1, OnExitAuthNotFound, OnExitAuthTimeout, + OnExitAuthCancelled, OnExitSuccess }; @@ -976,6 +977,8 @@ OnExit( if (fileStr != NULL) { EfiSetVar(L"DcsExecCmd", NULL, fileStr, (StrLen(fileStr) + 1) * 2, EFI_VARIABLE_BOOTSERVICE_ACCESS); } + + retValue = EFI_DCS_POSTEXEC_REQUESTED; goto exit; } @@ -1185,6 +1188,8 @@ UefiMain( if (EFI_ERROR(res)) { if (res == EFI_TIMEOUT) return OnExit(gOnExitTimeout, OnExitAuthTimeout, res); + else if (res == EFI_DCS_USER_CANCELED) + return OnExit(gOnExitCancelled, OnExitAuthCancelled, res); else return OnExit(gOnExitFailed, OnExitAuthFaild, res); } -- cgit v1.2.3