Specifications
Version 2.0
51
EFI_SHELL_PROTOCOL.WriteFile()
Summary
Writes data to the file.
Prototype
typedef
EFI_STATUS
(EFIAPI EFI_SHELL_WRITE_FILE)(
IN EFI_FILE_HANDLE FileHandle,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
Parameters
FileHandle
The opened file handle for writing.
BufferSize
On input, size of Buffer.
Buffer
The buffer in which data to write.
Description
This 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 “volume space full”). The file automatically grows to
hold the data, if required.
Direct writes to opened directories are not supported.
Status Codes Returned
EFI_SUCCESS Data was written.
EFI_UNSUPPORTED Writes to open directory are not supported
EFI_NO_MEDIA The device has no media
EFI_DEVICE_ERROR The device reported an error
EFI_VOLUME_CORRUPTED The file system structures are corrupted
EFI_WRITE_PROTECTED The device is write-protected
EFI_ACCESS_DENIED The file was open for read only
EFI_VOLUME_FULL The volume is full










