iPXE
Data Fields
option Struct Reference

A long option, as used for getopt_long() More...

#include <getopt.h>

Data Fields

const char * name
 Long name of this option. More...
 
int has_arg
 Option takes an argument. More...
 
int * flag
 Location into which to store val, or NULL. More...
 
int val
 Value to return. More...
 

Detailed Description

A long option, as used for getopt_long()

Definition at line 24 of file getopt.h.

Field Documentation

◆ name

const char* option::name

Long name of this option.

Definition at line 26 of file getopt.h.

Referenced by getopt_long(), match_long_option(), reparse_options(), and tftp_process_option().

◆ has_arg

int option::has_arg

Option takes an argument.

Must be one of no_argument, required_argument, or optional_argument.

Definition at line 32 of file getopt.h.

Referenced by getopt_long(), match_long_option(), print_usage(), and reparse_options().

◆ flag

int* option::flag

Location into which to store val, or NULL.

See the description for val for more details.

Definition at line 37 of file getopt.h.

Referenced by match_long_option().

◆ val

int option::val

Value to return.

If flag is NULL, then this is the value that will be returned by getopt_long() when this option is found, and should therefore be set to the equivalent short option character.

If flag is non-NULL, then this value will be written to the location pointed to by @flag, and getopt_long() will return 0.

Definition at line 49 of file getopt.h.

Referenced by match_long_option(), and reparse_options().


The documentation for this struct was generated from the following file: