BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2266
Similar to what we now do for OVMF, we need to consider the possibility
that PlatformBootManagerWaitCallback () may be called with a
PcdPlatformBootTimeOut that was set to zero, in which case the call should
simply return.
We also change the initial timeout variable name to make the code explicit.
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Message-Id: <
20191014150311.16740-3-pete@akeo.ie>
{\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;\r
- UINT16 Timeout;\r
+ UINT16 TimeoutInitial;\r
\r
- Timeout = PcdGet16 (PcdPlatformBootTimeOut);\r
+ TimeoutInitial = PcdGet16 (PcdPlatformBootTimeOut);\r
+\r
+ //\r
+ // If PcdPlatformBootTimeOut is set to zero, then we consider\r
+ // that no progress update should be enacted.\r
+ //\r
+ if (TimeoutInitial == 0) {\r
+ return;\r
+ }\r
\r
Black.Raw = 0x00000000;\r
White.Raw = 0x00FFFFFF;\r
Black.Pixel,\r
L"Start boot option",\r
White.Pixel,\r
- (Timeout - TimeoutRemain) * 100 / Timeout,\r
+ (TimeoutInitial - TimeoutRemain) * 100 / TimeoutInitial,\r
0\r
);\r
}\r