Sample shell scripts, Examples – HP Unified Extensible Firmware Interface User Manual
Page 69
Table 13 UEFI Application APIs (continued)
Description
Function Name
Function Type
Gets the enable status of the page break
output mode.
GetPageBreak
EFI_SHELL_GET_PAGE_BREAK
Gets the name of the device specified by the
device handle.
GetDeviceName
EFI_SHELL_GET_DEVICE_NAME
Return information about a specific file
handle.
GetFileInfo
EFI_SHELL_GET_FILE_INFO
Change information about a specific file
handle.
SetFileInfo
EFI_SHELL_SET_FILE_INFO
Given a file name, open a file and return a
file handle.
OpenFileByName
EFI_SHELL_OPEN_FILE_BY_NAME
Close an open file.
CloseFile
EFI_SHELL_CLOSE_FILE
Create a new file.
CreateFile
EFI_SHELL_CREATE_FILE
Read data from a file.
ReadFile
EFI_SHELL_READ_FILE
Write data to a file.
WriteFile
EFI_SHELL_WRITE_FILE
Delete a file.
DeleteFile
EFI_SHELL_DELETE_FILE
Delete a file by name.
DeleteFileByName
EFI_SHELL_DELETE_FILE_BY_NAME
Return the current read/write position within
a file.
GetFilePosition
EFI_SHELL_GET_FILE_POSITION
Change the current read/write position within
a file.
SetFilePosition
EFI_SHELL_SET_FILE_POSITION
Write all buffered data to a file.
FlushFile
EFI_SHELL_FLUSH_FILE
Return all files that match a pattern in a file
list.
FindFiles
EFI_SHELL_FIND_FILES
Return all files in a specified directory in a
file list.
FindFilesInDir
EFI_SHELL_FIND_FILES_IN_DIR
Return the size of a file.
GetFileSize
EFI_SHELL_GET_FILE_SIZE
Return the root directory of a file system.
OpenRoot
EFI_SHELL_OPEN_ROOT
Return the root directory of a file system on a
particular handle.
OpenRootByHandle
EFI_SHELL_OPEN_ROOT_BY_HANDLE
Event signaled by the UEFI Shell when the
user presses CTRL-C to indicate that the current
ExecutionBreak
EFI_EVENT
UEFI Shell command execution should be
interrupted.
The major version of the shell environment.
MajorVersion
UINT32
The minor version of the shell environment.
MinorVersion
UINT32
This sample script shows some protocol functions.
Sample Shell scripts
Examples
The following sample scripts how to capture a configuration (export) and replicate it (import) from
startup.nsh mounted on an iLO virtual media..
Sample Shell scripts
69