Efi_file.write(), Write(), Efi_file.write() summary – Intel Extensible Firmware Interface User Manual
Page 387: Parameters, Description, Status codes returned
Protocols
— Bootable Image Support
Version 1.10
12/01/02
11-27
EFI_FILE.Write()
Summary
Writes data to a file.
EFI_STATUS
(EFIAPI *EFI_FILE_WRITE) (
IN
EFI_FILE
*This,
IN OUT UINTN
*BufferSize,
IN
VOID
*Buffer
);
Parameters
This
A pointer to the
instance that is the file handle to write data
to. See the type
EFI_FILE
protocol description.
BufferSize
On input, the size of the
Buffer
. On output, the amount of data
actually written. In both cases, the size is measured in bytes.
Buffer
The buffer of data to write.
Description
The
Write()
function writes the specified number of bytes to the file at the current file position.
The current file position is advanced the actual number of bytes written, which is returned in
BufferSize
. Partial writes only occur when there has been a data error during the write attempt
(such as “file space full”). The file is automatically grown to hold the data if required.
Direct writes to opened directories are not supported.
Status Codes Returned
EFI_SUCCESS
The data was written.
EFI_UNSUPPORT
Writes to open directory files are not supported.
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_WRITE_PROTECTED
The file or medium is write protected.
EFI_ACCESS_DENIED
The file was opened read only.
EFI_VOLUME_FULL
The volume is full.