mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 19:04:38 +00:00
efi_loader: comments for efi_file_from_path()
Add more comments for efi_file_from_path(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
caf6d2fd1a
commit
95288b1e94
1 changed files with 11 additions and 1 deletions
|
@ -641,6 +641,12 @@ static const struct efi_file_handle efi_file_handle_protocol = {
|
||||||
.flush = efi_file_flush,
|
.flush = efi_file_flush,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* efi_file_from_path() - open file via device path
|
||||||
|
*
|
||||||
|
* @fp: device path
|
||||||
|
* @return: EFI_FILE_PROTOCOL for the file or NULL
|
||||||
|
*/
|
||||||
struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp)
|
struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp)
|
||||||
{
|
{
|
||||||
struct efi_simple_file_system_protocol *v;
|
struct efi_simple_file_system_protocol *v;
|
||||||
|
@ -655,10 +661,14 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp)
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* skip over device-path nodes before the file path: */
|
/* Skip over device-path nodes before the file path. */
|
||||||
while (fp && !EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH))
|
while (fp && !EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH))
|
||||||
fp = efi_dp_next(fp);
|
fp = efi_dp_next(fp);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Step through the nodes of the directory path until the actual file
|
||||||
|
* node is reached which is the final node in the device path.
|
||||||
|
*/
|
||||||
while (fp) {
|
while (fp) {
|
||||||
struct efi_device_path_file_path *fdp =
|
struct efi_device_path_file_path *fdp =
|
||||||
container_of(fp, struct efi_device_path_file_path, dp);
|
container_of(fp, struct efi_device_path_file_path, dp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue