]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c
MdeModulePkg: Fix coding style issues in file/function comments
[mirror_edk2.git] / Nt32Pkg / RealTimeClockRuntimeDxe / RealTimeClock.c
index 59adc649524f5d6b1b1fa5f2f93d67d36419a37a..6a448755033827e32abbd0b013224859383f8a1c 100644 (file)
@@ -1,7 +1,7 @@
-/*++\r
+/**@file\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -17,14 +17,16 @@ Abstract:
 \r
   NT Emulation Architectural Protocol Driver as defined in Tiano\r
 \r
---*/\r
-\r
+**/\r
 \r
+#include <Uefi.h>\r
+#include <WinNtDxe.h>\r
+#include <Protocol/RealTimeClock.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/WinNtLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
 \r
 BOOLEAN\r
 DayValid (\r
@@ -48,7 +50,6 @@ InitializeRealTimeClock (
   IN EFI_SYSTEM_TABLE                    *SystemTable\r
   );\r
 \r
-STATIC\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtGetTime (\r
@@ -108,13 +109,12 @@ Returns:
 \r
   Time->Daylight = 0;\r
   if (TimeZone.StandardDate.wMonth) {\r
-    Time->Daylight = EFI_TIME_ADJUST_DAYLIGHT;\r
+    Time->Daylight = (UINT8) TimeZone.StandardDate.wMonth;\r
   }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtSetTime (\r
@@ -162,7 +162,10 @@ Returns:
   gWinNt->GetTimeZoneInformation (&TimeZone);\r
   TimeZone.StandardDate.wMonth  = Time->Daylight;\r
   TimeZone.Bias                 = Time->TimeZone;\r
-  gWinNt->SetTimeZoneInformation (&TimeZone);\r
+  Flag = gWinNt->SetTimeZoneInformation (&TimeZone);\r
+  if (!Flag) {\r
+    return EFI_DEVICE_ERROR;\r
+  }\r
 \r
   SystemTime.wYear          = Time->Year;\r
   SystemTime.wMonth         = Time->Month;\r
@@ -181,7 +184,6 @@ Returns:
   }\r
 }\r
 \r
-STATIC\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtGetWakeupTime (\r
@@ -217,7 +219,6 @@ Returns:
   return EFI_UNSUPPORTED;\r
 }\r
 \r
-STATIC\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtSetWakeupTime (\r