]> 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 ccf7abde4290cb25418702961fe60ff476451240..ed081b5bad7cf5a4b5f16ee506d259a20ad6e178 100644 (file)
@@ -218,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
@@ -421,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