diff options
author | Jiaxin Wu <Jiaxin.wu@intel.com> | 2018-11-05 14:52:30 +0800 |
---|---|---|
committer | Jiaxin Wu <Jiaxin.wu@intel.com> | 2018-11-06 15:23:38 +0800 |
commit | 62ea70e3128596c3cd1861386f9dbafaf4a82992 (patch) | |
tree | f5b9b7b923d6bd3fc09b3f0cfd3547775c2237cc /ShellPkg/DynamicCommand | |
parent | fc5b790b3994751247799d5c7bbd8fd1e0770985 (diff) | |
download | edk2-62ea70e3128596c3cd1861386f9dbafaf4a82992.tar.gz |
ShellPkg/TftpDynamicCommand: Clarify the retry count option in command.
[-c <retry count>] is to define the number of times to transmit request
packets and wait for a response. The default value is 6. But it doesn't
specify the behavior of zero value. Here, The patch is to clear that:
Set to zero also means to use the default value.
Cc: Carsey Jaben <jaben.carsey@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg/DynamicCommand')
-rw-r--r-- | ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c | 6 | ||||
-rw-r--r-- | ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c index ccf7abde42..ed081b5bad 100644 --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c @@ -218,7 +218,7 @@ EFI_MTFTP4_CONFIG_DATA DefaultMtftp4ConfigData = { { { 0, 0, 0, 0 } }, // GatewayIp - Not relevant as UseDefaultSetting=TRUE
{ { 0, 0, 0, 0 } }, // ServerIp - Not known yet
69, // InitialServerPort - Standard TFTP server port
- 6, // TryCount - Max number of retransmissions.
+ 6, // TryCount - The number of times to transmit request packets and wait for a response.
4 // TimeoutValue - Retransmission timeout in seconds.
};
@@ -421,6 +421,10 @@ RunTftp ( if (!StringToUint16 (ValueStr, &Mtftp4ConfigData.TryCount)) {
goto Error;
}
+
+ if (Mtftp4ConfigData.TryCount == 0) {
+ Mtftp4ConfigData.TryCount = 6;
+ }
}
ValueStr = ShellCommandLineGetValue (CheckPackage, L"-t");
diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni index 654e42ad23..ff64912564 100644 --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.uni @@ -58,7 +58,8 @@ " and the port number is automatically assigned.\r\n"
" -r port - Specifies the remote port number. Default value is 69.\r\n"
" -c <retry count> - The number of times to transmit request packets and\r\n"
-" wait for a response. The default value is 6.\r\n"
+" wait for a response. The default value is 6. Set to zero\r\n"
+" also means to use the default value.\r\n"
" -t <timeout> - The number of seconds to wait for a response after\r\n"
" sending a request packet. Default value is 4s.\r\n"
" -s <block size> - Specifies the TFTP blksize option as defined in RFC 2348.\r\n"
|