/* 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. */
UINT8* GetBufferForValue(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. */
UINT8* GetBufferForValue(IN EFI_HII_VALUE *Value)
{
  if (Value == NULL) {
    return NULL;
  }
  switch (Value->Type) {
    case EFI_IFR_TYPE_BUFFER:
      return Value->Buffer;
    case EFI_IFR_TYPE_DATE:
      return (UINT8 *)(&Value->Value.date);
    case EFI_IFR_TYPE_TIME:
      return (UINT8 *)(&Value->Value.time);
    case EFI_IFR_TYPE_REF:
      return (UINT8 *)(&Value->Value.ref);
    default:
      return NULL;
  }
}