File System Protocol
Version 1.02 12/12/00 189
10.1.1 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. Type
EFI_FILE_IO_INTERFACE is defined in Section 10.1.
Root A pointer to the location to return the opened file handle for the root
directory. Type EFI_FILE is defined in Section 10.2.
Description
The OpenVolume() function opens a volume, and returns a file handle to the volumes 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 re-opened with OpenVolume(). If the new medium is a different file syst em 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.