iPXE
reboot.h File Reference

iPXE reboot API More...

#include <ipxe/api.h>
#include <config/reboot.h>
#include <ipxe/null_reboot.h>
#include <ipxe/efi/efi_reboot.h>
#include <bits/reboot.h>

Go to the source code of this file.

Macros

#define REBOOT_INLINE(_subsys, _api_func)
 Calculate static inline reboot API function name.
#define PROVIDE_REBOOT(_subsys, _api_func, _func)
 Provide an reboot API implementation.
#define PROVIDE_REBOOT_INLINE(_subsys, _api_func)
 Provide a static inline reboot API implementation.
#define REBOOT_WARM   0x00000001
 Perform a warm reboot.
#define REBOOT_SETUP   0x00000002
 Reboot to firmware setup.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
void reboot (int flags)
 Reboot system.
int poweroff (void)
 Power off system.

Detailed Description

iPXE reboot API

Definition in file reboot.h.

Macro Definition Documentation

◆ REBOOT_INLINE

#define REBOOT_INLINE ( _subsys,
_api_func )
Value:
SINGLE_API_INLINE ( REBOOT_PREFIX_ ## _subsys, _api_func )
#define SINGLE_API_INLINE(_prefix, _api_func)
Calculate static inline function name.
Definition api.h:45

Calculate static inline reboot API function name.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
Return values
_subsys_funcSubsystem API function

Definition at line 23 of file reboot.h.

23#define REBOOT_INLINE( _subsys, _api_func ) \
24 SINGLE_API_INLINE ( REBOOT_PREFIX_ ## _subsys, _api_func )

◆ PROVIDE_REBOOT

#define PROVIDE_REBOOT ( _subsys,
_api_func,
_func )
Value:
PROVIDE_SINGLE_API ( REBOOT_PREFIX_ ## _subsys, _api_func, _func )
#define PROVIDE_SINGLE_API(_prefix, _api_func, _func)
Provide an API implementation.
Definition api.h:55

Provide an reboot API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
_funcImplementing function

Definition at line 33 of file reboot.h.

33#define PROVIDE_REBOOT( _subsys, _api_func, _func ) \
34 PROVIDE_SINGLE_API ( REBOOT_PREFIX_ ## _subsys, _api_func, _func )

◆ PROVIDE_REBOOT_INLINE

#define PROVIDE_REBOOT_INLINE ( _subsys,
_api_func )
Value:
PROVIDE_SINGLE_API_INLINE ( REBOOT_PREFIX_ ## _subsys, _api_func )
#define PROVIDE_SINGLE_API_INLINE(_prefix, _api_func)
Provide a static inline API implementation.
Definition api.h:74

Provide a static inline reboot API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function

Definition at line 42 of file reboot.h.

42#define PROVIDE_REBOOT_INLINE( _subsys, _api_func ) \
43 PROVIDE_SINGLE_API_INLINE ( REBOOT_PREFIX_ ## _subsys, _api_func )

◆ REBOOT_WARM

#define REBOOT_WARM   0x00000001

Perform a warm reboot.

Definition at line 59 of file reboot.h.

Referenced by bios_reboot(), efi_reboot(), and reboot_exec().

◆ REBOOT_SETUP

#define REBOOT_SETUP   0x00000002

Reboot to firmware setup.

Definition at line 60 of file reboot.h.

Referenced by efi_reboot(), and reboot_exec().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ reboot()

void reboot ( int flags)

Reboot system.

Parameters
flagsReboot flags

References flags.

Referenced by COMMAND(), PROVIDE_REBOOT(), PROVIDE_REBOOT(), PROVIDE_REBOOT(), and reboot_exec().

◆ poweroff()

int poweroff ( void )

Power off system.

Return values
rcReturn status code

This function may fail, since not all systems support being powered off by software.

Referenced by COMMAND(), poweroff_exec(), PROVIDE_REBOOT(), PROVIDE_REBOOT(), and PROVIDE_REBOOT().