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>
11
DBG_DEFAULT_CHANNEL
(
WARNING
);
12
13
/* GLOBALS ********************************************************************/
14
15
extern
EFI_SYSTEM_TABLE
*
GlobalSystemTable
;
16
17
/* FUNCTIONS ******************************************************************/
18
19
TIMEINFO
*
20
UefiGetTime
(
VOID
)
21
{
22
static
TIMEINFO
TimeInfo;
23
EFI_STATUS
Status
;
24
EFI_TIME
time
= {0};
25
26
Status
=
GlobalSystemTable
->
RuntimeServices
->
GetTime
(&
time
,
NULL
);
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
WARNING
#define WARNING
Definition:
BusLogic958.h:56
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:31
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:120
ERR
#define ERR(fmt,...)
Definition:
precomp.h:57
DBG_DEFAULT_CHANNEL
#define DBG_DEFAULT_CHANNEL(ch)
Definition:
debug.h:106
NULL
#define NULL
Definition:
types.h:112
Status
Status
Definition:
gdiplustypes.h:25
void
Definition:
nsiface.idl:2307
time
__u16 time
Definition:
mkdosfs.c:8
EFI_RUNTIME_SERVICES::GetTime
EFI_GET_TIME GetTime
Definition:
UefiSpec.h:1752
EFI_SYSTEM_TABLE
Definition:
UefiSpec.h:1908
EFI_SYSTEM_TABLE::RuntimeServices
EFI_RUNTIME_SERVICES * RuntimeServices
Definition:
UefiSpec.h:1955
EFI_TIME
Definition:
UefiBaseType.h:70
_TIMEINFO
Definition:
fw.h:10
_TIMEINFO::Month
USHORT Month
Definition:
fw.h:12
_TIMEINFO::Day
USHORT Day
Definition:
fw.h:13
_TIMEINFO::Minute
USHORT Minute
Definition:
fw.h:15
_TIMEINFO::Hour
USHORT Hour
Definition:
fw.h:14
_TIMEINFO::Second
USHORT Second
Definition:
fw.h:16
_TIMEINFO::Year
USHORT Year
Definition:
fw.h:11
uefildr.h
UefiGetTime
TIMEINFO * UefiGetTime(VOID)
Definition:
uefiutil.c:20
GlobalSystemTable
EFI_SYSTEM_TABLE * GlobalSystemTable
Definition:
uefildr.c:16
boot
freeldr
freeldr
arch
uefi
uefiutil.c
Generated on Mon Oct 7 2024 06:04:49 for ReactOS by
1.9.6