]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c
SecurityPkg/TcgStorageOpalLib: Return AUTHORITY_LOCKED_OUT error.
[mirror_edk2.git] / SecurityPkg / Library / TcgStorageOpalLib / TcgStorageOpalUtil.c
index ca8e7fbbdf1f00ece8efe743d62192f6f738dccd..3c4a8e9001219d58ae176860330cfd1e7ce15a1f 100644 (file)
@@ -788,7 +788,15 @@ OpalUtilUpdateGlobalLockingRange(
 \r
 done:\r
   if (MethodStatus != TCG_METHOD_STATUS_CODE_SUCCESS) {\r
-    Ret = TcgResultFailure;\r
+    if (MethodStatus == TCG_METHOD_STATUS_CODE_AUTHORITY_LOCKED_OUT) {\r
+      //\r
+      // Caller need to know this special error, but return status not has type for it.\r
+      // so here use TcgResultFailureInvalidType as an replacement.\r
+      //\r
+      Ret = TcgResultFailureInvalidType;\r
+    } else {\r
+      Ret = TcgResultFailure;\r
+    }\r
   }\r
   return Ret;\r
 }\r