/* Returns from the EBC stack associated with the Handle parameter. */
EFI_STATUS ReturnEBCStackByHandle(IN EFI_HANDLE Handle)
/* Returns from the EBC stack associated with the Handle parameter. */
EFI_STATUS ReturnEBCStackByHandle(IN EFI_HANDLE Handle)
{
  UINTN  Index;
  for (Index = 0; Index < mStackNum; Index++) {
    if (mStackBufferIndex[Index] == Handle) {
      break;
    }
  }
  if (Index == mStackNum) {
    return EFI_NOT_FOUND;
  }
  mStackBufferIndex[Index] = NULL;
  return EFI_SUCCESS;
}