diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-07 02:25:50 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-07 02:25:50 +0000 |
commit | a586770320e20f9a7cd9338de4255fe166c59d4c (patch) | |
tree | 1dcb6fafbd51ac330bb5cf369fc30fc4ecf7e0e8 /MdeModulePkg | |
parent | 632a3a6c0b5e16e8296afa4a54ed3d29ead81728 (diff) | |
download | edk2-a586770320e20f9a7cd9338de4255fe166c59d4c.zip edk2-a586770320e20f9a7cd9338de4255fe166c59d4c.tar.gz edk2-a586770320e20f9a7cd9338de4255fe166c59d4c.tar.bz2 |
1. Enable Mtftp4Dxe in MdeModulePkg.dsc
2. Changed CustomDecompressLib's default instance to BaseCustomDecompressLibNull.inf
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3561 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dsc | 3 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 20 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h | 14 |
3 files changed, 22 insertions, 15 deletions
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index e19e463..0f35f07 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -42,7 +42,7 @@ TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
PeCoffLoaderLib|MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.inf
- CustomDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
+ CustomDecompressLib|MdePkg/Library/BaseCustomDecompressLibNull/BaseCustomDecompressLibNull.inf
[LibraryClasses.IA32]
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
@@ -369,6 +369,7 @@ MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+ MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
MdeModulePkg/Universal/Network/PxeBcDxe/PxeBcDxe.inf
MdeModulePkg/Universal/Network/PxeDhcp4Dxe/PxeDhcp4Dxe.inf
MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 5bfd253..2d3c4f5 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -260,12 +260,14 @@ Mtftp4GetInfoCheckPacket ( IN EFI_MTFTP4_PACKET *Packet
)
{
+ MTFTP4_PROTOCOL *Instance;
MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
UINT16 OpCode;
- State = (MTFTP4_GETINFO_STATE *) Token->Context;
- OpCode = NTOHS (Packet->OpCode);
+ Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
+ State = &Instance->GetInfoState;
+ OpCode = NTOHS (Packet->OpCode);
//
// Set the GetInfo's return status according to the OpCode.
@@ -335,7 +337,8 @@ EfiMtftp4GetInfo ( )
{
EFI_MTFTP4_TOKEN Token;
- MTFTP4_GETINFO_STATE State;
+ MTFTP4_PROTOCOL *Instance;
+ MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
if ((This == NULL) || (Filename == NULL) || (PacketLength == NULL) ||
@@ -348,9 +351,11 @@ EfiMtftp4GetInfo ( }
*PacketLength = 0;
- State.Packet = Packet;
- State.PacketLen = PacketLength;
- State.Status = EFI_SUCCESS;
+ Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
+ State = &Instance->GetInfoState;
+ State->Packet = Packet;
+ State->PacketLen = PacketLength;
+ State->Status = EFI_SUCCESS;
//
// Fill in the Token to issue an synchronous ReadFile operation
@@ -364,7 +369,6 @@ EfiMtftp4GetInfo ( Token.OptionList = OptionList;
Token.BufferSize = 0;
Token.Buffer = NULL;
- Token.Context = &State;
Token.CheckPacket = Mtftp4GetInfoCheckPacket;
Token.TimeoutCallback = NULL;
Token.PacketNeeded = NULL;
@@ -372,7 +376,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 24afe6b..9bf5bd5 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h @@ -86,6 +86,12 @@ typedef struct _MTFTP4_SERVICE { UDP_IO_PORT *ConnectUdp; }; +typedef struct { + EFI_MTFTP4_PACKET **Packet; + UINT32 *PacketLen; + EFI_STATUS Status; +} MTFTP4_GETINFO_STATE; + typedef struct _MTFTP4_PROTOCOL { UINT32 Signature; NET_LIST_ENTRY Link; @@ -140,13 +146,9 @@ typedef struct _MTFTP4_PROTOCOL { UINT16 McastPort; BOOLEAN Master; UDP_IO_PORT *McastUdpPort; -}; -typedef struct { - EFI_MTFTP4_PACKET **Packet; - UINT32 *PacketLen; - EFI_STATUS Status; -} MTFTP4_GETINFO_STATE; + MTFTP4_GETINFO_STATE GetInfoState; +}; VOID Mtftp4CleanOperation ( |