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]> --- SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c index 756f9b8f2d..b738ab91ee 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c @@ -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; } -- 2.15.0.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

