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, NULL, 'd'},
{"file", required_argument, NULL, 'f'},
{"search", required_argument, NULL, 's'},
{"log_output", required_argument, NULL, 'l'},
{"command", required_argument, NULL, 'c'},
{NULL, 0, NULL, 0}
}
static int version_flag
Definition: options.c:37
static int help_flag
Definition: options.c:37
#define NULL
Definition: usb.h:16

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().