|
@@ -90,12 +90,29 @@ efi_driver_get_driver_name ( EFI_COMPONENT_NAME2_PROTOCOL *wtf,
|
90
|
90
|
*/
|
91
|
91
|
static EFI_STATUS EFIAPI
|
92
|
92
|
efi_driver_get_controller_name ( EFI_COMPONENT_NAME2_PROTOCOL *wtf __unused,
|
93
|
|
- EFI_HANDLE device __unused,
|
94
|
|
- EFI_HANDLE child __unused,
|
95
|
|
- CHAR8 *language __unused,
|
96
|
|
- CHAR16 **controller_name __unused ) {
|
|
93
|
+ EFI_HANDLE device, EFI_HANDLE child,
|
|
94
|
+ CHAR8 *language, CHAR16 **controller_name ) {
|
|
95
|
+ EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
|
96
|
+ union {
|
|
97
|
+ EFI_COMPONENT_NAME2_PROTOCOL *name2;
|
|
98
|
+ void *interface;
|
|
99
|
+ } name2;
|
|
100
|
+ EFI_STATUS efirc;
|
|
101
|
+
|
|
102
|
+ /* Delegate to the EFI_COMPONENT_NAME2_PROTOCOL instance
|
|
103
|
+ * installed on child handle, if present.
|
|
104
|
+ */
|
|
105
|
+ if ( ( child != NULL ) &&
|
|
106
|
+ ( ( efirc = bs->OpenProtocol (
|
|
107
|
+ child, &efi_component_name2_protocol_guid,
|
|
108
|
+ &name2.interface, NULL, NULL,
|
|
109
|
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL ) ) == 0 ) ) {
|
|
110
|
+ return name2.name2->GetControllerName ( name2.name2, device,
|
|
111
|
+ child, language,
|
|
112
|
+ controller_name );
|
|
113
|
+ }
|
97
|
114
|
|
98
|
|
- /* Just let EFI use the default Device Path Name */
|
|
115
|
+ /* Otherwise, let EFI use the default Device Path Name */
|
99
|
116
|
return EFI_UNSUPPORTED;
|
100
|
117
|
}
|
101
|
118
|
|