Home | History | Annotate | Download | only in EnhancedFatDxe

Lines Matching refs:Entry

2   Functions for performing directory entry io.

19 Get a directory entry from disk for the Ofile.
22 @param IoMode - Indicate whether to read directory entry or write directroy entry.
23 @param EntryPos - The position of the directory entry to be accessed.
24 @param Entry - The directory entry read or written.
26 @retval EFI_SUCCESS - Access the directory entry sucessfully.
27 @return other - An error occurred when reading the directory entry.
36 IN OUT VOID *Entry
48 ((FAT_DIRECTORY_ENTRY *) Entry)->FileName[0] = EMPTY_ENTRY_MARK;
49 ((FAT_DIRECTORY_ENTRY *) Entry)->Attributes = 0;
54 return FatAccessOFile (Parent, IoMode, Position, &BufferSize, Entry, NULL);
59 Save the directory entry to disk.
62 @param DirEnt - The directory entry to be saved.
64 @retval EFI_SUCCESS - Store the directory entry successfully.
65 @return other - An error occurred when writing the directory entry.
85 // Write directory entry
87 Status = FatAccessEntry (OFile, WriteData, EntryPos, &DirEnt->Entry);
94 // Write LFN directory entry
110 LfnEntry.Checksum = FatCheckSum (DirEnt->Entry.FileName);
140 Determine whether the directory entry is "." or ".." entry.
142 @param DirEnt - The corresponding directory entry.
144 @retval TRUE - The directory entry is "." or ".." directory entry
145 @retval FALSE - The directory entry is not "." or ".." directory entry
164 Set the OFile's cluster info in its directory entry.
180 DirEnt->Entry.FileClusterHigh = (UINT16) (Cluster >> 16);
181 DirEnt->Entry.FileCluster = (UINT16) Cluster;
186 Set the OFile's cluster and size info in its directory entry.
197 OFile->DirEnt->Entry.FileSize = (UINT32) OFile->FileSize;
205 @param DirEnt1 - The destination directory entry.
206 @param DirEnt2 - The source directory entry.
217 Entry1 = (UINT8 *) &DirEnt1->Entry;
218 Entry2 = (UINT8 *) &DirEnt2->Entry;
228 Get the LFN for the directory entry.
231 @param DirEnt - The directory entry to get LFN.
251 File8Dot3Name = DirEnt->Entry.FileName;
274 // The directory entry does not have a long file name or
275 // some error occurs when loading long file name for a directory entry,
297 // Fail to get the long file name from long file name entry,
312 Add this directory entry node to the list of directory entries and hash table.
315 @param DirEnt - The directory entry to be added.
334 Load from disk the next directory entry at current end of directory position.
337 @param PtrDirEnt - The directory entry that is loaded.
339 @retval EFI_SUCCESS - Load the directory entry successfully.
354 FAT_DIRECTORY_ENTRY Entry;
369 // Read the next directory entry until we find a valid directory entry (excluding lfn entry)
371 Status = FatAccessEntry (OFile, ReadData, ODir->CurrentEndPos, &Entry);
376 if (((UINT8) Entry.FileName[0] != DELETE_ENTRY_MARK) && (Entry.Attributes & FAT_ATTRIBUTE_VOLUME_ID) == 0) {
378 // We get a valid directory entry, then handle it
386 if (Entry.FileName[0] != EMPTY_ENTRY_MARK) {
392 Entry.FileClusterHigh = 0;
396 // This is a valid directory entry
405 // Remember the directory's entry position on disk
408 CopyMem (&DirEnt->Entry, &Entry, sizeof (FAT_DIRECTORY_ENTRY));
415 // Add this directory entry to directory
419 // Point to next directory entry
436 Get the directory entry's info into Buffer.
439 @param DirEnt - The corresponding directory entry.
461 FAT_DIRECTORY_ENTRY *Entry;
473 Entry = &DirEnt->Entry;
476 if ((Entry->Attributes & FAT_ATTRIBUTE_DIRECTORY) != 0) {
477 Cluster = (Entry->FileClusterHigh << 16) | Entry->FileCluster;
481 Info->FileSize = Entry->FileSize;
482 Info->PhysicalSize = FatPhysicalFileSize (Volume, Entry->FileSize);
486 CopyMem (&FatLastAccess.Date, &Entry->FileLastAccess, sizeof (FatLastAccess.Date));
488 FatFatTimeToEfiTime (&Entry->FileCreateTime, &Info->CreateTime);
489 FatFatTimeToEfiTime (&Entry->FileModificationTime, &Info->ModificationTime);
490 Info->Attribute = Entry->Attributes & EFI_FILE_VALID_ATTR;
500 Search the directory for the directory entry whose filename is FileNameString.
504 @param PtrDirEnt - pointer to the directory entry if found.
506 @retval EFI_SUCCESS - Find the directory entry or not found.
539 // We fail to get the directory entry from hash table; we then
553 if (PossibleShortName && CompareMem (File8Dot3Name, DirEnt->Entry.FileName, FAT_NAME_LEN) == 0) {
586 entry.
589 @param PtrDirEnt - The next directory entry.
591 @retval EFI_SUCCESS - We get the next directory entry successfully.
592 @return other - An error occurred when get next directory entry.
640 Set the directory entry count according to the filename.
643 @param DirEnt - The directory entry to be set.
657 // Get new entry count and set the 8.3 name
661 File8Dot3Name = DirEnt->Entry.FileName;
665 // "." entry
671 // ".." entry
719 @param DirEnt - The returned directory entry of volume label.
734 FAT_DIRECTORY_ENTRY *Entry;
737 Entry = &DirEnt->Entry;
740 Status = FatAccessEntry (Root, ReadData, EntryPos, Entry);
745 if (((UINT8) Entry->FileName[0] != DELETE_ENTRY_MARK) && (((Entry->Attributes) & (~FAT_ATTRIBUTE_ARCHIVE)) == FAT_ATTRIBUTE_VOLUME_ID)) {
753 } while (Entry->FileName[0] != EMPTY_ENTRY_MARK);
759 Use First Fit Algorithm to insert directory entry.
762 when maximum directory entry number has reached.
765 @param DirEnt - The directory entry to be inserted.
767 @retval EFI_SUCCESS - The directory entry has been successfully inserted.
835 Find the new directory entry position for the directory entry.
838 @param DirEnt - The directory entry whose new position is to be set.
840 @retval EFI_SUCCESS - The new directory entry position is successfully found.
842 @return other - An error occurred when reading the directory entry.
869 // We will append this entry to the end of directory
871 FatGetCurrentFatTime (&DirEnt->Entry.FileCreateTime);
872 CopyMem (&DirEnt->Entry.FileModificationTime, &DirEnt->Entry.FileCreateTime, sizeof (FAT_DATE_TIME));
873 CopyMem (&DirEnt->Entry.FileLastAccess, &DirEnt->Entry.FileCreateTime.Date, sizeof (FAT_DATE));
878 // We try to use fist fit algorithm to insert this directory entry
891 // We append our directory entry at the end of directory file
900 Get the directory entry for the volume.
905 @retval EFI_SUCCESS - Update the volume with the directory entry sucessfully.
922 FatNameToStr (LabelDirEnt.Entry.FileName, FAT_NAME_LEN, FALSE, Name);
931 Set the relevant directory entry into disk for the volume.
959 // If there is not the relevant directory entry, create a new one
968 LabelDirEnt.Entry.Attributes = FAT_ATTRIBUTE_VOLUME_ID;
971 SetMem (LabelDirEnt.Entry.FileName, FAT_NAME_LEN, ' ');
972 if (FatStrToFat (Name, FAT_NAME_LEN, LabelDirEnt.Entry.FileName)) {
976 FatGetCurrentFatTime (&LabelDirEnt.Entry.FileModificationTime);
987 @return other - An error occurred when creating the directory entry.
1020 Create a directory entry in the parent OFile.
1023 @param FileName - The filename of the newly-created directory entry.
1024 @param Attributes - The attribute of the newly-created directory entry.
1025 @param PtrDirEnt - The pointer to the newly-created directory entry.
1027 @retval EFI_SUCCESS - The directory entry is successfully created.
1028 @retval EFI_OUT_OF_RESOURCES - Not enough memory to create the directory entry.
1029 @return other - An error occurred when creating the directory entry.
1063 // Determine the file's directory entry position
1071 DirEnt->Entry.Attributes = Attributes;
1073 DEBUG ((EFI_D_INFO, "FSOpen: Created new directory entry '%S'\n", DirEnt->FileString));
1083 Remove this directory entry node from the list of directory entries and hash table.
1086 @param DirEnt - The directory entry to be removed.
1088 @retval EFI_SUCCESS - The directory entry is successfully removed.
1089 @return other - An error occurred when removing the directory entry.
1103 // Move the directory cursor to its previous directory entry
1108 // Remove from directory entry list
1115 DirEnt->Entry.FileName[0] = DELETE_ENTRY_MARK;
1122 Open the directory entry to get the OFile.
1125 @param DirEnt - The directory entry to be opened.
1127 @retval EFI_SUCCESS - The directory entry is successfully opened.
1129 @return other - An error occurred when opening the directory entry.
1143 // Open the directory entry
1161 OFile->FileCluster = ((DirEnt->Entry.FileClusterHigh) << 16) | (DirEnt->Entry.FileCluster);
1179 OFile->FileSize = DirEnt->Entry.FileSize;
1180 if ((DirEnt->Entry.Attributes & FAT_ATTRIBUTE_DIRECTORY) != 0) {
1201 Close the directory entry and free the OFile.
1203 @param DirEnt - The directory entry to be closed.
1232 // Free directory entry itself