TianoCore EDK2 master
|
#include "Udf.h"
Go to the source code of this file.
Variables | |
EFI_GUID | gUdfDevPathGuid = EFI_UDF_DEVICE_PATH_GUID |
Handle on-disk format and volume structures in UDF/ECMA-167 file systems.
Copyright (C) 2014-2017 Paulo Alcantara pcacj.nosp@m.r@zy.nosp@m.tor.c.nosp@m.om Copyright (c) 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FileSystemOperations.c.
VOID CleanupFileInformation | ( | IN UDF_FILE_INFO * | File | ) |
Clean up in-memory UDF file information.
[in] | File | File information pointer. |
Definition at line 2395 of file FileSystemOperations.c.
VOID DuplicateFe | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN UDF_VOLUME_INFO * | Volume, | ||
IN VOID * | FileEntry, | ||
OUT VOID ** | NewFileEntry | ||
) |
Duplicate either a given File Entry or a given Extended File Entry.
[in] | BlockIo | BlockIo interface. |
[in] | Volume | Volume information pointer. |
[in] | FileEntry | (Extended) File Entry pointer. |
[out] | NewFileEntry | The duplicated (Extended) File Entry. |
Definition at line 505 of file FileSystemOperations.c.
VOID DuplicateFid | ( | IN UDF_FILE_IDENTIFIER_DESCRIPTOR * | FileIdentifierDesc, |
OUT UDF_FILE_IDENTIFIER_DESCRIPTOR ** | NewFileIdentifierDesc | ||
) |
Duplicate a given File Identifier Descriptor.
[in] | FileIdentifierDesc | File Identifier Descriptor pointer. |
[out] | NewFileIdentifierDesc | The duplicated File Identifier Descriptor. |
Definition at line 483 of file FileSystemOperations.c.
EFI_STATUS FindAnchorVolumeDescriptorPointer | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
OUT UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER * | AnchorPoint | ||
) |
Find the anchor volume descriptor pointer.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[out] | AnchorPoint | Anchor volume descriptor pointer. |
EFI_SUCCESS | Anchor volume descriptor pointer found. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
other | Anchor volume descriptor pointer not found. |
Definition at line 30 of file FileSystemOperations.c.
EFI_STATUS FindFile | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN CHAR16 * | FilePath, | ||
IN UDF_FILE_INFO * | Root, | ||
IN UDF_FILE_INFO * | Parent, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | Icb, | ||
OUT UDF_FILE_INFO * | File | ||
) |
Find a file given its absolute path on an UDF volume.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[in] | FilePath | File's absolute path. |
[in] | Root | Root directory file. |
[in] | Parent | Parent directory file. |
[in] | Icb | ICB of Parent. |
[out] | File | Found file. |
EFI_SUCCESS | FilePath was found. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The FilePath file was not found due to lack of resources. |
Definition at line 1815 of file FileSystemOperations.c.
EFI_STATUS FindFileEntry | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | Icb, | ||
OUT VOID ** | FileEntry | ||
) |
Find either a File Entry or a Extended File Entry from a given ICB.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[in] | Icb | ICB of the FID. |
[out] | FileEntry | File Entry or Extended File Entry. |
EFI_SUCCESS | File Entry or Extended File Entry found. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The FE/EFE entry was not found due to lack of resources. |
Definition at line 1731 of file FileSystemOperations.c.
EFI_STATUS FindFileSetDescriptor | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume | ||
) |
Find File Set Descriptor of a given Logical Volume Descriptor.
The found FSD will contain the extent (LogicalVolumeContentsUse) where our root directory is.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | Volume information pointer. |
EFI_SUCCESS | File Set Descriptor pointer found. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
other | File Set Descriptor pointer not found. |
Definition at line 350 of file FileSystemOperations.c.
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.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[out] | File | Root directory file. |
EFI_SUCCESS | Root directory found. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The root directory was not found due to lack of resources. |
Definition at line 1672 of file FileSystemOperations.c.
EFI_STATUS GetAdsInformation | ( | IN VOID * | FileEntryData, |
IN UINTN | FileEntrySize, | ||
OUT VOID ** | AdsData, | ||
OUT UINT64 * | Length | ||
) |
Get Allocation Descriptors' data information from a given FE/EFE.
The (Extended) File Entry is external input, so this routine will do basic validation for (Extended) File Entry and report status.
[in] | FileEntryData | (Extended) File Entry pointer. |
[in] | FileEntrySize | Size of the (Extended) File Entry specified by FileEntryData. |
[out] | AdsData | Buffer contains the Allocation Descriptors' data from a given FE/EFE. |
[out] | Length | Length of the data in AdsData. |
EFI_SUCCESS | The data and size of Allocation Descriptors were read from the FE/EFE. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
Definition at line 601 of file FileSystemOperations.c.
EFI_STATUS GetAedAdsData | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | ParentIcb, | ||
IN UDF_FE_RECORDING_FLAGS | RecordingFlags, | ||
IN VOID * | Ad, | ||
OUT VOID ** | Data, | ||
OUT UINT64 * | Length | ||
) |
Read Allocation Extent Descriptor into memory.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | Volume information pointer. |
[in] | ParentIcb | Long Allocation Descriptor pointer. |
[in] | RecordingFlags | Flag to indicate the type of descriptor. |
[in] | Ad | Allocation Descriptor pointer. |
[out] | Data | Buffer that contains the Allocation Extent Descriptor. |
[out] | Length | Length of Data. |
EFI_SUCCESS | The Allocation Extent Descriptor was read. |
EFI_OUT_OF_RESOURCES | The Allocation Extent Descriptor was not read due to lack of resources. |
other | Fail to read the disk. |
Definition at line 968 of file FileSystemOperations.c.
EFI_STATUS GetAedAdsOffset | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | ParentIcb, | ||
IN UDF_FE_RECORDING_FLAGS | RecordingFlags, | ||
IN VOID * | Ad, | ||
OUT UINT64 * | Offset, | ||
OUT UINT64 * | Length | ||
) |
Return offset + length of a given indirect Allocation Descriptor (AED).
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | Volume information pointer. |
[in] | ParentIcb | Long Allocation Descriptor pointer. |
[in] | RecordingFlags | Flag to indicate the type of descriptor. |
[in] | Ad | Allocation Descriptor pointer. |
[out] | Offset | Offset of a given indirect Allocation Descriptor. |
[out] | Length | Length of a given indirect Allocation Descriptor. |
EFI_SUCCESS | The offset and length were returned. |
EFI_OUT_OF_RESOURCES | The offset and length were not returned due to lack of resources. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
other | The offset and length were not returned. |
Definition at line 871 of file FileSystemOperations.c.
EFI_STATUS GetAllocationDescriptor | ( | IN UDF_FE_RECORDING_FLAGS | RecordingFlags, |
IN VOID * | Data, | ||
IN OUT UINT64 * | Offset, | ||
IN UINT64 | Length, | ||
OUT VOID ** | FoundAd | ||
) |
Get either a Short Allocation Descriptor or a Long Allocation Descriptor from file's data.
[in] | RecordingFlags | Flag to indicate the type of descriptor. |
[in] | Data | File's data pointer. |
[in,out] | Offset | Starting offset of the File's data to read. |
[in] | Length | Length of the data to read. |
[out] | FoundAd | Allocation Descriptor pointer. |
EFI_SUCCESS | A Short Allocation Descriptor was found. |
EFI_DEVICE_ERROR | No more Allocation Descriptors. Invalid type of descriptor was given. |
Definition at line 768 of file FileSystemOperations.c.
EFI_STATUS GetAllocationDescriptorLsn | ( | IN UDF_FE_RECORDING_FLAGS | RecordingFlags, |
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | ParentIcb, | ||
IN VOID * | Ad, | ||
OUT UINT64 * | Lsn | ||
) |
Return logical sector number of either Short or Long Allocation Descriptor.
[in] | RecordingFlags | Flag to indicate the type of descriptor. |
[in] | Volume | Volume information pointer. |
[in] | ParentIcb | Long Allocation Descriptor pointer. |
[in] | Ad | Allocation Descriptor pointer. |
[out] | Lsn | Logical sector number pointer. |
EFI_SUCCESS | Logical sector number of the given Allocation Descriptor successfully returned. |
EFI_UNSUPPORTED | Logical sector number of the given Allocation Descriptor is not returned due to unrecognized format. |
Definition at line 816 of file FileSystemOperations.c.
UINT64 GetFidDescriptorLength | ( | IN UDF_FILE_IDENTIFIER_DESCRIPTOR * | FileIdentifierDesc | ) |
Calculate length of a given File Identifier Descriptor.
[in] | FileIdentifierDesc | File Identifier Descriptor pointer. |
Definition at line 464 of file FileSystemOperations.c.
EFI_STATUS GetFileEntryData | ( | IN VOID * | FileEntryData, |
IN UINTN | FileEntrySize, | ||
OUT VOID ** | Data, | ||
OUT UINT64 * | Length | ||
) |
Get raw data + length of a given File Entry or Extended File Entry.
The file's recorded data can contain either real file content (inline) or a sequence of extents (or Allocation Descriptors) which tells where file's content is stored in.
NOTE: The FE/EFE can be thought it was an inode.
The (Extended) File Entry is external input, so this routine will do basic validation for (Extended) File Entry and report status.
[in] | FileEntryData | (Extended) File Entry pointer. |
[in] | FileEntrySize | Size of the (Extended) File Entry specified by FileEntryData. |
[out] | Data | Buffer contains the raw data of a given (Extended) File Entry. |
[out] | Length | Length of the data in Buffer. |
EFI_SUCCESS | Raw data and size of the FE/EFE was read. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
Definition at line 542 of file FileSystemOperations.c.
EFI_STATUS GetFileNameFromFid | ( | IN UDF_FILE_IDENTIFIER_DESCRIPTOR * | FileIdentifierDesc, |
IN UINTN | CharMax, | ||
OUT CHAR16 * | FileName | ||
) |
Get a filename (encoded in OSTA-compressed format) from a File Identifier Descriptor on an UDF volume.
The File Identifier Descriptor is external input, so this routine will do basic validation for File Identifier Descriptor and report status.
[in] | FileIdentifierDesc | File Identifier Descriptor pointer. |
[in] | CharMax | The maximum number of FileName Unicode char, including terminating null char. |
[out] | FileName | Decoded filename. |
EFI_SUCCESS | Filename decoded and read. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_BUFFER_TOO_SMALL | The string buffer FileName cannot hold the decoded filename. |
Definition at line 2064 of file FileSystemOperations.c.
EFI_STATUS GetFileSize | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_FILE_INFO * | File, | ||
OUT UINT64 * | Size | ||
) |
Find a file from its absolute path on an UDF volume.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[in] | File | File information structure. |
[out] | Size | Size of the file. |
EFI_SUCCESS | File size calculated and set in Size. |
EFI_UNSUPPORTED | Extended Allocation Descriptors not supported. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The file size was not calculated due to lack of resources. |
Definition at line 2429 of file FileSystemOperations.c.
EFI_STATUS GetLongAdFromAds | ( | IN VOID * | Data, |
IN OUT UINT64 * | Offset, | ||
IN UINT64 | Length, | ||
OUT UDF_LONG_ALLOCATION_DESCRIPTOR ** | FoundLongAd | ||
) |
Read next Long Allocation Descriptor from a given file's data.
[in] | Data | File's data pointer. |
[in,out] | Offset | Starting offset of the File's data to read. |
[in] | Length | Length of the data to read. |
[out] | FoundLongAd | Long Allocation Descriptor pointer. |
EFI_SUCCESS | A Long Allocation Descriptor was found. |
EFI_DEVICE_ERROR | No more Long Allocation Descriptors. |
Definition at line 651 of file FileSystemOperations.c.
EFI_STATUS GetLongAdLsn | ( | IN UDF_VOLUME_INFO * | Volume, |
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | LongAd, | ||
OUT UINT64 * | Lsn | ||
) |
Return logical sector number of a given Long Allocation Descriptor.
[in] | Volume | Volume information pointer. |
[in] | LongAd | Long Allocation Descriptor pointer. |
[out] | Lsn | Logical sector number pointer. |
EFI_SUCCESS | Logical sector number successfully returned. |
EFI_UNSUPPORTED | Logical sector number is not returned due to unrecognized format. |
Definition at line 288 of file FileSystemOperations.c.
UDF_PARTITION_DESCRIPTOR * GetPdFromLongAd | ( | IN UDF_VOLUME_INFO * | Volume, |
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | LongAd | ||
) |
Return a Partition Descriptor given a Long Allocation Descriptor. This is necessary to calculate the right extent (LongAd) offset which is added up with partition's starting location.
[in] | Volume | Volume information pointer. |
[in] | LongAd | Long Allocation Descriptor pointer. |
Definition at line 211 of file FileSystemOperations.c.
EFI_STATUS GetShortAdFromAds | ( | IN VOID * | Data, |
IN OUT UINT64 * | Offset, | ||
IN UINT64 | Length, | ||
OUT UDF_SHORT_ALLOCATION_DESCRIPTOR ** | FoundShortAd | ||
) |
Read next Short Allocation Descriptor from a given file's data.
[in] | Data | File's data pointer. |
[in,out] | Offset | Starting offset of the File's data to read. |
[in] | Length | Length of the data to read. |
[out] | FoundShortAd | Short Allocation Descriptor pointer. |
EFI_SUCCESS | A Short Allocation Descriptor was found. |
EFI_DEVICE_ERROR | No more Short Allocation Descriptors. |
Definition at line 708 of file FileSystemOperations.c.
UINT64 GetShortAdLsn | ( | IN UDF_VOLUME_INFO * | Volume, |
IN UDF_PARTITION_DESCRIPTOR * | PartitionDesc, | ||
IN UDF_SHORT_ALLOCATION_DESCRIPTOR * | ShortAd | ||
) |
Return logical sector number of a given Short Allocation Descriptor.
[in] | Volume | Volume pointer. |
[in] | PartitionDesc | Partition Descriptor pointer. |
[in] | ShortAd | Short Allocation Descriptor pointer. |
Definition at line 324 of file FileSystemOperations.c.
EFI_STATUS GetVolumeLabel | ( | IN UDF_VOLUME_INFO * | Volume, |
IN UINTN | CharMax, | ||
OUT CHAR16 * | String | ||
) |
Get volume label of an UDF volume.
The File Set Descriptor is external input, so this routine will do basic validation for File Set Descriptor and report status.
[in] | Volume | Volume information pointer. |
[in] | CharMax | The maximum number of Unicode char in String, including terminating null char. |
[out] | String | String buffer pointer to store the volume label. |
EFI_SUCCESS | Volume label is returned. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_BUFFER_TOO_SMALL | The string buffer String cannot hold the volume label. |
Definition at line 2643 of file FileSystemOperations.c.
EFI_STATUS GetVolumeSize | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
OUT UINT64 * | VolumeSize, | ||
OUT UINT64 * | FreeSpaceSize | ||
) |
Get volume and free space size information of an UDF volume.
The Logical Volume Descriptor and the Logical Volume Integrity Descriptor are external inputs, so this routine will do basic validation for both descriptors and report status.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[out] | VolumeSize | Volume size. |
[out] | FreeSpaceSize | Free space size. |
EFI_SUCCESS | Volume and free space size calculated. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The volume and free space size were not calculated due to lack of resources. |
Definition at line 2732 of file FileSystemOperations.c.
EFI_STATUS GrowUpBufferToNextAd | ( | IN UDF_FE_RECORDING_FLAGS | RecordingFlags, |
IN VOID * | Ad, | ||
IN OUT VOID ** | Buffer, | ||
IN UINT64 | Length | ||
) |
Function used to serialise reads of Allocation Descriptors.
[in] | RecordingFlags | Flag to indicate the type of descriptor. |
[in] | Ad | Allocation Descriptor pointer. |
[in,out] | Buffer | Buffer to hold the next Allocation Descriptor. |
[in] | Length | Length of Buffer. |
EFI_SUCCESS | Buffer was grown to hold the next Allocation Descriptor. |
EFI_OUT_OF_RESOURCES | Buffer was not grown due to lack of resources. |
Definition at line 1030 of file FileSystemOperations.c.
EFI_STATUS InternalFindFile | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN CHAR16 * | FileName, | ||
IN UDF_FILE_INFO * | Parent, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | Icb, | ||
OUT UDF_FILE_INFO * | File | ||
) |
Find a file by its filename from a given Parent file.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | Volume information pointer. |
[in] | FileName | File name string. |
[in] | Parent | Parent directory file. |
[in] | Icb | Long Allocation Descriptor pointer. |
[out] | File | Found file. |
EFI_SUCCESS | The file was found. |
EFI_INVALID_PARAMETER | One or more input parameters are invalid. |
EFI_NOT_FOUND | The file was not found. |
Definition at line 1435 of file FileSystemOperations.c.
EFI_STATUS ReadDirectoryEntry | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | ParentIcb, | ||
IN VOID * | FileEntryData, | ||
IN OUT UDF_READ_DIRECTORY_INFO * | ReadDirInfo, | ||
OUT UDF_FILE_IDENTIFIER_DESCRIPTOR ** | FoundFid | ||
) |
Read a directory entry at a time on an UDF volume.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[in] | ParentIcb | ICB of the parent file. |
[in] | FileEntryData | FE/EFE of the parent file. |
[in,out] | ReadDirInfo | Next read directory listing structure information. |
[out] | FoundFid | File Identifier Descriptor pointer. |
EFI_SUCCESS | Directory entry read. |
EFI_UNSUPPORTED | Extended Allocation Descriptors not supported. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The directory entry was not read due to lack of resources. |
Definition at line 1972 of file FileSystemOperations.c.
EFI_STATUS ReadFile | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_LONG_ALLOCATION_DESCRIPTOR * | ParentIcb, | ||
IN VOID * | FileEntryData, | ||
IN OUT UDF_READ_FILE_INFO * | ReadFileInfo | ||
) |
Read data or size of either a File Entry or an Extended File Entry.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | Volume information pointer. |
[in] | ParentIcb | Long Allocation Descriptor pointer. |
[in] | FileEntryData | FE/EFE structure pointer. |
[in,out] | ReadFileInfo | Read file information pointer. |
EFI_SUCCESS | Data or size of a FE/EFE was read. |
EFI_OUT_OF_RESOURCES | Data or size of a FE/EFE was not read due to lack of resources. |
EFI_INVALID_PARAMETER | The read file flag given in ReadFileInfo is invalid. |
EFI_UNSUPPORTED | The FE recording flag given in FileEntryData is not supported. |
other | Data or size of a FE/EFE was not read. |
Definition at line 1077 of file FileSystemOperations.c.
EFI_STATUS ReadFileData | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_FILE_INFO * | File, | ||
IN UINT64 | FileSize, | ||
IN OUT UINT64 * | FilePosition, | ||
IN OUT VOID * | Buffer, | ||
IN OUT UINT64 * | BufferSize | ||
) |
Seek a file and read its data into memory on an UDF volume.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[in] | File | File information structure. |
[in] | FileSize | Size of the file. |
[in,out] | FilePosition | File position. |
[in,out] | Buffer | File data. |
[in,out] | BufferSize | Read size. |
EFI_SUCCESS | File seeked and read. |
EFI_UNSUPPORTED | Extended Allocation Descriptors not supported. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The file's recorded data was not read due to lack of resources. |
Definition at line 2873 of file FileSystemOperations.c.
EFI_STATUS ReadUdfVolumeInformation | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
OUT UDF_VOLUME_INFO * | Volume | ||
) |
Read volume information on a medium which contains a valid UDF file system.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[out] | Volume | UDF volume information structure. |
EFI_SUCCESS | Volume information read. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The volume was not read due to lack of resources. |
Definition at line 1624 of file FileSystemOperations.c.
EFI_STATUS ReadVolumeFileStructure | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
OUT UDF_VOLUME_INFO * | Volume | ||
) |
Read Volume and File Structure on an UDF file system.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[out] | Volume | Volume information pointer. |
EFI_SUCCESS | Volume and File Structure were read. |
other | Volume and File Structure were not read. |
Definition at line 410 of file FileSystemOperations.c.
EFI_STATUS ResolveSymlink | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_VOLUME_INFO * | Volume, | ||
IN UDF_FILE_INFO * | Parent, | ||
IN VOID * | FileEntryData, | ||
OUT UDF_FILE_INFO * | File | ||
) |
Resolve a symlink file on an UDF volume.
The Path Component is external input, so this routine will do basic validation for Path Component and report status.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | Volume | UDF volume information structure. |
[in] | Parent | Parent file. |
[in] | FileEntryData | FE/EFE structure pointer. |
[out] | File | Resolved file. |
EFI_SUCCESS | Symlink file resolved. |
EFI_UNSUPPORTED | Extended Allocation Descriptors not supported. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The symlink file was not resolved due to lack of resources. |
Definition at line 2157 of file FileSystemOperations.c.
EFI_STATUS SetFileInfo | ( | IN UDF_FILE_INFO * | File, |
IN UINT64 | FileSize, | ||
IN CHAR16 * | FileName, | ||
IN OUT UINTN * | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Set information about a file on an UDF volume.
[in] | File | File pointer. |
[in] | FileSize | Size of the file. |
[in] | FileName | Filename of the file. |
[in,out] | BufferSize | Size of the returned file infomation. |
[out] | Buffer | Data of the returned file information. |
EFI_SUCCESS | File information set. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | The file information was not set due to lack of resources. |
Definition at line 2477 of file FileSystemOperations.c.
EFI_STATUS StartMainVolumeDescriptorSequence | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER * | AnchorPoint, | ||
OUT UDF_VOLUME_INFO * | Volume | ||
) |
Save the content of Logical Volume Descriptors and Partitions Descriptors in memory.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | AnchorPoint | Anchor volume descriptor pointer. |
[out] | Volume | UDF volume information structure. |
EFI_SUCCESS | The descriptors were saved. |
EFI_OUT_OF_RESOURCES | The descriptors were not saved due to lack of resources. |
other | The descriptors were not saved due to ReadDisk error. |
Definition at line 95 of file FileSystemOperations.c.
EFI_STATUS SupportUdfFileSystem | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle | ||
) |
Check if ControllerHandle supports an UDF file system.
[in] | This | Protocol instance pointer. |
[in] | ControllerHandle | Handle of device to test. |
EFI_SUCCESS | UDF file system found. |
EFI_UNSUPPORTED | UDF file system not found. |
Definition at line 2922 of file FileSystemOperations.c.
EFI_GUID gUdfDevPathGuid = EFI_UDF_DEVICE_PATH_GUID |
Definition at line 15 of file FileSystemOperations.c.