diff options
author | Eric Dong <eric.dong@intel.com> | 2018-07-10 10:24:30 +0800 |
---|---|---|
committer | Eric Dong <eric.dong@intel.com> | 2018-07-11 11:12:20 +0800 |
commit | 54ae532cd4fded97a2a9f55eb87fab86063a0f07 (patch) | |
tree | f4c3e37569ed31e8c473b58b373d483d78fabc55 /SecurityPkg/Library/TcgStorageOpalLib | |
parent | 9edba51f93d8e81e09f905afc994efe02dbe524e (diff) | |
download | edk2-54ae532cd4fded97a2a9f55eb87fab86063a0f07.zip edk2-54ae532cd4fded97a2a9f55eb87fab86063a0f07.tar.gz edk2-54ae532cd4fded97a2a9f55eb87fab86063a0f07.tar.bz2 |
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/Library/TcgStorageOpalLib')
-rw-r--r-- | SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c index ca8e7fb..3c4a8e9 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;
}
|