Power off command.
More...
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/reboot.h>
Go to the source code of this file.
Power off command.
Definition in file poweroff_cmd.c.
◆ FILE_LICENCE()
| FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL |
| ) |
|
◆ FILE_SECBOOT()
| FILE_SECBOOT |
( |
PERMITTED |
| ) |
|
◆ poweroff_exec()
| static int poweroff_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
The "poweroff" command.
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 57 of file poweroff_cmd.c.
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
int poweroff(void)
Power off system.
char * strerror(int errno)
Retrieve string representation of error number.
static struct command_descriptor poweroff_cmd
"poweroff" command descriptor
static union @447 opts
"cert<xxx>" option list
References opts, parse_options(), poweroff(), poweroff_cmd, printf(), rc, and strerror().
◆ COMMAND()
◆ poweroff_opts
◆ poweroff_cmd
Initial value:=
static struct option_descriptor poweroff_opts[]
"poweroff" option list
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
#define NULL
NULL pointer (VOID *)
"poweroff" command descriptor
Definition at line 47 of file poweroff_cmd.c.
Referenced by poweroff_exec().