Skip to content

Commit

Permalink
SecurityPkg/TcgStorageOpalLib: Return AUTHORITY_LOCKED_OUT error.
Browse files Browse the repository at this point in the history
Caller need to known this error to handle specially, but current
error status not has specified value for this type. In order to
keep compatibility, here use TcgResultFailureInvalidType as an
replacement.

Cc: Hao Wu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Hao Wu <[email protected]>
  • Loading branch information
ydong10 committed Jul 11, 2018
1 parent 9edba51 commit 54ae532
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,15 @@ OpalUtilUpdateGlobalLockingRange(

done:
if (MethodStatus != TCG_METHOD_STATUS_CODE_SUCCESS) {
Ret = TcgResultFailure;
if (MethodStatus == TCG_METHOD_STATUS_CODE_AUTHORITY_LOCKED_OUT) {
//
// Caller need to know this special error, but return status not has type for it.
// so here use TcgResultFailureInvalidType as an replacement.
//
Ret = TcgResultFailureInvalidType;
} else {
Ret = TcgResultFailure;
}
}
return Ret;
}
Expand Down

0 comments on commit 54ae532

Please sign in to comment.