PROTOCOL_ENTRY *ProtEntry;\r
} LOCATE_POSITION;\r
\r
-typedef \r
+typedef\r
IHANDLE *\r
(* CORE_GET_NEXT) (\r
IN OUT LOCATE_POSITION *Position,\r
/**\r
Routine to get the next Handle, when you are searching for all handles.\r
\r
- @param Position Information about which Handle to seach for. \r
- @param Interface Return the interface structure for the matching \r
- protocol. \r
+ @param Position Information about which Handle to seach for.\r
+ @param Interface Return the interface structure for the matching\r
+ protocol.\r
\r
- @retval IHANDLE An IHANDLE is returned if the next Position is \r
- not the end of the list. A NULL_HANDLE is \r
- returned if it's the end of the list.\r
+ @return An pointer to IHANDLE if the next Position is not the end of the list.\r
+ Otherwise,NULL_HANDLE is returned.\r
\r
**/\r
IHANDLE *\r
Routine to get the next Handle, when you are searching for register protocol\r
notifies.\r
\r
- @param Position Information about which Handle to seach for. \r
- @param Interface Return the interface structure for the matching \r
- protocol. \r
+ @param Position Information about which Handle to seach for.\r
+ @param Interface Return the interface structure for the matching\r
+ protocol.\r
\r
- @retval IHANDLE An IHANDLE is returned if the next Position is \r
- not the end of the list. A NULL_HANDLE is \r
- returned if it's the end of the list.\r
+ @return An pointer to IHANDLE if the next Position is not the end of the list.\r
+ Otherwise,NULL_HANDLE is returned.\r
\r
**/\r
IHANDLE *\r
/**\r
Routine to get the next Handle, when you are searching for a given protocol.\r
\r
- @param Position Information about which Handle to seach for. \r
- @param Interface Return the interface structure for the matching \r
- protocol. \r
+ @param Position Information about which Handle to seach for.\r
+ @param Interface Return the interface structure for the matching\r
+ protocol.\r
\r
- @retval IHANDLE An IHANDLE is returned if the next Position is \r
- not the end of the list. A NULL_HANDLE is \r
- returned if it's the end of the list.\r
+ @return An pointer to IHANDLE if the next Position is not the end of the list.\r
+ Otherwise,NULL_HANDLE is returned.\r
\r
**/\r
IHANDLE *\r
/**\r
Locates the requested handle(s) and returns them in Buffer.\r
\r
- @param SearchType The type of search to perform to locate the \r
- handles \r
- @param Protocol The protocol to search for \r
- @param SearchKey Dependant on SearchType \r
- @param BufferSize On input the size of Buffer. On output the \r
- size of data returned. \r
- @param Buffer The buffer to return the results in \r
-\r
- @retval EFI_BUFFER_TOO_SMALL Buffer too small, required buffer size is \r
- returned in BufferSize. \r
- @retval EFI_INVALID_PARAMETER Invalid parameter \r
- @retval EFI_SUCCESS Successfully found the requested handle(s) and \r
+ @param SearchType The type of search to perform to locate the\r
+ handles\r
+ @param Protocol The protocol to search for\r
+ @param SearchKey Dependant on SearchType\r
+ @param BufferSize On input the size of Buffer. On output the\r
+ size of data returned.\r
+ @param Buffer The buffer to return the results in\r
+\r
+ @retval EFI_BUFFER_TOO_SMALL Buffer too small, required buffer size is\r
+ returned in BufferSize.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter\r
+ @retval EFI_SUCCESS Successfully found the requested handle(s) and\r
returns them in Buffer.\r
\r
**/\r
IHANDLE *Handle;\r
IHANDLE **ResultBuffer;\r
VOID *Interface;\r
- \r
+\r
if (BufferSize == NULL) {\r
Status = EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
if ((*BufferSize > 0) && (Buffer == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
GetNext = NULL;\r
\r
//\r
// Get the search function based on type\r
//\r
switch (SearchType) {\r
- case AllHandles: \r
- GetNext = CoreGetNextLocateAllHandles; \r
+ case AllHandles:\r
+ GetNext = CoreGetNextLocateAllHandles;\r
break;\r
\r
- case ByRegisterNotify: \r
+ case ByRegisterNotify:\r
//\r
// Must have SearchKey for locate ByRegisterNotify\r
//\r
Status = EFI_INVALID_PARAMETER;\r
break;\r
}\r
- GetNext = CoreGetNextLocateByRegisterNotify; \r
+ GetNext = CoreGetNextLocateByRegisterNotify;\r
break;\r
\r
- case ByProtocol: \r
+ case ByProtocol:\r
GetNext = CoreGetNextLocateByProtocol;\r
if (Protocol == NULL) {\r
Status = EFI_INVALID_PARAMETER;\r
//\r
if (ResultSize > *BufferSize) {\r
Status = EFI_BUFFER_TOO_SMALL;\r
- } \r
- \r
+ }\r
+\r
*BufferSize = ResultSize;\r
\r
if (SearchType == ByRegisterNotify && !EFI_ERROR(Status)) {\r
//\r
// If this is a search by register notify and a handle was\r
// returned, update the register notification position\r
- // \r
+ //\r
ProtNotify = SearchKey;\r
ProtNotify->Position = ProtNotify->Position->ForwardLink;\r
}\r
/**\r
Routine to get the next Handle, when you are searching for all handles.\r
\r
- @param Position Information about which Handle to seach for. \r
- @param Interface Return the interface structure for the matching \r
- protocol. \r
+ @param Position Information about which Handle to seach for.\r
+ @param Interface Return the interface structure for the matching\r
+ protocol.\r
\r
@return An pointer to IHANDLE if the next Position is not the end of the list.\r
Otherwise,NULL_HANDLE is returned.\r
Routine to get the next Handle, when you are searching for register protocol\r
notifies.\r
\r
- @param Position Information about which Handle to seach for. \r
- @param Interface Return the interface structure for the matching \r
- protocol. \r
+ @param Position Information about which Handle to seach for.\r
+ @param Interface Return the interface structure for the matching\r
+ protocol.\r
\r
@return An pointer to IHANDLE if the next Position is not the end of the list.\r
Otherwise,NULL_HANDLE is returned.\r
IHANDLE *Handle;\r
PROTOCOL_NOTIFY *ProtNotify;\r
PROTOCOL_INTERFACE *Prot;\r
- LIST_ENTRY *Link; \r
+ LIST_ENTRY *Link;\r
\r
Handle = NULL_HANDLE;\r
*Interface = NULL;\r
Prot = CR (Link, PROTOCOL_INTERFACE, ByProtocol, PROTOCOL_INTERFACE_SIGNATURE);\r
Handle = (IHANDLE *) Prot->Handle;\r
*Interface = Prot->Interface;\r
- } \r
+ }\r
}\r
\r
return Handle;\r
/**\r
Routine to get the next Handle, when you are searching for a given protocol.\r
\r
- @param Position Information about which Handle to seach for. \r
- @param Interface Return the interface structure for the matching \r
- protocol. \r
+ @param Position Information about which Handle to seach for.\r
+ @param Interface Return the interface structure for the matching\r
+ protocol.\r
\r
@return An pointer to IHANDLE if the next Position is not the end of the list.\r
Otherwise,NULL_HANDLE is returned.\r
IHANDLE *Handle;\r
LIST_ENTRY *Link;\r
PROTOCOL_INTERFACE *Prot;\r
- \r
+\r
Handle = NULL_HANDLE;\r
*Interface = NULL;\r
for (; ;) {\r
*Interface = Prot->Interface;\r
\r
//\r
- // If this handle has not been returned this request, then \r
+ // If this handle has not been returned this request, then\r
// return it now\r
//\r
if (Handle->LocateRequest != mEfiLocateHandleRequest) {\r
/**\r
Locates the handle to a device on the device path that best matches the specified protocol.\r
\r
- @param Protocol The protocol to search for. \r
- @param DevicePath On input, a pointer to a pointer to the device \r
- path. On output, the device path pointer is \r
- modified to point to the remaining part of the \r
- devicepath. \r
- @param Device A pointer to the returned device handle. \r
+ @param Protocol The protocol to search for.\r
+ @param DevicePath On input, a pointer to a pointer to the device\r
+ path. On output, the device path pointer is\r
+ modified to point to the remaining part of the\r
+ devicepath.\r
+ @param Device A pointer to the returned device handle.\r
\r
- @retval EFI_SUCCESS The resulting handle was returned. \r
- @retval EFI_NOT_FOUND No handles matched the search. \r
+ @retval EFI_SUCCESS The resulting handle was returned.\r
+ @retval EFI_NOT_FOUND No handles matched the search.\r
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
\r
**/\r
EFI_HANDLE Handle;\r
EFI_DEVICE_PATH_PROTOCOL *SourcePath;\r
EFI_DEVICE_PATH_PROTOCOL *TmpDevicePath;\r
- \r
+\r
if (Protocol == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
if ((DevicePath == NULL) || (*DevicePath == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
if (Device == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
*Device = NULL_HANDLE;\r
SourcePath = *DevicePath;\r
SourceSize = CoreDevicePathSize (SourcePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
- \r
+\r
//\r
// The source path can only have 1 instance\r
//\r
// handles\r
//\r
ASSERT (Size != BestMatch);\r
- \r
+\r
//\r
// We've got a match, see if it's the best match so far\r
//\r
}\r
\r
CoreFreePool (Handles);\r
- \r
+\r
//\r
- // If there wasn't any match, then no parts of the device path was found. \r
+ // If there wasn't any match, then no parts of the device path was found.\r
// Which is strange since there is likely a "root level" device path in the system.\r
//\r
if (BestMatch == -1) {\r
to the system. If Retistration is NULL return the first Protocol Interface\r
you find.\r
\r
- @param Protocol The protocol to search for \r
- @param Registration Optional Registration Key returned from \r
- RegisterProtocolNotify() \r
- @param Interface Return the Protocol interface (instance). \r
+ @param Protocol The protocol to search for\r
+ @param Registration Optional Registration Key returned from\r
+ RegisterProtocolNotify()\r
+ @param Interface Return the Protocol interface (instance).\r
\r
- @retval EFI_SUCCESS If a valid Interface is returned \r
- @retval EFI_INVALID_PARAMETER Invalid parameter \r
+ @retval EFI_SUCCESS If a valid Interface is returned\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter\r
@retval EFI_NOT_FOUND Protocol interface not found\r
\r
**/\r
if (Interface == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
if (Protocol == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
- \r
+\r
*Interface = NULL;\r
Status = EFI_SUCCESS;\r
\r
Position.Protocol = Protocol;\r
Position.SearchKey = Registration;\r
Position.Position = &gHandleList;\r
- \r
+\r
//\r
// Lock the protocol database\r
//\r
\r
Handle = CoreGetNextLocateByProtocol (&Position, Interface);\r
} else {\r
- Handle = CoreGetNextLocateByRegisterNotify (&Position, Interface); \r
+ Handle = CoreGetNextLocateByRegisterNotify (&Position, Interface);\r
}\r
\r
if (Handle == NULL) {\r
//\r
// If this is a search by register notify and a handle was\r
// returned, update the register notification position\r
- // \r
+ //\r
ProtNotify = Registration;\r
ProtNotify->Position = ProtNotify->Position->ForwardLink;\r
}\r
in a buffer allocated from pool. This is a version of CoreLocateHandle()\r
that allocates a buffer for the caller.\r
\r
- @param SearchType Specifies which handle(s) are to be returned. \r
- @param Protocol Provides the protocol to search by. This \r
- parameter is only valid for SearchType \r
- ByProtocol. \r
- @param SearchKey Supplies the search key depending on the \r
- SearchType. \r
- @param NumberHandles The number of handles returned in Buffer. \r
- @param Buffer A pointer to the buffer to return the requested \r
- array of handles that support Protocol. \r
-\r
- @retval EFI_SUCCESS The result array of handles was returned. \r
- @retval EFI_NOT_FOUND No handles match the search. \r
- @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the \r
- matching results. \r
+ @param SearchType Specifies which handle(s) are to be returned.\r
+ @param Protocol Provides the protocol to search by. This\r
+ parameter is only valid for SearchType\r
+ ByProtocol.\r
+ @param SearchKey Supplies the search key depending on the\r
+ SearchType.\r
+ @param NumberHandles The number of handles returned in Buffer.\r
+ @param Buffer A pointer to the buffer to return the requested\r
+ array of handles that support Protocol.\r
+\r
+ @retval EFI_SUCCESS The result array of handles was returned.\r
+ @retval EFI_NOT_FOUND No handles match the search.\r
+ @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the\r
+ matching results.\r
@retval EFI_INVALID_PARAMETER One or more paramters are not valid.\r
\r
**/\r