6cccb3bdc0
Mark all files used in a standard build of bin-x86_64-efi/snponly.efi as permitted for UEFI Secure Boot. These files represent the core functionality of iPXE that is guaranteed to have been included in every binary that was previously subject to a security review and signed by Microsoft. It is therefore legitimate to assume that at least these files have already been reviewed to the required standard multiple times. Signed-off-by: Michael Brown <mcb30@ipxe.org>
55 lines
937 B
C
55 lines
937 B
C
#ifndef _TIME_H
|
|
#define _TIME_H
|
|
|
|
/** @file
|
|
*
|
|
* Date and time
|
|
*/
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|
FILE_SECBOOT ( PERMITTED );
|
|
|
|
#include <sys/time.h>
|
|
#include <ipxe/time.h>
|
|
|
|
/** Broken-down time */
|
|
struct tm {
|
|
/** Seconds [0,60] */
|
|
int tm_sec;
|
|
/** Minutes [0,59] */
|
|
int tm_min;
|
|
/** Hour [0,23] */
|
|
int tm_hour;
|
|
/** Day of month [1,31] */
|
|
int tm_mday;
|
|
/** Month of year [0,11] */
|
|
int tm_mon;
|
|
/** Years since 1900 */
|
|
int tm_year;
|
|
/** Day of week [0,6] (Sunday=0) */
|
|
int tm_wday;
|
|
/** Day of year [0,365] */
|
|
int tm_yday;
|
|
/** Daylight savings flag */
|
|
int tm_isdst;
|
|
};
|
|
|
|
/**
|
|
* Get current time in seconds since the Epoch
|
|
*
|
|
* @v t Time to fill in, or NULL
|
|
* @ret time Current time
|
|
*/
|
|
static inline __attribute__ (( always_inline )) time_t time ( time_t *t ) {
|
|
time_t now;
|
|
|
|
now = ( time_now() + time_offset );
|
|
if ( t )
|
|
*t = now;
|
|
return now;
|
|
}
|
|
|
|
extern time_t mktime ( struct tm *tm );
|
|
|
|
#endif /* _TIME_H */
|