SecurityPkg/TcgStorageOpalLib: Return AUTHORITY_LOCKED_OUT error.

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 <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
Eric Dong 2018-07-10 10:24:30 +08:00
parent 9edba51f93
commit 54ae532cd4
1 changed files with 9 additions and 1 deletions

View File

@ -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;
}