[edk2-devel] [PATCH] Silicon/NXP/Pcf8563RealTimeClockLib: Clear Nanosecond field in GetTime

???? posted 1 patch 2 years, 9 months ago
Failed in applying to current master (apply log)
.../Pcf8563RealTimeClockLib.c                      |    2 ++
1 file changed, 2 insertions(+)
[edk2-devel] [PATCH] Silicon/NXP/Pcf8563RealTimeClockLib: Clear Nanosecond field in GetTime
Posted by ???? 2 years, 9 months ago
Clear unsupported Nanosecond field of the EFI_TIME data structure.
Without this fix, date/time commands on UEFI shell fail to set
because of the invaild parameter error.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reported-by: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
---
 .../Pcf8563RealTimeClockLib.c                      |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
index 7310fecb39..b79ea89fea 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
@@ -117,6 +117,8 @@ LibGetTime (
     return EFI_DEVICE_ERROR;
   }
 
+  Time->Nanosecond = 0;
+
   if ((DateTime.VL_seconds & PCF8563_CLOCK_INVALID) != 0) {
       Time->Second  = 0;
       Time->Minute  = 0;



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77086): https://edk2.groups.io/g/devel/message/77086
Mute This Topic: https://groups.io/mt/83784782/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-