summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2018-07-10 10:24:30 +0800
committerEric Dong <eric.dong@intel.com>2018-07-11 11:12:20 +0800
commit54ae532cd4fded97a2a9f55eb87fab86063a0f07 (patch)
treef4c3e37569ed31e8c473b58b373d483d78fabc55 /SecurityPkg
parent9edba51f93d8e81e09f905afc994efe02dbe524e (diff)
downloadedk2-54ae532cd4fded97a2a9f55eb87fab86063a0f07.tar.gz
edk2-54ae532cd4fded97a2a9f55eb87fab86063a0f07.tar.bz2
edk2-54ae532cd4fded97a2a9f55eb87fab86063a0f07.zip
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>
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c
index ca8e7fbbdf..3c4a8e9001 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;
}