]> code.delx.au - refind/blobdiff - filesystems/edk2/ComponentName.h
Changed names in ComponentName.h, included from TianoCore, and
[refind] / filesystems / edk2 / ComponentName.h
index a4c3749133ca28a2f1d683720d417ce958532b3e..7fcc6f779eec400dd7d88f13395e17fa4184412a 100644 (file)
@@ -14,24 +14,37 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef __EFI_COMPONENT_NAME_H__\r
-#define __EFI_COMPONENT_NAME_H__\r
+/*\r
+ * rEFInd NOTE: This file is included only when compiling with GNU-EFI,\r
+ * which has not traditionally provided the definitions supplied here.\r
+ * Unfortunately, recent (ca. 3.0.4) versions of GNU-EFI have added\r
+ * SOME of these functions to an existing header file, creating problems\r
+ * when trying to maintain compatibility with multiple GNU-EFI versions.\r
+ * I've therefore renamed the relevant defines, types, and functions,\r
+ * both here and in fsw_efi.c; and included a define to match the only\r
+ * used name (REFIND_EFI_COMPONENT_NAME_PROTOCOL) to the traditional\r
+ * name (EFI_COMPONENT_NAME_PROTOCOL) in fsw_efi.c for compiling with\r
+ * TianoCore.\r
+ */\r
+\r
+#ifndef __REFIND_EFI_COMPONENT_NAME_H__\r
+#define __REFIND_EFI_COMPONENT_NAME_H__\r
 \r
 ///\r
 /// The global ID for the Component Name Protocol.\r
 ///\r
-#define EFI_COMPONENT_NAME_PROTOCOL_GUID \\r
+#define REFIND_EFI_COMPONENT_NAME_PROTOCOL_GUID \\r
   { \\r
     0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
   }\r
 \r
-typedef struct _EFI_COMPONENT_NAME_PROTOCOL  EFI_COMPONENT_NAME_PROTOCOL;\r
+typedef struct _REFIND_EFI_COMPONENT_NAME_PROTOCOL  REFIND_EFI_COMPONENT_NAME_PROTOCOL;\r
 \r
 \r
 /**\r
   Retrieves a Unicode string that is the user-readable name of the EFI Driver.\r
 \r
-  @param  This       A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param  This       A pointer to the REFIND_EFI_COMPONENT_NAME_PROTOCOL instance.\r
   @param  Language   A pointer to a three-character ISO 639-2 language identifier.\r
                      This is the language of the driver name that that the caller\r
                      is requesting, and it must match one of the languages specified\r
@@ -52,8 +65,8 @@ typedef struct _EFI_COMPONENT_NAME_PROTOCOL  EFI_COMPONENT_NAME_PROTOCOL;
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFI_FUNCTION EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)(\r
-  IN EFI_COMPONENT_NAME_PROTOCOL           *This,\r
+(EFI_FUNCTION EFIAPI *REFIND_EFI_COMPONENT_NAME_GET_DRIVER_NAME)(\r
+  IN REFIND_EFI_COMPONENT_NAME_PROTOCOL    *This,\r
   IN  CHAR8                                *Language,\r
   OUT CHAR16                               **DriverName\r
   );\r
@@ -63,7 +76,7 @@ EFI_STATUS
   Retrieves a Unicode string that is the user readable name of the controller\r
   that is being managed by an EFI Driver.\r
 \r
-  @param  This             A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param  This             A pointer to the REFIND_EFI_COMPONENT_NAME_PROTOCOL instance.\r
   @param  ControllerHandle The handle of a controller that the driver specified by\r
                            This is managing.  This handle specifies the controller\r
                            whose name is to be returned.\r
@@ -101,8 +114,8 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFI_FUNCTION EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)(\r
-  IN EFI_COMPONENT_NAME_PROTOCOL                              *This,\r
+(EFI_FUNCTION EFIAPI *REFIND_EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)(\r
+  IN  REFIND_EFI_COMPONENT_NAME_PROTOCOL                      *This,\r
   IN  EFI_HANDLE                                              ControllerHandle,\r
   IN  EFI_HANDLE                                              ChildHandle        OPTIONAL,\r
   IN  CHAR8                                                   *Language,\r
@@ -113,9 +126,9 @@ EFI_STATUS
 /// This protocol is used to retrieve user readable names of drivers \r
 /// and controllers managed by UEFI Drivers.\r
 ///\r
-struct _EFI_COMPONENT_NAME_PROTOCOL {\r
-  EFI_COMPONENT_NAME_GET_DRIVER_NAME      GetDriverName;\r
-  EFI_COMPONENT_NAME_GET_CONTROLLER_NAME  GetControllerName;\r
+struct _REFIND_EFI_COMPONENT_NAME_PROTOCOL {\r
+  REFIND_EFI_COMPONENT_NAME_GET_DRIVER_NAME      GetDriverName;\r
+  REFIND_EFI_COMPONENT_NAME_GET_CONTROLLER_NAME  GetControllerName;\r
   ///\r
   /// A Null-terminated ASCII string that contains one or more\r
   /// ISO 639-2 language codes. This is the list of language codes\r