src/dpdk/lib/librte_eal/freebsd/eal.c
static void
eal_log_level_parse(int argc, char **argv)
{
	int opt;
	char **argvopt;
	int option_index;
	const int old_optind = optind;
	const int old_optopt = optopt;
	const int old_optreset = optreset;
	char * const old_optarg = optarg;
	struct internal_config *internal_conf =
		eal_get_internal_configuration();

	argvopt = argv;
	optind = 1;
	optreset = 1;

	while ((opt = getopt_long(argc, argvopt, eal_short_options,
				  eal_long_options, &option_index)) != EOF) {

		int ret;

		/* getopt is not happy, stop right now */
		if (opt == '?')
			break;

		ret = (opt == OPT_LOG_LEVEL_NUM) ?
		    eal_parse_common_option(opt, optarg, internal_conf) : 0;

		/* common parser is not happy */
		if (ret < 0)
			break;
	}

	/* restore getopt lib */
	optind = old_optind;
	optopt = old_optopt;
	optreset = old_optreset;
	optarg = old_optarg;
}
/* Parse the arguments for --log-level only */
Parse the arguments for --log-level only
Parse the arguments for -- log - level only
static void
eal_log_level_parse(int argc, char **argv)
{
	int opt;
	char **argvopt;
	int option_index;
	const int old_optind = optind;
	const int old_optopt = optopt;
	const int old_optreset = optreset;
	char * const old_optarg = optarg;
	struct internal_config *internal_conf =
		eal_get_internal_configuration();
	argvopt = argv;
	optind = 1;
	optreset = 1;
	while ((opt = getopt_long(argc, argvopt, eal_short_options,
				  eal_long_options, &option_index)) != EOF) {
		int ret;
		if (opt == '?')
			break;
		ret = (opt == OPT_LOG_LEVEL_NUM) ?
		    eal_parse_common_option(opt, optarg, internal_conf) : 0;
		if (ret < 0)
			break;
	}
	optind = old_optind;
	optopt = old_optopt;
	optreset = old_optreset;
	optarg = old_optarg;
}
static void eal_log_level_parse ( int argc , char * * argv ) { int opt ; char * * argvopt ; int option_index ; const int old_optind = optind ; const int old_optopt = optopt ; const int old_optreset = optreset ; char * const old_optarg = optarg ; struct internal_config * internal_conf = eal_get_internal_configuration ( ) ; argvopt = argv ; optind = 1 ; optreset = 1 ; while ( ( opt = getopt_long ( argc , argvopt , eal_short_options , eal_long_options , & option_index ) ) != EOF ) { int ret ; if ( opt == ' ' ) break ; ret = ( opt == OPT_LOG_LEVEL_NUM ) ? eal_parse_common_option ( opt , optarg , internal_conf ) : 0 ; if ( ret < 0 ) break ; } optind = old_optind ; optopt = old_optopt ; optreset = old_optreset ; optarg = old_optarg ; }
Parse the arguments for --log-level only
Parse the arguments for -- log - level only
/* getopt is not happy, stop right now */ /* common parser is not happy */ /* restore getopt lib */