iPXE
null_reboot.c File Reference

Null reboot mechanism. More...

#include <stdio.h>
#include <errno.h>
#include <ipxe/reboot.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static void null_reboot (int flags __unused)
 Reboot system.
static int null_poweroff (void)
 Power off system.
 PROVIDE_REBOOT (null, reboot, null_reboot)
 PROVIDE_REBOOT (null, poweroff, null_poweroff)

Detailed Description

Null reboot mechanism.

Definition in file null_reboot.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ null_reboot()

void null_reboot ( int flags __unused)
static

Reboot system.

Parameters
flagsReboot flags

Definition at line 42 of file null_reboot.c.

42 {
43
44 printf ( "Cannot reboot; not implemented\n" );
45 while ( 1 ) {}
46}
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465

References __unused, flags, and printf().

Referenced by PROVIDE_REBOOT().

◆ null_poweroff()

int null_poweroff ( void )
static

Power off system.

Return values
rcReturn status code

Definition at line 53 of file null_reboot.c.

53 {
54
55 return -ENOTSUP;
56}
#define ENOTSUP
Operation not supported.
Definition errno.h:590

References ENOTSUP.

Referenced by PROVIDE_REBOOT().

◆ PROVIDE_REBOOT() [1/2]

PROVIDE_REBOOT ( null ,
reboot ,
null_reboot  )

References null_reboot(), and reboot().

◆ PROVIDE_REBOOT() [2/2]

PROVIDE_REBOOT ( null ,
poweroff ,
null_poweroff  )

References null_poweroff(), and poweroff().