Create system_utils component

Somewhat of a 'misc' component; handles early initialization, checking
for first boot and rebooting.
This commit is contained in:
2023-05-19 16:05:27 +01:00
parent 9c9f027bb8
commit 685e0950bf
8 changed files with 120 additions and 18 deletions

View File

@@ -0,0 +1,27 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* Copyright (c) Camden Dixie O'Brien
*/
#ifndef SYSTEM_UTILS_H
#define SYSTEM_UTILS_H
#include <stdbool.h>
/**
* Perform system initialization that must occur before any other
* components are initialized.
*/
void early_init(void);
/**
* Return whether or not this is the first boot of the system.
*/
bool is_first_boot(void);
/**
* Reboot the system, storing the current time beforehand.
*/
void reboot(void);
#endif