diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-24 17:36:07 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-24 17:36:07 +0000 |
commit | ea886bef0af641ae4b3abac542d41686bf3251d8 (patch) | |
tree | 075eec4f719be11ef57e416c1607d6a040a68080 /MdeModulePkg/Universal | |
parent | e7d41e181897a2bbbb0994cb6aa49b576a12edd9 (diff) | |
download | edk2-platforms-ea886bef0af641ae4b3abac542d41686bf3251d8.tar.xz |
Updated EFI_MTFTP4_TOKEN structure to add member Context. It's an incompatible change adopted by UEFI group.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9005 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 20 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c | 10 |
3 files changed, 13 insertions, 21 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index ea463edc55..4c459b22b8 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -1,7 +1,7 @@ /** @file
Interface routine for Mtftp4.
-Copyright (c) 2006 - 2007, 2009, Intel Corporation<BR>
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -111,13 +111,11 @@ Mtftp4GetInfoCheckPacket ( IN EFI_MTFTP4_PACKET *Packet
)
{
- MTFTP4_PROTOCOL *Instance;
MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
UINT16 OpCode;
- Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
- State = &Instance->GetInfoState;
+ State = (MTFTP4_GETINFO_STATE *) Token->Context;
OpCode = NTOHS (Packet->OpCode);
//
@@ -984,8 +982,7 @@ EfiMtftp4GetInfo ( )
{
EFI_MTFTP4_TOKEN Token;
- MTFTP4_PROTOCOL *Instance;
- MTFTP4_GETINFO_STATE *State;
+ MTFTP4_GETINFO_STATE State;
EFI_STATUS Status;
if ((This == NULL) || (Filename == NULL) || (PacketLength == NULL) ||
@@ -998,11 +995,9 @@ EfiMtftp4GetInfo ( }
*PacketLength = 0;
- Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
- State = &Instance->GetInfoState;
- State->Packet = Packet;
- State->PacketLen = PacketLength;
- State->Status = EFI_SUCCESS;
+ State.Packet = Packet;
+ State.PacketLen = PacketLength;
+ State.Status = EFI_SUCCESS;
//
// Fill in the Token to issue an synchronous ReadFile operation
@@ -1016,6 +1011,7 @@ EfiMtftp4GetInfo ( Token.OptionList = OptionList;
Token.BufferSize = 0;
Token.Buffer = NULL;
+ Token.Context = &State;
Token.CheckPacket = Mtftp4GetInfoCheckPacket;
Token.TimeoutCallback = NULL;
Token.PacketNeeded = NULL;
@@ -1023,7 +1019,7 @@ EfiMtftp4GetInfo ( Status = EfiMtftp4ReadFile (This, &Token);
if (EFI_ABORTED == Status) {
- return State->Status;
+ return State.Status;
}
return Status;
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h index 877164abb6..8f39df3c4f 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h @@ -9,7 +9,7 @@ RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
-Copyright (c) 2006 - 2007, Intel Corporation<BR>
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -149,8 +149,6 @@ struct _MTFTP4_PROTOCOL { UINT16 McastPort;
BOOLEAN Master;
UDP_IO_PORT *McastUdpPort;
-
- MTFTP4_GETINFO_STATE GetInfoState;
};
/**
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c index d6d4cd581f..6eb0e64be0 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c @@ -14,9 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "PxeBcImpl.h"
-VOID *TokenContext = NULL;
-
-CHAR8 *mMtftpOptions[PXE_MTFTP_OPTION_MAXIMUM_INDEX] = {
+UINT8 *mMtftpOptions[PXE_MTFTP_OPTION_MAXIMUM_INDEX] = {
"blksize",
"timeout",
"tsize",
@@ -55,7 +53,7 @@ PxeBcCheckPacket ( EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL *Callback;
EFI_STATUS Status;
- Private = (PXEBC_PRIVATE_DATA *) TokenContext;
+ Private = (PXEBC_PRIVATE_DATA *) Token->Context;
Callback = Private->PxeBcCallback;
Status = EFI_SUCCESS;
@@ -271,7 +269,7 @@ PxeBcTftpReadFile ( Token.ModeStr = NULL;
Token.OptionCount = OptCnt;
Token.OptionList = ReqOpt;
- TokenContext = Private;
+ Token.Context = Private;
if (DontUseBuffer) {
Token.BufferSize = 0;
@@ -428,7 +426,7 @@ PxeBcTftpReadDirectory ( Token.ModeStr = NULL;
Token.OptionCount = OptCnt;
Token.OptionList = ReqOpt;
- TokenContext = Private;
+ Token.Context = Private;
if (DontUseBuffer) {
Token.BufferSize = 0;
|