**/\r
\r
#include "DxeMain.h"\r
+#include "Handle.h"\r
\r
\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
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
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