58extern int getopt_long (
int argc,
char *
const argv[],
const char *optstring,
59 const struct option *longopts,
int *longindex );
71static inline int getopt (
int argc,
char *
const argv[],
72 const char *optstring ) {
73 static const struct option no_options[] = {
#define NULL
NULL pointer (VOID *)
int nextchar
Current option character index.
int optopt
Unrecognised option.
int optind
Current option index.
char * optarg
Option argument.
int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
Parse command-line options.
static void reset_getopt(void)
Reset getopt() internal state.
static int getopt(int argc, char *const argv[], const char *optstring)
Parse command-line options.
getopt_argument_requirement
@ required_argument
Option requires an argument.
@ optional_argument
Option may have an argument.
@ no_argument
Option does not take an argument.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
A long option, as used for getopt_long()
int has_arg
Option takes an argument.
int * flag
Location into which to store val, or NULL.
const char * name
Long name of this option.