When the CONFIG_ACCESS_PROTOCOL.CallBack function return error, the question should restore to old value

Signed-off-by:ydong10
Reviewed-by:lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12518 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-10-09 10:52:54 +00:00
parent 269218a300
commit c4042207d6
1 changed files with 13 additions and 3 deletions

View File

@ -1290,11 +1290,21 @@ ProcessCallBackFunction (
if (Action == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {
SetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);
}
} else if (Status == EFI_UNSUPPORTED) {
} else {
//
// If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.
// According the spec, return fail from call back of "changing" and
// "retrieve", should restore the question's value.
//
Status = EFI_SUCCESS;
if (Action == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {
GetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);
}
if (Status == EFI_UNSUPPORTED) {
//
// If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.
//
Status = EFI_SUCCESS;
}
}
}