TianoCore EDK2 master
Loading...
Searching...
No Matches
DevicePath.c
Go to the documentation of this file.
1
10#include <Uefi.h>
17#include <Library/PcdLib.h>
18
28};
29
33};
34
38};
39
54EFIAPI
56 IN EFI_HANDLE ImageHandle,
57 IN EFI_SYSTEM_TABLE *SystemTable
58 )
59{
60 EFI_STATUS Status;
61 EFI_HANDLE Handle;
62
63 Handle = NULL;
64 Status = EFI_UNSUPPORTED;
65 if (FeaturePcdGet (PcdDevicePathSupportDevicePathToText)) {
66 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText)) {
67 Status = gBS->InstallMultipleProtocolInterfaces (
68 &Handle,
69 &gEfiDevicePathUtilitiesProtocolGuid,
70 &mDevicePathUtilities,
71 &gEfiDevicePathToTextProtocolGuid,
72 &mDevicePathToText,
73 &gEfiDevicePathFromTextProtocolGuid,
74 &mDevicePathFromText,
75 NULL
76 );
77 } else {
78 Status = gBS->InstallMultipleProtocolInterfaces (
79 &Handle,
80 &gEfiDevicePathUtilitiesProtocolGuid,
81 &mDevicePathUtilities,
82 &gEfiDevicePathToTextProtocolGuid,
83 &mDevicePathToText,
84 NULL
85 );
86 }
87 } else {
88 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText)) {
89 Status = gBS->InstallMultipleProtocolInterfaces (
90 &Handle,
91 &gEfiDevicePathUtilitiesProtocolGuid,
92 &mDevicePathUtilities,
93 &gEfiDevicePathFromTextProtocolGuid,
94 &mDevicePathFromText,
95 NULL
96 );
97 } else {
98 Status = gBS->InstallMultipleProtocolInterfaces (
99 &Handle,
100 &gEfiDevicePathUtilitiesProtocolGuid,
101 &mDevicePathUtilities,
102 NULL
103 );
104 }
105 }
106
107 return Status;
108}
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
CHAR16 *EFIAPI ConvertDeviceNodeToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI CreateDeviceNode(IN UINT8 NodeType, IN UINT8 NodeSubType, IN UINT16 NodeLength)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI GetNextDevicePathInstance(IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT UINTN *Size)
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DuplicateDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI ConvertTextToDevicePath(IN CONST CHAR16 *TextDevicePath)
BOOLEAN EFIAPI IsDevicePathMultiInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI ConvertTextToDeviceNode(IN CONST CHAR16 *TextDeviceNode)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
#define FeaturePcdGet(TokenName)
Definition: PcdLib.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS
EFI_STATUS EFIAPI DevicePathEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: DevicePath.c:55