\r
@param Head The block range list to remove from\r
@param Num The block number to remove\r
+ @param Completed Whether Num is the last block number\r
@param TotalBlock The continuous block number in all \r
\r
@retval EFI_NOT_FOUND The block number isn't in the block range list\r
Mtftp4RemoveBlockNum (\r
IN LIST_ENTRY *Head,\r
IN UINT16 Num,\r
+ IN BOOLEAN Completed,\r
OUT UINT64 *TotalBlock\r
)\r
{\r
Range->Round ++;\r
}\r
\r
- if (Range->Start > Range->End) {\r
+ if ((Range->Start > Range->End) || Completed) {\r
RemoveEntryList (&Range->Link);\r
FreePool (Range);\r
}\r