Create system_utils component
Somewhat of a 'misc' component; handles early initialization, checking for first boot and rebooting.
This commit is contained in:
27
components/system_utils/system_utils.h
Normal file
27
components/system_utils/system_utils.h
Normal 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
|
||||
Reference in New Issue
Block a user