blob: b239d5b929e810d90517d05e9e925ed317fa0eeb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */
#ifndef APOS_POWER_H
#define APOS_POWER_H
/**
* @file power.h
* Power subsystem. Will hopefully eventually be used to restart and shutdown
* host machines.
*/
#include <apos/types.h>
#include <apos/attrs.h>
/** Types of powering off. Still unclear what difference there is between warm
* and cold reboot. */
enum poweroff_type {
/** Shut down. */
SHUTDOWN,
/** Cold or complete reboot. */
COLD_REBOOT,
/** Warm or partial reboot. */
WARM_REBOOT
};
/**
* Power off the system.
*
* @param type Type of powering off. \see poweroff_type.
* @return Nothing on success (system shuts down), \ref ERR_INVAL on invalid
* poweroff type or ERR_MISC if studown was not succesful.
*/
stat_t poweroff(enum poweroff_type type);
#endif
|