OpenOCD
options.c File Reference
Include dependency graph for options.c:

Go to the source code of this file.

Functions

static void add_default_dirs (void)
 
static void add_user_dirs (void)
 
int configuration_output_handler (struct command_context *context, const char *line)
 
static char * find_exe_path (void)
 
static char * find_relative_path (const char *from, const char *to)
 
int parse_cmdline_args (struct command_context *cmd_ctx, int argc, char *argv[])
 

Variables

static int help_flag
 
static const struct option long_options []
 
static int version_flag
 

Function Documentation

◆ add_default_dirs()

static void add_default_dirs ( void  )
static

◆ add_user_dirs()

static void add_user_dirs ( void  )
static

Definition at line 170 of file options.c.

References add_script_search_dir(), and alloc_printf().

Referenced by add_default_dirs().

◆ configuration_output_handler()

int configuration_output_handler ( struct command_context context,
const char *  line 
)

Definition at line 50 of file options.c.

References ERROR_OK, and LOG_USER_N.

Referenced by openocd_main().

◆ find_exe_path()

static char* find_exe_path ( void  )
static

Definition at line 60 of file options.c.

References ARRAY_SIZE, LOG_DEBUG, LOG_WARNING, NULL, and size.

Referenced by add_default_dirs().

◆ find_relative_path()

static char* find_relative_path ( const char *  from,
const char *  to 
)
static

Definition at line 132 of file options.c.

Referenced by add_default_dirs().

◆ parse_cmdline_args()

int parse_cmdline_args ( struct command_context cmd_ctx,
int  argc,
char *  argv[] 
)

Variable Documentation

◆ help_flag

int help_flag
static

Definition at line 37 of file options.c.

Referenced by parse_cmdline_args().

◆ long_options

const struct option long_options[]
static
Initial value:
= {
{"help", no_argument, &help_flag, 1},
{"version", no_argument, &version_flag, 1},
{"debug", optional_argument, 0, 'd'},
{"file", required_argument, 0, 'f'},
{"search", required_argument, 0, 's'},
{"log_output", required_argument, 0, 'l'},
{"command", required_argument, 0, 'c'},
{0, 0, 0, 0}
}
static int version_flag
Definition: options.c:37
static int help_flag
Definition: options.c:37

Definition at line 37 of file options.c.

Referenced by parse_cmdline_args().

◆ version_flag

int version_flag
static

Definition at line 37 of file options.c.

Referenced by parse_cmdline_args().