*/
#include "driver_support.h"
-#include "refit_call_wrapper.h"
+#include "lib.h"
+#include "../include/refit_call_wrapper.h"
+#ifdef __MAKEWITH_GNUEFI
// Following "global" constants are from EDK2's AutoGen.c....
EFI_GUID gEfiLoadedImageProtocolGuid = { 0x5B1B31A1, 0x9562, 0x11D2, { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }};
EFI_GUID gEfiDriverBindingProtocolGuid = { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71 }};
EFI_GUID gEfiComponentNameProtocolGuid = { 0x107A772C, 0xD5E1, 0x11D4, { 0x9A, 0x46, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }};
EFI_GUID gEfiComponentName2ProtocolGuid = { 0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14 }};
EFI_GUID gEfiDevicePathProtocolGuid = { 0x09576E91, 0x6D3F, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }};
+#endif
// Below is from http://git.etherboot.org/?p=mirror/efi/shell/.git;a=commitdiff;h=b1b0c63423cac54dc964c2930e04aebb46a946ec;
// Seems to have been replaced by ParseHandleDatabaseByRelationshipWithType(), but the latter isn't working for me....
UINTN OpenInfoIndex;
UINTN ChildIndex;
BOOLEAN DriverBindingHandleIndexValid;
- BOOLEAN ControllerHandleIndexValid;
+// BOOLEAN ControllerHandleIndexValid;
DriverBindingHandleIndexValid = FALSE;
if (DriverBindingHandleIndex != NULL) {
*DriverBindingHandleIndex = 0xffffffff;
}
- ControllerHandleIndexValid = FALSE;
+// ControllerHandleIndexValid = FALSE;
if (ControllerHandleIndex != NULL) {
*ControllerHandleIndex = 0xffffffff;
}
if (ControllerHandle != NULL && ControllerHandleIndex != NULL && (*HandleBuffer)[HandleIndex] == ControllerHandle) {
*ControllerHandleIndex = (UINT32) HandleIndex;
- ControllerHandleIndexValid = TRUE;
+// ControllerHandleIndexValid = TRUE;
}
}
}
}
- FreePool (OpenInfo);
+ MyFreePool (OpenInfo);
}
}
- FreePool (ProtocolGuidArray);
+ MyFreePool (ProtocolGuidArray);
}
}
return EFI_SUCCESS;
Error:
- if (*HandleType != NULL) {
- FreePool (*HandleType);
- }
-
- if (*HandleBuffer != NULL) {
- FreePool (*HandleBuffer);
- }
+ MyFreePool (*HandleType);
+ MyFreePool (*HandleBuffer);
*HandleCount = 0;
*HandleBuffer = NULL;