/* Check whether a node has the input name. */
STATIC BOOLEAN EFIAPI FdtNodeHasName(IN CONST VOID *Fdt, IN INT32 Node, IN CONST VOID *SearchName)
/* Check whether a node has the input name. */
STATIC BOOLEAN EFIAPI FdtNodeHasName(IN CONST VOID *Fdt, IN INT32 Node, IN CONST VOID *SearchName)
{
  CONST CHAR8  *NodeName;
  UINT32       Length;
  if ((Fdt == NULL) ||
      (SearchName == NULL))
  {
    ASSERT (0);
    return FALSE;
  }
  Length = (UINT32)AsciiStrLen (SearchName);
  NodeName = fdt_offset_ptr (Fdt, Node + FDT_TAGSIZE, Length + 1);
  if (NodeName == NULL) {
    return FALSE;
  }
  if (Length > AsciiStrLen (NodeName)) {
    return FALSE;
  }
  if (AsciiStrnCmp (NodeName, SearchName, Length) != 0) {
    return FALSE;
  }
  if ((NodeName[Length] == '\0') ||
      (NodeName[Length] == '@'))
  {
    return TRUE;
  }
  return FALSE;
}