]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/DevicePathDxe/DevicePath.c
remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Universal / DevicePathDxe / DevicePath.c
CommitLineData
95276127 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 DevicePathDriver.c\r
15\r
16Abstract:\r
17\r
18 Device Path Driver to produce DevPathUtilities Protocol, DevPathFromText Protocol\r
19 and DevPathToText Protocol.\r
20\r
21--*/\r
22\r
95276127 23#include "DevicePath.h"\r
24\r
25EFI_HANDLE mDevicePathHandle = NULL;\r
26\r
27GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DEVICE_PATH_UTILITIES_PROTOCOL mDevicePathUtilities = {\r
28 GetDevicePathSizeProtocolInterface,\r
29 DuplicateDevicePathProtocolInterface,\r
30 AppendDevicePathProtocolInterface,\r
31 AppendDeviceNodeProtocolInterface,\r
32 AppendDevicePathInstanceProtocolInterface,\r
33 GetNextDevicePathInstanceProtocolInterface,\r
34 IsDevicePathMultiInstanceProtocolInterface,\r
35 CreateDeviceNodeProtocolInterface\r
36};\r
37\r
38GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DEVICE_PATH_TO_TEXT_PROTOCOL mDevicePathToText = {\r
39 ConvertDeviceNodeToText,\r
40 ConvertDevicePathToText\r
41};\r
42\r
43GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL mDevicePathFromText = {\r
44 ConvertTextToDeviceNode, \r
45 ConvertTextToDevicePath \r
46};\r
47\r
48GLOBAL_REMOVE_IF_UNREFERENCED const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;\r
49GLOBAL_REMOVE_IF_UNREFERENCED const EFI_GUID mEfiDevicePathMessagingSASGuid = DEVICE_PATH_MESSAGING_SAS;\r
50\r
51EFI_STATUS\r
52EFIAPI\r
53DevicePathEntryPoint (\r
54 IN EFI_HANDLE ImageHandle,\r
55 IN EFI_SYSTEM_TABLE *SystemTable\r
56 )\r
57/*++\r
58\r
59 Routine Description:\r
60 Entry point for EFI drivers.\r
61\r
62 Arguments:\r
63 ImageHandle - EFI_HANDLE\r
64 SystemTable - EFI_SYSTEM_TABLE\r
65\r
66 Returns:\r
67 EFI_SUCCESS\r
68 others\r
69\r
70--*/\r
71{\r
72 EFI_STATUS Status;\r
73 \r
74 Status = EFI_UNSUPPORTED;\r
75 if (FeaturePcdGet (PcdDevicePathSupportDevicePathToText)) {\r
76 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText)) {\r
77 Status = gBS->InstallMultipleProtocolInterfaces (\r
78 &mDevicePathHandle,\r
79 &gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,\r
80 &gEfiDevicePathToTextProtocolGuid, &mDevicePathToText,\r
81 &gEfiDevicePathFromTextProtocolGuid, &mDevicePathFromText,\r
82 NULL\r
83 );\r
84 } else {\r
85 Status = gBS->InstallMultipleProtocolInterfaces (\r
86 &mDevicePathHandle,\r
87 &gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,\r
88 &gEfiDevicePathToTextProtocolGuid, &mDevicePathToText,\r
89 NULL\r
90 );\r
91 }\r
92 } else {\r
93 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText)) {\r
94 Status = gBS->InstallMultipleProtocolInterfaces (\r
95 &mDevicePathHandle,\r
96 &gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,\r
97 &gEfiDevicePathFromTextProtocolGuid, &mDevicePathFromText,\r
98 NULL\r
99 );\r
100 } else {\r
101 Status = gBS->InstallMultipleProtocolInterfaces (\r
102 &mDevicePathHandle,\r
103 &gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,\r
104 NULL\r
105 );\r
106 }\r
107 }\r
108 return Status;\r
109}\r