iPXE
login_cmd.c File Reference

Login commands. More...

#include <string.h>
#include <stdio.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/login_ui.h>

Go to the source code of this file.

Data Structures

struct  login_options
 "login" options More...

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
static int login_exec (int argc, char **argv)
 "login" command
 COMMAND (login, login_exec)
 Login commands.

Variables

static struct option_descriptor login_opts [] = {}
 "login" option list
static struct command_descriptor login_cmd
 "login" command descriptor

Detailed Description

Login commands.

Definition in file login_cmd.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ login_exec()

int login_exec ( int argc,
char ** argv )
static

"login" command

Parameters
argcArgument count
argvArgument list
Return values
rcReturn status code

Definition at line 56 of file login_cmd.c.

56 {
57 struct login_options opts;
58 int rc;
59
60 /* Parse options */
61 if ( ( rc = parse_options ( argc, argv, &login_cmd, &opts ) ) != 0 )
62 return rc;
63
64 /* Show login UI */
65 if ( ( rc = login_ui() ) != 0 ) {
66 printf ( "Could not set credentials: %s\n",
67 strerror ( rc ) );
68 return rc;
69 }
70
71 return 0;
72}
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
static union @024010030001061367220137227263210031030210157031 opts
"cert<xxx>" option list
static struct command_descriptor login_cmd
"login" command descriptor
Definition login_cmd.c:46
int login_ui(void)
Definition login_ui.c:68
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
Definition parseopt.c:485
char * strerror(int errno)
Retrieve string representation of error number.
Definition strerror.c:79
"login" options
Definition login_cmd.c:40
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465

References login_cmd, login_ui(), opts, parse_options(), printf(), rc, and strerror().

Referenced by COMMAND().

◆ COMMAND()

COMMAND ( login ,
login_exec  )

Login commands.

References login, and login_exec().

Variable Documentation

◆ login_opts

struct option_descriptor login_opts[] = {}
static

"login" option list

Definition at line 43 of file login_cmd.c.

43{};

◆ login_cmd

struct command_descriptor login_cmd
static
Initial value:
=
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
static struct option_descriptor login_opts[]
"login" option list
Definition login_cmd.c:43
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
Definition parseopt.h:109

"login" command descriptor

Definition at line 46 of file login_cmd.c.

Referenced by login_exec(), and PROVIDE_REQUIRING_SYMBOL().