\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
//\r
// allocate a new entry\r
//\r
if ((ProtEntry == NULL) && Create) {\r
- ProtEntry = CoreAllocateBootServicesPool (sizeof(PROTOCOL_ENTRY));\r
+ ProtEntry = AllocatePool (sizeof(PROTOCOL_ENTRY));\r
\r
if (ProtEntry != NULL) {\r
//\r
Prot = NULL;\r
Handle = NULL;\r
\r
- if (*UserHandle != NULL_HANDLE) {\r
+ if (*UserHandle != NULL) {\r
Status = CoreHandleProtocol (*UserHandle, Protocol, (VOID **)&ExistingInterface);\r
if (!EFI_ERROR (Status)) {\r
return EFI_INVALID_PARAMETER;\r
//\r
// Allocate a new protocol interface structure\r
//\r
- Prot = CoreAllocateZeroBootServicesPool (sizeof(PROTOCOL_INTERFACE));\r
+ Prot = AllocateZeroPool (sizeof(PROTOCOL_INTERFACE));\r
if (Prot == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
Handle = (IHANDLE *)*UserHandle;\r
if (Handle == NULL) {\r
- Handle = CoreAllocateZeroBootServicesPool (sizeof(IHANDLE));\r
+ Handle = AllocateZeroPool (sizeof(IHANDLE));\r
if (Handle == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
DeviceHandle = NULL;\r
DevicePath = Interface;\r
Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, &DeviceHandle);\r
- if (!EFI_ERROR (Status) && (DeviceHandle != NULL_HANDLE) && IsDevicePathEnd(DevicePath)) {\r
+ if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(DevicePath)) {\r
Status = EFI_ALREADY_STARTED;\r
continue;\r
}\r
//\r
Status = CoreInstallProtocolInterface (Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
}\r
+ VA_END (Args);\r
\r
//\r
// If there was an error, remove all the interfaces that were installed without any errors\r
Interface = VA_ARG (Args, VOID *);\r
CoreUninstallProtocolInterface (*Handle, Protocol, Interface);\r
}\r
+ VA_END (Args);\r
+ \r
*Handle = OldHandle;\r
}\r
\r
//\r
Status = CoreUninstallProtocolInterface (Handle, Protocol, Interface);\r
}\r
+ VA_END (Args);\r
\r
//\r
// If there was an error, add all the interfaces that were\r
Interface = VA_ARG(Args, VOID *);\r
CoreInstallProtocolInterface (&Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
}\r
+ VA_END (Args);\r
}\r
\r
return Status;\r
@param Interface Supplies the address where a pointer to the\r
corresponding Protocol Interface is returned.\r
\r
- @return The requested protocol interface for the handle\r
+ @retval EFI_SUCCESS The interface information for the specified protocol was returned.\r
+ @retval EFI_UNSUPPORTED The device does not support the specified protocol.\r
+ @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE..\r
+ @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+ @retval EFI_INVALID_PARAMETER Interface is NULL.\r
\r
**/\r
EFI_STATUS\r
//\r
// Create new entry\r
//\r
- OpenData = CoreAllocateBootServicesPool (sizeof(OPEN_PROTOCOL_DATA));\r
+ OpenData = AllocatePool (sizeof(OPEN_PROTOCOL_DATA));\r
if (OpenData == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
} else {\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- if (ControllerHandle != NULL_HANDLE) {\r
+ if (ControllerHandle != NULL) {\r
Status = CoreValidateHandle (ControllerHandle);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
\r
@param UserHandle The handle to close the protocol interface on\r
@param Protocol The ID of the protocol\r
- @param EntryBuffer A pointer to a buffer of open protocol\r
- information in the form of\r
- EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
+ @param EntryBuffer A pointer to a buffer of open protocol information in the\r
+ form of EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
@param EntryCount Number of EntryBuffer entries\r
\r
+ @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, \r
+ and the number of entries was returned EntryCount.\r
+ @retval EFI_NOT_FOUND Handle does not support the protocol specified by Protocol.\r
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate EntryBuffer.\r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
Size = Count * sizeof(EFI_OPEN_PROTOCOL_INFORMATION_ENTRY);\r
}\r
\r
- Buffer = CoreAllocateBootServicesPool (Size);\r
+ Buffer = AllocatePool (Size);\r
if (Buffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
goto Done;\r
}\r
\r
- Buffer = CoreAllocateBootServicesPool (sizeof (EFI_GUID *) * ProtocolCount);\r
+ Buffer = AllocatePool (sizeof (EFI_GUID *) * ProtocolCount);\r
if (Buffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
}\r
}\r
\r
- HandleBuffer = CoreAllocateBootServicesPool (Count * sizeof (EFI_HANDLE));\r
+ HandleBuffer = AllocatePool (Count * sizeof (EFI_HANDLE));\r
if (HandleBuffer == NULL) {\r
CoreReleaseProtocolLock ();\r
return;\r