X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FLibrary%2FTcgStorageOpalLib%2FTcgStorageOpalUtil.c;h=3c4a8e9001219d58ae176860330cfd1e7ce15a1f;hp=ca8e7fbbdf1f00ece8efe743d62192f6f738dccd;hb=54ae532cd4fded97a2a9f55eb87fab86063a0f07;hpb=9edba51f93d8e81e09f905afc994efe02dbe524e 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; }