|
TianoCore EDK2 master
|
#include <Uefi.h>#include <Base.h>#include <Protocol/BlockIo.h>#include <Protocol/ComponentName.h>#include <Protocol/DevicePath.h>#include <Protocol/DriverBinding.h>#include <Protocol/DiskIo.h>#include <Protocol/SimpleFileSystem.h>#include <Guid/FileInfo.h>#include <Guid/FileSystemInfo.h>#include <Guid/FileSystemVolumeLabelInfo.h>#include <Library/DebugLib.h>#include <Library/UefiDriverEntryPoint.h>#include <Library/BaseLib.h>#include <Library/UefiLib.h>#include <Library/BaseMemoryLib.h>#include <Library/MemoryAllocationLib.h>#include <Library/UefiBootServicesTableLib.h>#include <Library/DevicePathLib.h>#include <IndustryStandard/ElTorito.h>#include <IndustryStandard/Udf.h>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) |
Variables | |
| EFI_DRIVER_BINDING_PROTOCOL | gUdfDriverBinding |
| EFI_COMPONENT_NAME_PROTOCOL | gUdfComponentName |
| EFI_COMPONENT_NAME2_PROTOCOL | gUdfComponentName2 |
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.
| #define AD_LENGTH | ( | _RecFlags | ) |
| #define EFI_UDF_DEVICE_PATH_GUID |
| #define FE_ICB_FILE_TYPE | ( | _Ptr | ) |
| #define GET_EXTENT_FLAGS | ( | _RecFlags, | |
| _Ad | |||
| ) |
| #define GET_EXTENT_LENGTH | ( | _RecFlags, | |
| _Ad | |||
| ) |
| #define GET_FE_RECORDING_FLAGS | ( | _Fe | ) |
| #define GET_FID_FROM_ADS | ( | _Data, | |
| _Offs | |||
| ) | ((UDF_FILE_IDENTIFIER_DESCRIPTOR *)((UINT8 *)(_Data) + (_Offs))) |
| #define IS_FID_DELETED_FILE | ( | _Fid | ) | (BOOLEAN)((_Fid)->FileCharacteristics & DELETED_FILE) |
| #define IS_FID_DIRECTORY_FILE | ( | _Fid | ) | (BOOLEAN)((_Fid)->FileCharacteristics & DIRECTORY_FILE) |
| #define IS_FID_HIDDEN_FILE | ( | _Fid | ) | (BOOLEAN)((_Fid)->FileCharacteristics & HIDDEN_FILE) |
| #define IS_FID_NORMAL_FILE | ( | _Fid | ) |
| #define IS_FID_PARENT_FILE | ( | _Fid | ) | (BOOLEAN)((_Fid)->FileCharacteristics & PARENT_FILE) |
| #define IS_VALID_COMPRESSION_ID | ( | _CompId | ) | ((BOOLEAN)((_CompId) == 8 || (_CompId) == 16)) |
| #define PRIVATE_UDF_FILE_DATA_FROM_THIS | ( | a | ) |
| #define PRIVATE_UDF_FILE_DATA_SIGNATURE SIGNATURE_32 ('U', 'd', 'f', 'f') |
| #define PRIVATE_UDF_SIMPLE_FS_DATA_FROM_THIS | ( | a | ) |
| #define PRIVATE_UDF_SIMPLE_FS_DATA_SIGNATURE SIGNATURE_32 ('U', 'd', 'f', 's') |
| 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.
| 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 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 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 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.
| CHAR16 * MangleFileName | ( | IN CHAR16 * | FileName | ) |
Mangle a filename by cutting off trailing whitespaces, "\\", "." and "..".
| [in] | FileName | Filename. |
| The | mangled Filename. |
Definition at line 110 of file FileName.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 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 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 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_STATUS EFIAPI UdfClose | ( | IN EFI_FILE_PROTOCOL * | This | ) |
| 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.
| 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. |
| EFI_SUCCESS | The 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_PARAMETER | ControllerHandle is not a valid EFI_HANDLE. |
| EFI_INVALID_PARAMETER | ChildHandle is not NULL and it is not a valid EFI_HANDLE. |
| EFI_INVALID_PARAMETER | Language is NULL. |
| EFI_INVALID_PARAMETER | ControllerName is NULL. |
| EFI_UNSUPPORTED | The driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle. |
| EFI_UNSUPPORTED | The 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.
| 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. |
| EFI_SUCCESS | The 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_PARAMETER | ControllerHandle is NULL. |
| EFI_INVALID_PARAMETER | ChildHandle is not NULL and it is not a valid EFI_HANDLE. |
| EFI_INVALID_PARAMETER | Language is NULL. |
| EFI_INVALID_PARAMETER | ControllerName is NULL. |
| EFI_UNSUPPORTED | The driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle. |
| EFI_UNSUPPORTED | The driver specified by This does not support the language specified by Language. |
Definition at line 170 of file ComponentName.c.
| 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.
| 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. |
| EFI_SUCCESS | The Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName. |
| EFI_INVALID_PARAMETER | Language is NULL. |
| EFI_INVALID_PARAMETER | DriverName is NULL. |
| EFI_UNSUPPORTED | The driver specified by This does not support the language specified by Language. |
Definition at line 85 of file ComponentName.c.
| EFI_STATUS EFIAPI UdfDelete | ( | IN EFI_FILE_PROTOCOL * | This | ) |
| 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.
| This | Protocol instance pointer. |
| ControllerHandle | Handle of device to bind driver to |
| RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
| EFI_SUCCESS | This driver is added to ControllerHandle |
| EFI_ALREADY_STARTED | This driver is already running on ControllerHandle |
| other | This 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.
| [in] | This | Protocol instance pointer. |
| [in] | ControllerHandle | Handle of device to bind driver to |
| [in] | RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
| EFI_SUCCESS | This driver is added to ControllerHandle. |
| EFI_ALREADY_STARTED | This driver is already running on ControllerHandle. |
| other | This driver does not support this device. |
| 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.
| This | Protocol instance pointer. |
| ControllerHandle | Handle of device to stop driver on |
| NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
| ChildHandleBuffer | List of Child Handles to Stop. |
| EFI_SUCCESS | This driver is removed ControllerHandle |
| other | This driver was not removed from this device |
| 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.
| This | Protocol instance pointer. |
| ControllerHandle | Handle of device to test |
| RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
| EFI_SUCCESS | This driver supports this device |
| EFI_ALREADY_STARTED | This driver is already running on this device |
| other | This 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.
| [in] | This | Protocol instance pointer. |
| [in] | ControllerHandle | Handle of device to test. |
| [in] | RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
| EFI_SUCCESS | This driver supports this device. |
| EFI_ALREADY_STARTED | This driver is already running on this device. |
| other | This driver does not support this device. |
| EFI_STATUS EFIAPI UdfFlush | ( | IN EFI_FILE_PROTOCOL * | This | ) |
Flush data back for the file handle.
| This | Protocol instance pointer. |
| EFI_SUCCESS | Data was flushed. |
| EFI_UNSUPPORTED | Writes to Open directory are 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_WRITE_PROTECTED | The device is write protected. |
| EFI_ACCESS_DENIED | The file was open for read only. |
| EFI_VOLUME_FULL | The volume is full. |
| 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.
The File Set Descriptor is external input, so this routine will do basic validation for File Set Descriptor and report status.
| This | Protocol instance pointer. |
| InformationType | Type of information to return in Buffer. |
| BufferSize | On input size of buffer, on output amount of data in buffer. |
| Buffer | The buffer to return data. |
| EFI_SUCCESS | Data was returned. |
| EFI_UNSUPPORTED | InformationType is 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_WRITE_PROTECTED | The device is write protected. |
| EFI_ACCESS_DENIED | The file was open for read only. |
| EFI_BUFFER_TOO_SMALL | Buffer was too small; required size returned in BufferSize. |
Get information about a file.
| This | Protocol instance pointer. |
| InformationType | Type of information to return in Buffer. |
| BufferSize | On input size of buffer, on output amount of data in buffer. |
| Buffer | The buffer to return data. |
| EFI_SUCCESS | Data was returned. |
| EFI_UNSUPPORTED | InformationType is 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_WRITE_PROTECTED | The device is write protected. |
| EFI_ACCESS_DENIED | The file was open for read only. |
| EFI_BUFFER_TOO_SMALL | Buffer was too small; required size returned in BufferSize. |
| EFI_STATUS EFIAPI UdfGetPosition | ( | IN EFI_FILE_PROTOCOL * | This, |
| OUT UINT64 * | Position | ||
| ) |
| 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.
| This | The protocol instance pointer. |
| NewHandle | Returns File Handle for FileName. |
| FileName | Null terminated string. "\", ".", and ".." are supported. |
| OpenMode | Open mode for file. |
| Attributes | Only used for EFI_FILE_MODE_CREATE. |
| EFI_SUCCESS | The device was opened. |
| EFI_NOT_FOUND | The specified file could not be found on the device. |
| EFI_NO_MEDIA | The device has no media. |
| EFI_MEDIA_CHANGED | The media has changed. |
| EFI_DEVICE_ERROR | The device reported an error. |
| EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
| EFI_ACCESS_DENIED | The service denied access to the file. |
| EFI_OUT_OF_RESOURCES | The volume was not opened due to lack of resources. |
| EFI_VOLUME_FULL | The volume is full. |
| EFI_STATUS EFIAPI UdfOpenVolume | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | This, |
| OUT EFI_FILE_PROTOCOL ** | Root | ||
| ) |
Open the root directory on a volume.
| This | Protocol instance pointer. |
| Root | Returns an Open file handle for the root directory |
| EFI_SUCCESS | The device was opened. |
| EFI_UNSUPPORTED | This volume does not support the file system. |
| 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_ACCESS_DENIED | The service denied access to the file. |
| EFI_OUT_OF_RESOURCES | The volume was not opened due to lack of resources. |
| EFI_STATUS EFIAPI UdfRead | ( | IN EFI_FILE_PROTOCOL * | This, |
| IN OUT UINTN * | BufferSize, | ||
| OUT VOID * | Buffer | ||
| ) |
Read data from the file.
| This | Protocol instance pointer. |
| BufferSize | On input size of buffer, on output amount of data in buffer. |
| Buffer | The buffer in which data is read. |
| EFI_SUCCESS | Data was 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_BUFFER_TO_SMALL | BufferSize is too small. BufferSize contains required size. |
| EFI_STATUS EFIAPI UdfSetInfo | ( | IN EFI_FILE_PROTOCOL * | This, |
| IN EFI_GUID * | InformationType, | ||
| IN UINTN | BufferSize, | ||
| IN VOID * | Buffer | ||
| ) |
Set information about a file.
| This | Protocol instance pointer. |
| InformationType | Type of information in Buffer. |
| BufferSize | Size of buffer. |
| Buffer | The data to write. |
| EFI_SUCCESS | Data was set. |
| EFI_UNSUPPORTED | InformationType is 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_WRITE_PROTECTED | The device is write protected. |
| EFI_ACCESS_DENIED | The file was open for read only. |
| EFI_STATUS EFIAPI UdfSetPosition | ( | IN EFI_FILE_PROTOCOL * | This, |
| IN UINT64 | Position | ||
| ) |
| EFI_STATUS EFIAPI UdfWrite | ( | IN EFI_FILE_PROTOCOL * | This, |
| IN OUT UINTN * | BufferSize, | ||
| IN VOID * | Buffer | ||
| ) |
Write data to a file.
| This | Protocol instance pointer. |
| BufferSize | On input size of buffer, on output amount of data in buffer. |
| Buffer | The buffer in which data to write. |
| EFI_SUCCESS | Data was written. |
| EFI_UNSUPPORTED | Writes to Open directory are not supported. |
| EFI_NO_MEDIA | The device has no media. |
| EFI_DEVICE_ERROR | The device reported an error. |
| EFI_DEVICE_ERROR | An attempt was made to write to a deleted file. |
| EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
| EFI_WRITE_PROTECTED | The device is write protected. |
| EFI_ACCESS_DENIED | The file was open for read only. |
| EFI_VOLUME_FULL | The volume is full. |
|
extern |
Definition at line 14 of file ComponentName.c.
|
extern |
Definition at line 23 of file ComponentName.c.
|
extern |