Description, Status codes returned – Intel Extensible Firmware Interface User Manual

Page 383

Advertising
background image

Protocols

— Bootable Image Support

Version 1.10

12/01/02

11-23

#define EFI_FILE_RESERVED 0x0000000000000008
#define EFI_FILE_DIRECTORY 0x0000000000000010
#define EFI_FILE_ARCHIVE 0x0000000000000020
#define EFI_FILE_VALID_ATTR 0x0000000000000037

Description

The

Open()

function opens the file or directory referred to by

FileName

relative to the location

of

This

and returns a

NewHandle

. The

FileName

may include the following path modifiers:

“\”

If the filename starts with a “\” the relative location is the root directory
that

This

residues on; otherwise “\” separates name components. Each

name component is opened in turn, and the handle to the last file opened
is returned.

.

Opens the current location.

..

Opens the parent directory for the current location. If the location is the
root directory the request will return an error, as there is no parent
directory for the root directory.

If

EFI_FILE_MODE_CREATE

is set, then the file is created in the directory. If the final location

of

FileName

does not refer to a directory, then the operation fails. If the file does not exist in the

directory, then a new file is created. If the file already exists in the directory, then the existing file
is opened.

If the medium of the device changes, all accesses (including the File handle) will result in

EFI_MEDIA_CHANGED

. To access the new medium, the volume must be reopened.

Status Codes Returned

EFI_SUCCESS

The file was opened.

EFI_NOT_FOUND

The specified file could not be found on the device.

EFI_NO_MEDIA

The device has no medium.

EFI_MEDIA_CHANGED

The device has a different medium in it or the medium is no
longer supported.

EFI_DEVICE_ERROR

The device reported an error.

EFI_VOLUME_CORRUPTED

The file system structures are corrupted.

EFI_WRITE_PROTECTED

An attempt was made to create a file, or open a file for write
when the media is write protected.

EFI_ACCESS_DENIED

The service denied access to the file.

EFI_OUT_OF_RESOURCES

Not enough resources were available to open the file.

EFI_VOLUME_FULL

The volume is full.

Advertising