/* EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. */
UINT16 GetLengthForValue(IN EFI_HII_VALUE *Value)
/* EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. */
UINT16 GetLengthForValue(IN EFI_HII_VALUE *Value)
{
  switch (Value->Type) {
    case EFI_IFR_TYPE_BUFFER:
      return Value->BufferLen;
    case EFI_IFR_TYPE_DATE:
      return (UINT16)sizeof (EFI_HII_DATE);
    case EFI_IFR_TYPE_TIME:
      return (UINT16)sizeof (EFI_HII_TIME);
    case EFI_IFR_TYPE_REF:
      return (UINT16)sizeof (EFI_HII_REF);
    default:
      return 0;
  }
}