\r
#include "DxeMain.h"\r
\r
+/**\r
+ Search a handle to a device on a specified device path that supports a specified protocol,\r
+ interface of that protocol on that handle is another output.\r
+\r
+ @param Protocol The protocol to search for\r
+ @param FilePath The specified device path\r
+ @param Interface Interface of the protocol on the handle\r
+ @param Handle The handle to the device on the specified device\r
+ path that supports the protocol.\r
+\r
+ @return Status code.\r
+\r
+**/\r
+EFI_STATUS\r
+CoreDevicePathToInterface (\r
+ IN EFI_GUID *Protocol,\r
+ IN EFI_DEVICE_PATH_PROTOCOL **FilePath,\r
+ OUT VOID **Interface,\r
+ OUT EFI_HANDLE *Handle\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+\r
+ Status = CoreLocateDevicePath (Protocol, FilePath, Handle);\r
+ if (!EFI_ERROR (Status)) {\r
+ Status = CoreHandleProtocol (*Handle, Protocol, Interface);\r
+ }\r
+ return Status;\r
+}\r
+\r
\r
/**\r
Opens a file for (simple) reading. The simple read abstraction\r
return EFI_SUCCESS;\r
}\r
\r
-\r
-/**\r
- Search a handle to a device on a specified device path that supports a specified protocol,\r
- interface of that protocol on that handle is another output.\r
-\r
- @param Protocol The protocol to search for\r
- @param FilePath The specified device path\r
- @param Interface Interface of the protocol on the handle\r
- @param Handle The handle to the device on the specified device\r
- path that supports the protocol.\r
-\r
- @return Status code.\r
-\r
-**/\r
-EFI_STATUS\r
-CoreDevicePathToInterface (\r
- IN EFI_GUID *Protocol,\r
- IN EFI_DEVICE_PATH_PROTOCOL **FilePath,\r
- OUT VOID **Interface,\r
- OUT EFI_HANDLE *Handle\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- Status = CoreLocateDevicePath (Protocol, FilePath, Handle);\r
- if (!EFI_ERROR (Status)) {\r
- Status = CoreHandleProtocol (*Handle, Protocol, Interface);\r
- }\r
- return Status;\r
-}\r
-\r
-\r
/**\r
Helper function called as part of the code needed\r
to allocate the proper sized buffer for various\r