/** @file\r
Implementation of Mtftp drivers.\r
- \r
-Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
+\r
+Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
@param ImageHandle The MTFTP's image handle.\r
@param SystemTable The system table.\r
\r
- @retval EFI_SUCCESS The handles are successfully installed on the image. \r
+ @retval EFI_SUCCESS The handles are successfully installed on the image.\r
@retval others some EFI_ERROR occured.\r
\r
**/\r
@retval EFI_SUCCESS The controller has UDP service binding protocol\r
installed, MTFTP can support it.\r
@retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
- RemainingDevicePath is already being managed by \r
+ RemainingDevicePath is already being managed by\r
the driver specified by This.\r
@retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
- RemainingDevicePath is already being managed by a \r
- different driver or an application that requires \r
+ RemainingDevicePath is already being managed by a\r
+ different driver or an application that requires\r
exclusive access.\r
@retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
- RemainingDevicePath is not supported by the driver \r
+ RemainingDevicePath is not supported by the driver\r
specified by This.\r
\r
**/\r
\r
\r
/**\r
- Config a NULL UDP that is used to keep the connection between UDP and MTFTP. \r
- \r
- Just leave the Udp child unconfigured. When UDP is unloaded, \r
+ Config a NULL UDP that is used to keep the connection between UDP and MTFTP.\r
+\r
+ Just leave the Udp child unconfigured. When UDP is unloaded,\r
MTFTP will be informed with DriverBinding Stop.\r
\r
@param UdpIo The UDP_IO to configure\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
Mtftp4ConfigNullUdp (\r
IN UDP_IO *UdpIo,\r
IN VOID *Context\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (MtftpSb);\r
+ FreePool (MtftpSb);\r
return Status;\r
}\r
\r
);\r
if (EFI_ERROR (Status)) {\r
gBS->CloseEvent (MtftpSb->Timer);\r
- gBS->FreePool (MtftpSb);\r
+ FreePool (MtftpSb);\r
return Status;\r
}\r
\r
if (MtftpSb->ConnectUdp == NULL) {\r
gBS->CloseEvent (MtftpSb->TimerToGetMap);\r
gBS->CloseEvent (MtftpSb->Timer);\r
- gBS->FreePool (MtftpSb);\r
+ FreePool (MtftpSb);\r
return EFI_DEVICE_ERROR;\r
}\r
\r
\r
\r
/**\r
- Start the MTFTP driver on this controller. \r
- \r
+ Start the MTFTP driver on this controller.\r
+\r
MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported\r
controller, which can be used to create/destroy MTFTP children.\r
\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
+ ASSERT (MtftpSb != NULL);\r
\r
Status = gBS->SetTimer (MtftpSb->Timer, TimerPeriodic, TICKS_PER_SECOND);\r
\r
\r
ON_ERROR:\r
Mtftp4CleanService (MtftpSb);\r
- gBS->FreePool (MtftpSb);\r
+ FreePool (MtftpSb);\r
\r
return Status;\r
}\r
\r
Mtftp4CleanService (MtftpSb);\r
\r
- gBS->FreePool (MtftpSb);\r
+ FreePool (MtftpSb);\r
} else {\r
\r
while (!IsListEmpty (&MtftpSb->Children)) {\r
);\r
\r
if (Instance->UnicastPort == NULL) {\r
- gBS->FreePool (Instance);\r
+ FreePool (Instance);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
\r
if (EFI_ERROR (Status)) {\r
UdpIoFreeIo (Instance->UnicastPort);\r
- gBS->FreePool (Instance);\r
+ FreePool (Instance);\r
}\r
\r
return Status;\r
\r
gBS->RestoreTPL (OldTpl);\r
\r
- gBS->FreePool (Instance);\r
+ FreePool (Instance);\r
return EFI_SUCCESS;\r
}\r