Efi_file_io_interface.openvolume(), Efi_file_io_interface.openvolume() summary, Prototype – Intel Extensible Firmware Interface User Manual

Page 379: Parameters, Description, Status codes returned

Advertising
background image

Protocols

— Bootable Image Support

Version 1.10

12/01/02

11-19

EFI_FILE_IO_INTERFACE.OpenVolume()

Summary

Opens the root directory on a volume.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_VOLUME_OPEN) (
IN EFI_FILE_IO_INTERFACE

*This,

OUT EFI_FILE

**Root

);

Parameters

This

A pointer to the volume to open the root directory of. See the type

EFI_FILE_IO_INTERFACE

description.

Root

A pointer to the location to return the opened file handle for the root
directory. See the type

EFI_FILE

protocol description.

Description

The

OpenVolume()

function opens a volume, and returns a file handle to the volume’s root

directory. This handle is used to perform all other file I/O operations. The volume remains open
until all the file handles to it are closed.

If the medium is changed while there are open file handles to the volume, all file handles to the
volume will return

EFI_MEDIA_CHANGED

. To access the files on the new medium, the volume

must be reopened with

OpenVolume()

. If the new medium is a different file system than the one

supplied in the

EFI_HANDLE

’s

DevicePath

for the Simple File System protocol,

OpenVolume()

will return

EFI_UNSUPPORTED

.

Status Codes Returned

EFI_SUCCESS

The file volume was opened.

EFI_UNSUPPORTED

The volume does not support the requested file system type.

EFI_NO_MEDIA

The device has no medium.

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 file volume was not opened.

EFI_MEDIA_CHANGED

The device has a different medium in it or the medium is no
longer supported. Any existing file handles for this volume are
no longer valid. To access the files on the new medium, the
volume must be reopened with

OpenVolume()

.

Advertising