Specifications
Version 2.0
23
EFI_SHELL_PROTOCOL.GetDeviceName()
Summary
Gets the name of the device specified by the device handle.
Prototype
typedef
EFI_STATUS
(*EFI_SHELL_GET_DEVICE_NAME) (
IN EFI_HANDLE DeviceHandle,
IN EFI_SHELL_DEVICE_NAME_FLAGS Flags,
IN CHAR8 *Language,
OUT CHAR16 **BestDeviceName
);
Parameters
DeviceHandle
The handle of the device.
Flags
Determines the possible sources of component names. See “Related Definitions”
below for more information.
Language
A pointer to the language specified for the device name, in the same format as
described in the UEFI specification, Appendix M
BestDeviceName
On return, points to the callee-allocated null-terminated name of the device. If
no device name could be found, points to NULL. The name must be freed by the
caller..
Description
This function gets the user-readable name of the device specified by the device
handle. If no user-readable name could be generated, then *BestDeviceName will be
NULL and EFI_NOT_FOUND will be returned.
The
Related Definitions
typedef UINT32 EFI_DEVICE_NAME_FLAGS;
#define EFI_DEVICE_NAME_USE_COMPONENT_NAME 0x00000001
#define EFI_DEVICE_NAME_USE_DEVICE_PATH 0x00000002
If EFI_DEVICE_NAME_USE_COMPONENT_NAME is set, then the function will return the
device’s name using the EFI_COMPONENT_NAME2_PROTOCOL, if present on
DeviceHandle.










