/* Find the root directory on an UDF volume. */
EFI_STATUS FindRootDirectory(IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN UDF_VOLUME_INFO *Volume, OUT UDF_FILE_INFO *File)
/* Find the root directory on an UDF volume. */
EFI_STATUS FindRootDirectory(IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN UDF_VOLUME_INFO *Volume, OUT UDF_FILE_INFO *File)
{
  EFI_STATUS     Status;
  UDF_FILE_INFO  Parent;
  Status = FindFileEntry (
             BlockIo,
             DiskIo,
             Volume,
             &Volume->FileSetDesc.RootDirectoryIcb,
             &File->FileEntry
             );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  Parent.FileEntry          = File->FileEntry;
  Parent.FileIdentifierDesc = NULL;
  Status = FindFile (
             BlockIo,
             DiskIo,
             Volume,
             L"\\",
             NULL,
             &Parent,
             &Volume->FileSetDesc.RootDirectoryIcb,
             File
             );
  if (EFI_ERROR (Status)) {
    FreePool (File->FileEntry);
  }
  return Status;
}