]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
ShellPkg/TftpDynamicCommand: Clarify the retry count option in command.
[mirror_edk2.git] / ShellPkg / DynamicCommand / TftpDynamicCommand / Tftp.c
index d4391b9f33cd27adff0925ffec755aaf2da34740..ed081b5bad7cf5a4b5f16ee506d259a20ad6e178 100644 (file)
@@ -165,6 +165,7 @@ GetFileSize (
   @param[in]   AsciiFilePath  Path of the file, ASCII encoded\r
   @param[in]   FileSize       Size of the file in number of bytes\r
   @param[in]   BlockSize      Value of the TFTP blksize option\r
+  @param[in]   WindowSize     Value of the TFTP window size option\r
   @param[out]  Data           Address where to store the address of the buffer\r
                               where the data of the file were downloaded in\r
                               case of success.\r
@@ -217,7 +218,7 @@ EFI_MTFTP4_CONFIG_DATA DefaultMtftp4ConfigData = {
   { { 0, 0, 0, 0 } },               // GatewayIp         - Not relevant as UseDefaultSetting=TRUE\r
   { { 0, 0, 0, 0 } },               // ServerIp          - Not known yet\r
   69,                               // InitialServerPort - Standard TFTP server port\r
-  6,                                // TryCount          - Max number of retransmissions.\r
+  6,                                // TryCount          - The number of times to transmit request packets and wait for a response.\r
   4                                 // TimeoutValue      - Retransmission timeout in seconds.\r
 };\r
 \r
@@ -420,6 +421,10 @@ RunTftp (
     if (!StringToUint16 (ValueStr, &Mtftp4ConfigData.TryCount)) {\r
       goto Error;\r
     }\r
+\r
+    if (Mtftp4ConfigData.TryCount == 0) {\r
+      Mtftp4ConfigData.TryCount = 6;\r
+    }\r
   }\r
 \r
   ValueStr = ShellCommandLineGetValue (CheckPackage, L"-t");\r
@@ -906,6 +911,7 @@ Error :
   @param[in]   AsciiFilePath  Path of the file, ASCII encoded\r
   @param[in]   FileSize       Size of the file in number of bytes\r
   @param[in]   BlockSize      Value of the TFTP blksize option\r
+  @param[in]   WindowSize     Value of the TFTP window size option\r
   @param[out]  Data           Address where to store the address of the buffer\r
                               where the data of the file were downloaded in\r
                               case of success.\r