Home | History | Annotate | Download | only in EnhancedFatDxe

Lines Matching refs:OFile

27   @retval EFI_DEVICE_ERROR      - Can not find the OFile for the file.

39 FAT_OFILE *OFile;
42 OFile = IFile->OFile;
44 if (OFile->Error == EFI_NOT_FOUND) {
48 if (OFile->ODir != NULL) {
64 @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.
76 FAT_OFILE *OFile;
79 OFile = IFile->OFile;
81 if (OFile->Error == EFI_NOT_FOUND) {
90 if (OFile->ODir != NULL) {
98 FatResetODirCursor (OFile);
104 Position = OFile->FileSize;
133 FAT_OFILE *OFile;
138 OFile = IFile->OFile;
139 ODir = OFile->ODir;
149 FatResetODirCursor (OFile);
155 Status = FatGetNextDirEnt (OFile, &DirEnt);
165 Status = FatGetDirEntInfo (OFile->Volume, DirEnt, BufferSize, Buffer);
193 @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.
211 FAT_OFILE *OFile;
217 OFile = IFile->OFile;
218 Volume = OFile->Volume;
224 if ((OFile->ODir != NULL) && (IoMode == WriteData)) {
228 if (OFile->Error == EFI_NOT_FOUND) {
236 if (IFile->Position > OFile->FileSize) {
270 Status = OFile->Error;
272 if (OFile->ODir != NULL) {
278 OFile = NULL;
284 if (EndPosition > OFile->FileSize) {
292 *BufferSize -= (UINTN) EndPosition - OFile->FileSize;
295 // We expand the file size of OFile
297 Status = FatGrowEof (OFile, EndPosition);
304 FatOFileFlush (OFile);
305 OFile = NULL;
309 FatUpdateDirEntClusterSizeInfo (OFile);
313 Status = FatAccessOFile (OFile, IoMode, (UINTN) IFile->Position, BufferSize, Buffer, Task);
333 // 3) Write operation doesn't affect OFile/IFile structure, so
337 Status = FatCleanupVolume (Volume, OFile, Status, NULL);
354 @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.
378 @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.
404 @retval EFI_DEVICE_ERROR - The OFile is not valid.
429 @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.
447 It uses OFile->PosRem to determine how much data can be accessed in one time.
449 @param OFile - The open file.
462 IN FAT_OFILE *OFile,
476 Volume = OFile->Volume;
482 // Seek the OFile to the file position
484 Status = FatOFilePosition (OFile, Position, BufferSize);
491 Len = BufferSize > OFile->PosRem ? OFile->PosRem : BufferSize;
496 Status = FatDiskIo (Volume, IoMode, OFile->PosDisk, Len, UserBuffer, Task);
507 OFile->Dirty = TRUE;
508 OFile->Archive = TRUE;
513 ASSERT (Position <= OFile->FileSize);
524 Expand OFile by appending zero bytes at the end of OFile.
526 @param OFile - The open file.
535 IN FAT_OFILE *OFile,
542 WritePos = OFile->FileSize;
543 Status = FatGrowEof (OFile, ExpandedSize);
545 Status = FatWriteZeroPool (OFile, WritePos);
553 Write zero pool from the WritePos to the end of OFile.
555 @param OFile - The open file to write zero pool.
565 IN FAT_OFILE *OFile,
575 AppendedSize = OFile->FileSize - WritePos;
595 Status = FatAccessOFile (OFile, WriteData, WritePos, &WriteSize, ZeroBuffer, NULL);
609 Truncate the OFile to smaller file size.
611 @param OFile - The open file.
620 IN FAT_OFILE *OFile,
624 OFile->FileSize = TruncatedSize;
625 return FatShrinkEof (OFile);