TianoCore EDK2 master
Loading...
Searching...
No Matches
Udf.h File Reference

Go to the source code of this file.

Data Structures

struct  UDF_STANDARD_IDENTIFIER
 
struct  UDF_READ_FILE_INFO
 
struct  UDF_TIMESTAMP
 
struct  UDF_ALLOCATION_EXTENT_DESCRIPTOR
 
struct  UDF_VOLUME_DESCRIPTOR
 
struct  UDF_LOGICAL_VOLUME_INTEGRITY
 
struct  UDF_PARTITION_DESCRIPTOR
 
struct  UDF_FILE_SET_DESCRIPTOR
 
struct  UDF_SHORT_ALLOCATION_DESCRIPTOR
 
struct  UDF_FILE_IDENTIFIER_DESCRIPTOR
 
struct  UDF_ICB_TAG
 
struct  UDF_FILE_ENTRY
 
struct  UDF_EXTENDED_FILE_ENTRY
 
struct  UDF_PATH_COMPONENT
 
struct  UDF_VOLUME_INFO
 
struct  UDF_FILE_INFO
 
struct  UDF_READ_DIRECTORY_INFO
 
struct  PRIVATE_UDF_FILE_DATA
 
struct  PRIVATE_UDF_SIMPLE_FS_DATA
 

Macros

#define EFI_UDF_DEVICE_PATH_GUID
 
#define FE_ICB_FILE_TYPE(_Ptr)
 
#define HIDDEN_FILE   (1 << 0)
 
#define DIRECTORY_FILE   (1 << 1)
 
#define DELETED_FILE   (1 << 2)
 
#define PARENT_FILE   (1 << 3)
 
#define IS_FID_HIDDEN_FILE(_Fid)    (BOOLEAN)((_Fid)->FileCharacteristics & HIDDEN_FILE)
 
#define IS_FID_DIRECTORY_FILE(_Fid)    (BOOLEAN)((_Fid)->FileCharacteristics & DIRECTORY_FILE)
 
#define IS_FID_DELETED_FILE(_Fid)    (BOOLEAN)((_Fid)->FileCharacteristics & DELETED_FILE)
 
#define IS_FID_PARENT_FILE(_Fid)    (BOOLEAN)((_Fid)->FileCharacteristics & PARENT_FILE)
 
#define IS_FID_NORMAL_FILE(_Fid)
 
#define GET_FE_RECORDING_FLAGS(_Fe)
 
#define AD_LENGTH(_RecFlags)
 
#define GET_EXTENT_FLAGS(_RecFlags, _Ad)
 
#define GET_EXTENT_LENGTH(_RecFlags, _Ad)
 
#define UDF_FILENAME_LENGTH   128
 
#define UDF_PATH_LENGTH   512
 
#define GET_FID_FROM_ADS(_Data, _Offs)    ((UDF_FILE_IDENTIFIER_DESCRIPTOR *)((UINT8 *)(_Data) + (_Offs)))
 
#define IS_VALID_COMPRESSION_ID(_CompId)    ((BOOLEAN)((_CompId) == 8 || (_CompId) == 16))
 
#define UDF_STANDARD_IDENTIFIER_LENGTH   5
 
#define PRIVATE_UDF_FILE_DATA_SIGNATURE   SIGNATURE_32 ('U', 'd', 'f', 'f')
 
#define PRIVATE_UDF_FILE_DATA_FROM_THIS(a)
 
#define PRIVATE_UDF_SIMPLE_FS_DATA_SIGNATURE   SIGNATURE_32 ('U', 'd', 'f', 's')
 
#define PRIVATE_UDF_SIMPLE_FS_DATA_FROM_THIS(a)
 

Enumerations

enum  UDF_FILE_ENTRY_TYPE { UdfFileEntryDirectory = 4 , UdfFileEntryStandardFile = 5 , UdfFileEntrySymlink = 12 }
 
enum  UDF_FE_RECORDING_FLAGS { ShortAdsSequence , LongAdsSequence , ExtendedAdsSequence , InlineData }
 
enum  UDF_EXTENT_FLAGS { ExtentRecordedAndAllocated , ExtentNotRecordedButAllocated , ExtentNotRecordedNotAllocated , ExtentIsNextExtent }
 
enum  UDF_READ_FILE_FLAGS { ReadFileGetFileSize , ReadFileAllocateAndRead , ReadFileSeekAndRead }
 

Functions

EFI_STATUS EFIAPI UdfOpenVolume (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **Root)
 
EFI_STATUS EFIAPI UdfOpen (IN EFI_FILE_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 Attributes)
 
EFI_STATUS EFIAPI UdfRead (IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
 
EFI_STATUS EFIAPI UdfClose (IN EFI_FILE_PROTOCOL *This)
 
EFI_STATUS EFIAPI UdfDelete (IN EFI_FILE_PROTOCOL *This)
 
EFI_STATUS EFIAPI UdfWrite (IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer)
 
EFI_STATUS EFIAPI UdfGetPosition (IN EFI_FILE_PROTOCOL *This, OUT UINT64 *Position)
 
EFI_STATUS EFIAPI UdfSetPosition (IN EFI_FILE_PROTOCOL *This, IN UINT64 Position)
 
EFI_STATUS EFIAPI UdfGetInfo (IN EFI_FILE_PROTOCOL *This, IN EFI_GUID *InformationType, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
 
EFI_STATUS EFIAPI UdfSetInfo (IN EFI_FILE_PROTOCOL *This, IN EFI_GUID *InformationType, IN UINTN BufferSize, IN VOID *Buffer)
 
EFI_STATUS EFIAPI UdfFlush (IN EFI_FILE_PROTOCOL *This)
 
EFI_STATUS ReadUdfVolumeInformation (IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, OUT UDF_VOLUME_INFO *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 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)
 
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)
 
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)
 
EFI_STATUS GetFileNameFromFid (IN UDF_FILE_IDENTIFIER_DESCRIPTOR *FileIdentifierDesc, IN UINTN CharMax, OUT CHAR16 *FileName)
 
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)
 
VOID CleanupFileInformation (IN UDF_FILE_INFO *File)
 
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)
 
EFI_STATUS SetFileInfo (IN UDF_FILE_INFO *File, IN UINT64 FileSize, IN CHAR16 *FileName, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
 
EFI_STATUS GetVolumeLabel (IN UDF_VOLUME_INFO *Volume, IN UINTN CharMax, OUT CHAR16 *String)
 
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)
 
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)
 
EFI_STATUS SupportUdfFileSystem (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle)
 
CHAR16 * MangleFileName (IN CHAR16 *FileName)
 
EFI_STATUS EFIAPI UdfDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI UdfDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI UdfDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS EFIAPI UdfComponentNameGetDriverName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
 
EFI_STATUS EFIAPI UdfComponentNameGetControllerName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
 

Variables

EFI_DRIVER_BINDING_PROTOCOL gUdfDriverBinding
 
EFI_COMPONENT_NAME_PROTOCOL gUdfComponentName
 
EFI_COMPONENT_NAME2_PROTOCOL gUdfComponentName2
 

Detailed Description

UDF/ECMA-167 file system driver.

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 Udf.h.

Macro Definition Documentation

◆ AD_LENGTH

#define AD_LENGTH (   _RecFlags)
Value:
((_RecFlags) == ShortAdsSequence ? \
((UINT64)(sizeof (UDF_SHORT_ALLOCATION_DESCRIPTOR))) : \
((UINT64)(sizeof (UDF_LONG_ALLOCATION_DESCRIPTOR))))

Definition at line 95 of file Udf.h.

◆ DELETED_FILE

#define DELETED_FILE   (1 << 2)

Definition at line 61 of file Udf.h.

◆ DIRECTORY_FILE

#define DIRECTORY_FILE   (1 << 1)

Definition at line 60 of file Udf.h.

◆ EFI_UDF_DEVICE_PATH_GUID

#define EFI_UDF_DEVICE_PATH_GUID
Value:
{ 0xC5BD4D42, 0x1A76, 0x4996, \
{ 0x89, 0x56, 0x73, 0xCD, 0xA3, 0x26, 0xCD, 0x0A } \
}

Definition at line 42 of file Udf.h.

◆ FE_ICB_FILE_TYPE

#define FE_ICB_FILE_TYPE (   _Ptr)
Value:
(UDF_FILE_ENTRY_TYPE)( \
((UDF_DESCRIPTOR_TAG *)(_Ptr))->TagIdentifier == UdfFileEntry ? \
((UDF_FILE_ENTRY *)(_Ptr))->IcbTag.FileType : \
((UDF_EXTENDED_FILE_ENTRY *)(_Ptr))->IcbTag.FileType)

Definition at line 47 of file Udf.h.

◆ GET_EXTENT_FLAGS

#define GET_EXTENT_FLAGS (   _RecFlags,
  _Ad 
)
Value:
((_RecFlags) == ShortAdsSequence ? \
((UDF_EXTENT_FLAGS)((((UDF_SHORT_ALLOCATION_DESCRIPTOR *)(_Ad))->ExtentLength >> \
30) & 0x3)) : \
((UDF_EXTENT_FLAGS)((((UDF_LONG_ALLOCATION_DESCRIPTOR *)(_Ad))->ExtentLength >> \
30) & 0x3)))

Definition at line 100 of file Udf.h.

◆ GET_EXTENT_LENGTH

#define GET_EXTENT_LENGTH (   _RecFlags,
  _Ad 
)
Value:
((_RecFlags) == ShortAdsSequence ? \
((UINT32)((((UDF_SHORT_ALLOCATION_DESCRIPTOR *)(_Ad))->ExtentLength & \
~0xC0000000UL))) : \
((UINT32)((((UDF_LONG_ALLOCATION_DESCRIPTOR *)(_Ad))->ExtentLength & \
~0xC0000000UL))))

Definition at line 107 of file Udf.h.

◆ GET_FE_RECORDING_FLAGS

#define GET_FE_RECORDING_FLAGS (   _Fe)
Value:
((UDF_FE_RECORDING_FLAGS)((UDF_ICB_TAG *)( \
(UINT8 *)(_Fe) + \
sizeof (UDF_DESCRIPTOR_TAG)))->Flags & 0x07)

Definition at line 83 of file Udf.h.

◆ GET_FID_FROM_ADS

#define GET_FID_FROM_ADS (   _Data,
  _Offs 
)     ((UDF_FILE_IDENTIFIER_DESCRIPTOR *)((UINT8 *)(_Data) + (_Offs)))

Definition at line 117 of file Udf.h.

◆ HIDDEN_FILE

#define HIDDEN_FILE   (1 << 0)

Definition at line 59 of file Udf.h.

◆ IS_FID_DELETED_FILE

#define IS_FID_DELETED_FILE (   _Fid)     (BOOLEAN)((_Fid)->FileCharacteristics & DELETED_FILE)

Definition at line 68 of file Udf.h.

◆ IS_FID_DIRECTORY_FILE

#define IS_FID_DIRECTORY_FILE (   _Fid)     (BOOLEAN)((_Fid)->FileCharacteristics & DIRECTORY_FILE)

Definition at line 66 of file Udf.h.

◆ IS_FID_HIDDEN_FILE

#define IS_FID_HIDDEN_FILE (   _Fid)     (BOOLEAN)((_Fid)->FileCharacteristics & HIDDEN_FILE)

Definition at line 64 of file Udf.h.

◆ IS_FID_NORMAL_FILE

#define IS_FID_NORMAL_FILE (   _Fid)
Value:
(BOOLEAN)(!IS_FID_DIRECTORY_FILE (_Fid) && \
!IS_FID_PARENT_FILE (_Fid))

Definition at line 72 of file Udf.h.

◆ IS_FID_PARENT_FILE

#define IS_FID_PARENT_FILE (   _Fid)     (BOOLEAN)((_Fid)->FileCharacteristics & PARENT_FILE)

Definition at line 70 of file Udf.h.

◆ IS_VALID_COMPRESSION_ID

#define IS_VALID_COMPRESSION_ID (   _CompId)     ((BOOLEAN)((_CompId) == 8 || (_CompId) == 16))

Definition at line 120 of file Udf.h.

◆ PARENT_FILE

#define PARENT_FILE   (1 << 3)

Definition at line 62 of file Udf.h.

◆ PRIVATE_UDF_FILE_DATA_FROM_THIS

#define PRIVATE_UDF_FILE_DATA_FROM_THIS (   a)
Value:
CR ( \
a, \
FileIo, \
PRIVATE_UDF_FILE_DATA_SIGNATURE \
)
#define CR(Record, TYPE, Field, TestSignature)
Definition: DebugLib.h:660

Definition at line 336 of file Udf.h.

◆ PRIVATE_UDF_FILE_DATA_SIGNATURE

#define PRIVATE_UDF_FILE_DATA_SIGNATURE   SIGNATURE_32 ('U', 'd', 'f', 'f')

Definition at line 334 of file Udf.h.

◆ PRIVATE_UDF_SIMPLE_FS_DATA_FROM_THIS

#define PRIVATE_UDF_SIMPLE_FS_DATA_FROM_THIS (   a)
Value:
CR ( \
a, \
SimpleFs, \
PRIVATE_UDF_SIMPLE_FS_DATA_SIGNATURE \
)

Definition at line 360 of file Udf.h.

◆ PRIVATE_UDF_SIMPLE_FS_DATA_SIGNATURE

#define PRIVATE_UDF_SIMPLE_FS_DATA_SIGNATURE   SIGNATURE_32 ('U', 'd', 'f', 's')

Definition at line 358 of file Udf.h.

◆ UDF_FILENAME_LENGTH

#define UDF_FILENAME_LENGTH   128

Definition at line 114 of file Udf.h.

◆ UDF_PATH_LENGTH

#define UDF_PATH_LENGTH   512

Definition at line 115 of file Udf.h.

◆ UDF_STANDARD_IDENTIFIER_LENGTH

#define UDF_STANDARD_IDENTIFIER_LENGTH   5

Definition at line 123 of file Udf.h.

Enumeration Type Documentation

◆ UDF_EXTENT_FLAGS

enum UDF_EXTENT_FLAGS

Definition at line 88 of file Udf.h.

◆ UDF_FE_RECORDING_FLAGS

enum UDF_FE_RECORDING_FLAGS

Definition at line 76 of file Udf.h.

◆ UDF_FILE_ENTRY_TYPE

enum UDF_FILE_ENTRY_TYPE

Definition at line 53 of file Udf.h.

◆ UDF_READ_FILE_FLAGS

enum UDF_READ_FILE_FLAGS

Definition at line 133 of file Udf.h.

Function Documentation

◆ CleanupFileInformation()

VOID CleanupFileInformation ( IN UDF_FILE_INFO *  File)

Clean up in-memory UDF file information.

Parameters
[in]FileFile information pointer.

Definition at line 2395 of file FileSystemOperations.c.

◆ FindFile()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[in]FilePathFile's absolute path.
[in]RootRoot directory file.
[in]ParentParent directory file.
[in]IcbICB of Parent.
[out]FileFound file.
Return values
EFI_SUCCESSFilePath was found.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe FilePath file was not found due to lack of resources.

Definition at line 1815 of file FileSystemOperations.c.

◆ FindFileEntry()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[in]IcbICB of the FID.
[out]FileEntryFile Entry or Extended File Entry.
Return values
EFI_SUCCESSFile Entry or Extended File Entry found.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe FE/EFE entry was not found due to lack of resources.

Definition at line 1731 of file FileSystemOperations.c.

◆ FindRootDirectory()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[out]FileRoot directory file.
Return values
EFI_SUCCESSRoot directory found.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe root directory was not found due to lack of resources.

Definition at line 1672 of file FileSystemOperations.c.

◆ GetFileNameFromFid()

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.

Attention
This is boundary function that may receive untrusted input.
The input is from FileSystem.

The File Identifier Descriptor is external input, so this routine will do basic validation for File Identifier Descriptor and report status.

Parameters
[in]FileIdentifierDescFile Identifier Descriptor pointer.
[in]CharMaxThe maximum number of FileName Unicode char, including terminating null char.
[out]FileNameDecoded filename.
Return values
EFI_SUCCESSFilename decoded and read.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_BUFFER_TOO_SMALLThe string buffer FileName cannot hold the decoded filename.

Definition at line 2064 of file FileSystemOperations.c.

◆ GetFileSize()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[in]FileFile information structure.
[out]SizeSize of the file.
Return values
EFI_SUCCESSFile size calculated and set in Size.
EFI_UNSUPPORTEDExtended Allocation Descriptors not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe file size was not calculated due to lack of resources.

Definition at line 2429 of file FileSystemOperations.c.

◆ GetVolumeLabel()

EFI_STATUS GetVolumeLabel ( IN UDF_VOLUME_INFO *  Volume,
IN UINTN  CharMax,
OUT CHAR16 *  String 
)

Get volume label of an UDF volume.

Attention
This is boundary function that may receive untrusted input.
The input is from FileSystem.

The File Set Descriptor is external input, so this routine will do basic validation for File Set Descriptor and report status.

Parameters
[in]VolumeVolume information pointer.
[in]CharMaxThe maximum number of Unicode char in String, including terminating null char.
[out]StringString buffer pointer to store the volume label.
Return values
EFI_SUCCESSVolume label is returned.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_BUFFER_TOO_SMALLThe string buffer String cannot hold the volume label.

Definition at line 2643 of file FileSystemOperations.c.

◆ GetVolumeSize()

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.

Attention
This is boundary function that may receive untrusted input.
The input is from FileSystem.

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[out]VolumeSizeVolume size.
[out]FreeSpaceSizeFree space size.
Return values
EFI_SUCCESSVolume and free space size calculated.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe volume and free space size were not calculated due to lack of resources.

Definition at line 2732 of file FileSystemOperations.c.

◆ MangleFileName()

CHAR16 * MangleFileName ( IN CHAR16 *  FileName)

Mangle a filename by cutting off trailing whitespaces, "\\", "." and "..".

Parameters
[in]FileNameFilename.
Return values
Themangled Filename.

Definition at line 110 of file FileName.c.

◆ ReadDirectoryEntry()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[in]ParentIcbICB of the parent file.
[in]FileEntryDataFE/EFE of the parent file.
[in,out]ReadDirInfoNext read directory listing structure information.
[out]FoundFidFile Identifier Descriptor pointer.
Return values
EFI_SUCCESSDirectory entry read.
EFI_UNSUPPORTEDExtended Allocation Descriptors not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe directory entry was not read due to lack of resources.

Definition at line 1972 of file FileSystemOperations.c.

◆ ReadFileData()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[in]FileFile information structure.
[in]FileSizeSize of the file.
[in,out]FilePositionFile position.
[in,out]BufferFile data.
[in,out]BufferSizeRead size.
Return values
EFI_SUCCESSFile seeked and read.
EFI_UNSUPPORTEDExtended Allocation Descriptors not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe file's recorded data was not read due to lack of resources.

Definition at line 2873 of file FileSystemOperations.c.

◆ ReadUdfVolumeInformation()

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.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[out]VolumeUDF volume information structure.
Return values
EFI_SUCCESSVolume information read.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe volume was not read due to lack of resources.

Definition at line 1624 of file FileSystemOperations.c.

◆ ResolveSymlink()

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.

Attention
This is boundary function that may receive untrusted input.
The input is from FileSystem.

The Path Component is external input, so this routine will do basic validation for Path Component and report status.

Parameters
[in]BlockIoBlockIo interface.
[in]DiskIoDiskIo interface.
[in]VolumeUDF volume information structure.
[in]ParentParent file.
[in]FileEntryDataFE/EFE structure pointer.
[out]FileResolved file.
Return values
EFI_SUCCESSSymlink file resolved.
EFI_UNSUPPORTEDExtended Allocation Descriptors not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe symlink file was not resolved due to lack of resources.

Definition at line 2157 of file FileSystemOperations.c.

◆ SetFileInfo()

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.

Parameters
[in]FileFile pointer.
[in]FileSizeSize of the file.
[in]FileNameFilename of the file.
[in,out]BufferSizeSize of the returned file infomation.
[out]BufferData of the returned file information.
Return values
EFI_SUCCESSFile information set.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESThe file information was not set due to lack of resources.

Definition at line 2477 of file FileSystemOperations.c.

◆ SupportUdfFileSystem()

EFI_STATUS SupportUdfFileSystem ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle 
)

Check if ControllerHandle supports an UDF file system.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test.
Return values
EFI_SUCCESSUDF file system found.
EFI_UNSUPPORTEDUDF file system not found.

Definition at line 2922 of file FileSystemOperations.c.

◆ UdfClose()

EFI_STATUS EFIAPI UdfClose ( IN EFI_FILE_PROTOCOL *  This)

Close the file handle.

Parameters
ThisProtocol instance pointer.
Return values
EFI_SUCCESSThe file was closed.

Definition at line 548 of file File.c.

◆ UdfComponentNameGetControllerName()

EFI_STATUS EFIAPI UdfComponentNameGetControllerName ( IN EFI_COMPONENT_NAME_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE ChildHandle  OPTIONAL,
IN CHAR8 *  Language,
OUT CHAR16 **  ControllerName 
)

Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver.

This function retrieves the user readable name of the controller specified by ControllerHandle and ChildHandle in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the controller name is returned in ControllerName, and EFI_SUCCESS is returned. If the driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle, then EFI_UNSUPPORTED is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
ControllerHandle[in]The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned.
ChildHandle[in]The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
ControllerName[out]A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
Return values
EFI_SUCCESSThe Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName.
EFI_INVALID_PARAMETERControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETERChildHandle is not NULL and it is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERControllerName is NULL.
EFI_UNSUPPORTEDThe driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver.

This function retrieves the user readable name of the controller specified by ControllerHandle and ChildHandle in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the controller name is returned in ControllerName, and EFI_SUCCESS is returned. If the driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle, then EFI_UNSUPPORTED is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
ControllerHandle[in]The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned.
ChildHandle[in]The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
ControllerName[out]A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
Return values
EFI_SUCCESSThe Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName.
EFI_INVALID_PARAMETERControllerHandle is NULL.
EFI_INVALID_PARAMETERChildHandle is not NULL and it is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERControllerName is NULL.
EFI_UNSUPPORTEDThe driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Definition at line 170 of file ComponentName.c.

◆ UdfComponentNameGetDriverName()

EFI_STATUS EFIAPI UdfComponentNameGetDriverName ( IN EFI_COMPONENT_NAME_PROTOCOL *  This,
IN CHAR8 *  Language,
OUT CHAR16 **  DriverName 
)

Retrieves a Unicode string that is the user readable name of the driver.

This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
DriverName[out]A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.
Return values
EFI_SUCCESSThe Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERDriverName is NULL.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Definition at line 85 of file ComponentName.c.

◆ UdfDelete()

EFI_STATUS EFIAPI UdfDelete ( IN EFI_FILE_PROTOCOL *  This)

Close and delete the file handle.

Parameters
ThisProtocol instance pointer.
Return values
EFI_SUCCESSThe file was closed and deleted.
EFI_WARN_DELETE_FAILUREThe handle was closed but the file was not deleted.

Definition at line 595 of file File.c.

◆ UdfDriverBindingStart()

EFI_STATUS EFIAPI UdfDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Start this driver on ControllerHandle by opening a Block IO and Disk IO protocol, reading Device Path, and creating a child handle with a Disk IO and device path protocol.

Parameters
ThisProtocol instance pointer.
ControllerHandleHandle of device to bind driver to
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver is added to ControllerHandle
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle
otherThis driver does not support this device

Start this driver on ControllerHandle by opening a Block IO or a Block IO2 or both, and Disk IO protocol, reading Device Path, and creating a child handle with a Disk IO and device path protocol.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver is added to ControllerHandle.
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle.
otherThis driver does not support this device.

Definition at line 112 of file Udf.c.

◆ UdfDriverBindingStop()

EFI_STATUS EFIAPI UdfDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *  ChildHandleBuffer 
)

Stop this driver on ControllerHandle. Support stopping any child handles created by this driver.

Parameters
ThisProtocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 241 of file Udf.c.

◆ UdfDriverBindingSupported()

EFI_STATUS EFIAPI UdfDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle. Any ControllerHandle than contains a BlockIo and DiskIo protocol can be supported.

Parameters
ThisProtocol instance pointer.
ControllerHandleHandle of device to test
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device
EFI_ALREADY_STARTEDThis driver is already running on this device
otherThis driver does not support this device

Test to see if this driver supports ControllerHandle. Any ControllerHandle than contains a BlockIo and DiskIo protocol or a BlockIo2 protocol can be supported.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
otherThis driver does not support this device.

Definition at line 45 of file Udf.c.

◆ UdfFlush()

EFI_STATUS EFIAPI UdfFlush ( IN EFI_FILE_PROTOCOL *  This)

Flush data back for the file handle.

Parameters
ThisProtocol instance pointer.
Return values
EFI_SUCCESSData was flushed.
EFI_UNSUPPORTEDWrites to Open directory are not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe device is write protected.
EFI_ACCESS_DENIEDThe file was open for read only.
EFI_VOLUME_FULLThe volume is full.

Definition at line 912 of file File.c.

◆ UdfGetInfo()

EFI_STATUS EFIAPI UdfGetInfo ( IN EFI_FILE_PROTOCOL *  This,
IN EFI_GUID *  InformationType,
IN OUT UINTN *  BufferSize,
OUT VOID *  Buffer 
)

Get information about a file.

Attention
This is boundary function that may receive untrusted input.
The input is from FileSystem.

The File Set Descriptor is external input, so this routine will do basic validation for File Set Descriptor and report status.

Parameters
ThisProtocol instance pointer.
InformationTypeType of information to return in Buffer.
BufferSizeOn input size of buffer, on output amount of data in buffer.
BufferThe buffer to return data.
Return values
EFI_SUCCESSData was returned.
EFI_UNSUPPORTEDInformationType is not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe device is write protected.
EFI_ACCESS_DENIEDThe file was open for read only.
EFI_BUFFER_TOO_SMALLBuffer was too small; required size returned in BufferSize.

Get information about a file.

Parameters
ThisProtocol instance pointer.
InformationTypeType of information to return in Buffer.
BufferSizeOn input size of buffer, on output amount of data in buffer.
BufferThe buffer to return data.
Return values
EFI_SUCCESSData was returned.
EFI_UNSUPPORTEDInformationType is not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe device is write protected.
EFI_ACCESS_DENIEDThe file was open for read only.
EFI_BUFFER_TOO_SMALLBuffer was too small; required size returned in BufferSize.

Definition at line 764 of file File.c.

◆ UdfGetPosition()

EFI_STATUS EFIAPI UdfGetPosition ( IN EFI_FILE_PROTOCOL *  This,
OUT UINT64 *  Position 
)

Get file's current position.

Parameters
ThisProtocol instance pointer.
PositionByte position from the start of the file.
Return values
EFI_SUCCESSPosition was updated.
EFI_UNSUPPORTEDSeek request for directories is not valid.

Definition at line 654 of file File.c.

◆ UdfOpen()

EFI_STATUS EFIAPI UdfOpen ( IN EFI_FILE_PROTOCOL *  This,
OUT EFI_FILE_PROTOCOL **  NewHandle,
IN CHAR16 *  FileName,
IN UINT64  OpenMode,
IN UINT64  Attributes 
)

Opens a new file relative to the source file's location.

Parameters
ThisThe protocol instance pointer.
NewHandleReturns File Handle for FileName.
FileNameNull terminated string. "\", ".", and ".." are supported.
OpenModeOpen mode for file.
AttributesOnly used for EFI_FILE_MODE_CREATE.
Return values
EFI_SUCCESSThe device was opened.
EFI_NOT_FOUNDThe specified file could not be found on the device.
EFI_NO_MEDIAThe device has no media.
EFI_MEDIA_CHANGEDThe media has changed.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_ACCESS_DENIEDThe service denied access to the file.
EFI_OUT_OF_RESOURCESThe volume was not opened due to lack of resources.
EFI_VOLUME_FULLThe volume is full.

Definition at line 164 of file File.c.

◆ UdfOpenVolume()

EFI_STATUS EFIAPI UdfOpenVolume ( IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *  This,
OUT EFI_FILE_PROTOCOL **  Root 
)

Open the root directory on a volume.

Parameters
ThisProtocol instance pointer.
RootReturns an Open file handle for the root directory
Return values
EFI_SUCCESSThe device was opened.
EFI_UNSUPPORTEDThis volume does not support the file system.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_ACCESS_DENIEDThe service denied access to the file.
EFI_OUT_OF_RESOURCESThe volume was not opened due to lack of resources.

Definition at line 53 of file File.c.

◆ UdfRead()

EFI_STATUS EFIAPI UdfRead ( IN EFI_FILE_PROTOCOL *  This,
IN OUT UINTN *  BufferSize,
OUT VOID *  Buffer 
)

Read data from the file.

Parameters
ThisProtocol instance pointer.
BufferSizeOn input size of buffer, on output amount of data in buffer.
BufferThe buffer in which data is read.
Return values
EFI_SUCCESSData was read.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_BUFFER_TO_SMALLBufferSize is too small. BufferSize contains required size.

Definition at line 317 of file File.c.

◆ UdfSetInfo()

EFI_STATUS EFIAPI UdfSetInfo ( IN EFI_FILE_PROTOCOL *  This,
IN EFI_GUID *  InformationType,
IN UINTN  BufferSize,
IN VOID *  Buffer 
)

Set information about a file.

Parameters
ThisProtocol instance pointer.
InformationTypeType of information in Buffer.
BufferSizeSize of buffer.
BufferThe data to write.
Return values
EFI_SUCCESSData was set.
EFI_UNSUPPORTEDInformationType is not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe device is write protected.
EFI_ACCESS_DENIEDThe file was open for read only.

Definition at line 885 of file File.c.

◆ UdfSetPosition()

EFI_STATUS EFIAPI UdfSetPosition ( IN EFI_FILE_PROTOCOL *  This,
IN UINT64  Position 
)

Set file's current position.

Parameters
ThisProtocol instance pointer.
PositionByte position from the start of the file.
Return values
EFI_SUCCESSPosition was updated.
EFI_UNSUPPORTEDSeek request for non-zero is not valid on open.

Definition at line 695 of file File.c.

◆ UdfWrite()

EFI_STATUS EFIAPI UdfWrite ( IN EFI_FILE_PROTOCOL *  This,
IN OUT UINTN *  BufferSize,
IN VOID *  Buffer 
)

Write data to a file.

Parameters
ThisProtocol instance pointer.
BufferSizeOn input size of buffer, on output amount of data in buffer.
BufferThe buffer in which data to write.
Return values
EFI_SUCCESSData was written.
EFI_UNSUPPORTEDWrites to Open directory are not supported.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_DEVICE_ERRORAn attempt was made to write to a deleted file.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe device is write protected.
EFI_ACCESS_DENIEDThe file was open for read only.
EFI_VOLUME_FULLThe volume is full.

Definition at line 633 of file File.c.

Variable Documentation

◆ gUdfComponentName

EFI_COMPONENT_NAME_PROTOCOL gUdfComponentName
extern

Definition at line 14 of file ComponentName.c.

◆ gUdfComponentName2

EFI_COMPONENT_NAME2_PROTOCOL gUdfComponentName2
extern

Definition at line 23 of file ComponentName.c.

◆ gUdfDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gUdfDriverBinding
extern

Definition at line 14 of file Udf.c.