TianoCore EDK2 master
|
#include "Partition.h"
Go to the source code of this file.
Data Structures | |
struct | UDF_DEVICE_PATH |
Macros | |
#define | MAX_CORRECTION_BLOCKS_NUM 512u |
#define | EFI_UDF_DEVICE_PATH_GUID |
Variables | |
EFI_GUID | gUdfDevPathGuid = EFI_UDF_DEVICE_PATH_GUID |
UDF_DEVICE_PATH | gUdfDevicePath |
Scan for an UDF file system on a formatted media.
Caution: This file requires additional review when modified. This driver will have external input - CD/DVD media. This external input must be validated carefully to avoid security issue like buffer overflow, integer overflow.
FindUdfFileSystem() routine will consume the media properties and do basic validation.
Copyright (c) 2018 Qualcomm Datacenter Technologies, Inc. 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.c.
#define EFI_UDF_DEVICE_PATH_GUID |
EFI_STATUS FindAnchorVolumeDescriptorPointer | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
OUT UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER * | AnchorPoint, | ||
OUT EFI_LBA * | LastRecordedBlock | ||
) |
Find the anchor volume descriptor pointer.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[out] | AnchorPoint | Anchor volume descriptor pointer. |
[out] | LastRecordedBlock | Last recorded block. |
EFI_SUCCESS | Anchor volume descriptor pointer found. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
other | Anchor volume descriptor pointer not found. |
EFI_STATUS FindLogicalVolumeLocation | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER * | AnchorPoint, | ||
IN EFI_LBA | LastRecordedBlock, | ||
OUT UINT64 * | MainVdsStartBlock, | ||
OUT UINT64 * | MainVdsEndBlock | ||
) |
Find UDF logical volume location and whether it is supported by current EDK2 UDF file system implementation.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[in] | AnchorPoint | Anchor volume descriptor pointer. |
[in] | LastRecordedBlock | Last recorded block in media. |
[out] | MainVdsStartBlock | Main VDS starting block number. |
[out] | MainVdsEndBlock | Main VDS ending block number. |
EFI_SUCCESS | UDF logical volume was found. |
EFI_VOLUME_CORRUPTED | UDF file system structures are corrupted. |
EFI_UNSUPPORTED | UDF logical volume is not supported. |
other | Failed to perform disk I/O. |
EFI_STATUS FindUdfFileSystem | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
OUT EFI_LBA * | StartingLBA, | ||
OUT EFI_LBA * | EndingLBA | ||
) |
Find a supported UDF file system in block device.
The CD/DVD media is the external input, so this routine will do basic validation for the media.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
[out] | StartingLBA | UDF file system starting LBA. |
[out] | EndingLBA | UDF file system starting LBA. |
EFI_SUCCESS | UDF file system was found. |
other | UDF file system was not found. |
EFI_STATUS FindUdfVolumeIdentifiers | ( | IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, |
IN EFI_DISK_IO_PROTOCOL * | DiskIo | ||
) |
Find UDF volume identifiers in a Volume Recognition Sequence.
[in] | BlockIo | BlockIo interface. |
[in] | DiskIo | DiskIo interface. |
EFI_SUCCESS | UDF volume identifiers were found. |
EFI_NOT_FOUND | UDF volume identifiers were not found. |
other | Failed to perform disk I/O. |
BOOLEAN IsLogicalVolumeDescriptorSupported | ( | UDF_LOGICAL_VOLUME_DESCRIPTOR * | LogicalVolDesc | ) |
Check if Logical Volume Descriptor is supported by current EDK2 UDF file system implementation.
[in] | LogicalVolDesc | Logical Volume Descriptor pointer. |
TRUE | Logical Volume Descriptor is supported. |
FALSE | Logical Volume Descriptor is not supported. |
EFI_STATUS PartitionInstallUdfChildHandles | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Handle, | ||
IN EFI_DISK_IO_PROTOCOL * | DiskIo, | ||
IN EFI_DISK_IO2_PROTOCOL * | DiskIo2, | ||
IN EFI_BLOCK_IO_PROTOCOL * | BlockIo, | ||
IN EFI_BLOCK_IO2_PROTOCOL * | BlockIo2, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ||
) |
Install child handles if the Handle supports UDF/ECMA-167 volume format.
[in] | This | Calling context. |
[in] | Handle | Parent Handle. |
[in] | DiskIo | Parent DiskIo interface. |
[in] | DiskIo2 | Parent DiskIo2 interface. |
[in] | BlockIo | Parent BlockIo interface. |
[in] | BlockIo2 | Parent BlockIo2 interface. |
[in] | DevicePath | Parent Device Path |
EFI_SUCCESS | Child handle(s) was added. |
EFI_MEDIA_CHANGED | Media changed Detected. |
other | no child handle was added. |
UDF_DEVICE_PATH gUdfDevicePath |