/* Convert HII value to the string in HII one-of opcode. */
EFI_STRING_ID HiiValueToOneOfOptionStringId(IN HII_STATEMENT *HiiStatement, IN HII_STATEMENT_VALUE *Value)
/* Convert HII value to the string in HII one-of opcode. */
EFI_STRING_ID HiiValueToOneOfOptionStringId(IN HII_STATEMENT *HiiStatement, IN HII_STATEMENT_VALUE *Value)
{
  LIST_ENTRY           *Link;
  HII_QUESTION_OPTION  *Option;
  if ((HiiStatement == NULL) || (Value == NULL)) {
    return 0;
  }
  if (HiiStatement->Operand != EFI_IFR_ONE_OF_OP) {
    return 0;
  }
  if (IsListEmpty (&HiiStatement->OptionListHead)) {
    return 0;
  }
  Link = GetFirstNode (&HiiStatement->OptionListHead);
  while (!IsNull (&HiiStatement->OptionListHead, Link)) {
    Option = HII_QUESTION_OPTION_FROM_LINK (Link);
    if (CompareHiiStatementValue (Value, &Option->Value) == 0) {
      return Option->Text;
    }
    Link = GetNextNode (&HiiStatement->OptionListHead, Link);
  }
  return 0;
}