ReactOS 0.4.16-dev-92-g0c2cdca
uefiutil.c
Go to the documentation of this file.
1/*
2 * PROJECT: FreeLoader UEFI Support
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Utils source
5 * COPYRIGHT: Copyright 2022 Justin Miller <justinmiller100@gmail.com>
6 */
7
8#include <uefildr.h>
9
10#include <debug.h>
12
13/* GLOBALS ********************************************************************/
14
16
17/* FUNCTIONS ******************************************************************/
18
21{
22 static TIMEINFO TimeInfo;
24 EFI_TIME time = {0};
25
27 if (Status != EFI_SUCCESS)
28 ERR("UefiGetTime: cannot get time status %d\n", Status);
29
30 TimeInfo.Year = time.Year;
31 TimeInfo.Month = time.Month;
32 TimeInfo.Day = time.Day;
33 TimeInfo.Hour = time.Hour;
34 TimeInfo.Minute = time.Minute;
35 TimeInfo.Second = time.Second;
36 return &TimeInfo;
37}
38
#define WARNING
Definition: BusLogic958.h:56
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:31
#define EFI_SUCCESS
Definition: UefiBaseType.h:120
#define ERR(fmt,...)
Definition: precomp.h:57
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
#define NULL
Definition: types.h:112
Status
Definition: gdiplustypes.h:25
__u16 time
Definition: mkdosfs.c:8
EFI_GET_TIME GetTime
Definition: UefiSpec.h:1752
EFI_RUNTIME_SERVICES * RuntimeServices
Definition: UefiSpec.h:1955
Definition: fw.h:10
USHORT Month
Definition: fw.h:12
USHORT Day
Definition: fw.h:13
USHORT Minute
Definition: fw.h:15
USHORT Hour
Definition: fw.h:14
USHORT Second
Definition: fw.h:16
USHORT Year
Definition: fw.h:11
TIMEINFO * UefiGetTime(VOID)
Definition: uefiutil.c:20
EFI_SYSTEM_TABLE * GlobalSystemTable
Definition: uefildr.c:16