MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Routines to process Rrq (download).
|
||||
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@ -37,9 +37,9 @@ Mtftp4RrqInput (
|
||||
|
||||
|
||||
/**
|
||||
Start the MTFTP session to download.
|
||||
|
||||
It will first initialize some of the internal states then build and send a RRQ
|
||||
Start the MTFTP session to download.
|
||||
|
||||
It will first initialize some of the internal states then build and send a RRQ
|
||||
reqeuest packet, at last, it will start receive for the downloading.
|
||||
|
||||
@param Instance The Mtftp session
|
||||
@ -158,7 +158,7 @@ Mtftp4RrqSaveBlock (
|
||||
// This is the last block, save the block no
|
||||
//
|
||||
if (DataLen < Instance->BlkSize) {
|
||||
Completed = TRUE;
|
||||
Completed = TRUE;
|
||||
Instance->LastBlock = Block;
|
||||
Mtftp4SetLastBlockNum (&Instance->Blocks, Block);
|
||||
}
|
||||
@ -167,7 +167,7 @@ Mtftp4RrqSaveBlock (
|
||||
// Remove this block number from the file hole. If Mtftp4RemoveBlockNum
|
||||
// returns EFI_NOT_FOUND, the block has been saved, don't save it again.
|
||||
// Note that : For bigger files, allowing the block counter to roll over
|
||||
// to accept transfers of unlimited size. So TotalBlock is memorised as
|
||||
// to accept transfers of unlimited size. So TotalBlock is memorised as
|
||||
// continuous block counter.
|
||||
//
|
||||
Status = Mtftp4RemoveBlockNum (&Instance->Blocks, Block, Completed, &TotalBlock);
|
||||
@ -228,8 +228,8 @@ Mtftp4RrqSaveBlock (
|
||||
|
||||
|
||||
/**
|
||||
Function to process the received data packets.
|
||||
|
||||
Function to process the received data packets.
|
||||
|
||||
It will save the block then send back an ACK if it is active.
|
||||
|
||||
@param Instance The downloading MTFTP session
|
||||
@ -318,7 +318,7 @@ Mtftp4RrqHandleData (
|
||||
|
||||
/**
|
||||
Validate whether the options received in the server's OACK packet is valid.
|
||||
|
||||
|
||||
The options are valid only if:
|
||||
1. The server doesn't include options not requested by us
|
||||
2. The server can only use smaller blksize than that is requested
|
||||
@ -428,20 +428,20 @@ Mtftp4RrqConfigMcastPort (
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (!Config->UseDefaultSetting &&
|
||||
if (!Config->UseDefaultSetting &&
|
||||
!EFI_IP4_EQUAL (&mZeroIp4Addr, &Config->GatewayIp)) {
|
||||
//
|
||||
// The station IP address is manually configured and the Gateway IP is not 0.
|
||||
// Add the default route for this UDP instance.
|
||||
//
|
||||
Status = McastIo->Protocol.Udp4->Routes (
|
||||
McastIo->Protocol.Udp4,
|
||||
McastIo->Protocol.Udp4,
|
||||
FALSE,
|
||||
&mZeroIp4Addr,
|
||||
&mZeroIp4Addr,
|
||||
&Config->GatewayIp
|
||||
);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
McastIo->Protocol.Udp4->Configure (McastIo->Protocol.Udp4, NULL);
|
||||
return Status;
|
||||
@ -459,8 +459,8 @@ Mtftp4RrqConfigMcastPort (
|
||||
|
||||
|
||||
/**
|
||||
Function to process the OACK.
|
||||
|
||||
Function to process the OACK.
|
||||
|
||||
It will first validate the OACK packet, then update the various negotiated parameters.
|
||||
|
||||
@param Instance The download MTFTP session
|
||||
@ -591,22 +591,22 @@ Mtftp4RrqHandleOack (
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Update the parameters used.
|
||||
//
|
||||
if (Reply.BlkSize != 0) {
|
||||
Instance->BlkSize = Reply.BlkSize;
|
||||
}
|
||||
|
||||
|
||||
if (Reply.Timeout != 0) {
|
||||
Instance->Timeout = Reply.Timeout;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Instance->Master = TRUE;
|
||||
|
||||
|
||||
if (Reply.BlkSize != 0) {
|
||||
Instance->BlkSize = Reply.BlkSize;
|
||||
}
|
||||
@ -615,7 +615,7 @@ Mtftp4RrqHandleOack (
|
||||
Instance->Timeout = Reply.Timeout;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Send an ACK to (Expected - 1) which is 0 for unicast download,
|
||||
// or tell the server we want to receive the Expected block.
|
||||
@ -762,7 +762,7 @@ Mtftp4RrqInput (
|
||||
case EFI_MTFTP4_OPCODE_ERROR:
|
||||
Status = EFI_TFTP_ERROR;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user