OPT_ACCEPT_VCONN = UCHAR_MAX + 1,
OPT_EXIT_WITHOUT_BIND,
OPT_EXIT_AFTER_BIND,
- OPT_NO_DETACH
+ OPT_NO_DETACH,
+ VLOG_OPTION_ENUMS
};
static struct option long_options[] = {
{"accept-vconn", required_argument, 0, OPT_ACCEPT_VCONN},
{"timeout", required_argument, 0, 't'},
{"pidfile", optional_argument, 0, OPT_PIDFILE},
{"overwrite-pidfile", no_argument, 0, OPT_OVERWRITE_PIDFILE},
- {"verbose", optional_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
+ VLOG_LONG_OPTIONS,
{0, 0, 0, 0},
};
char *short_options = long_options_to_short_options(long_options);
OVS_PRINT_VERSION(0, 0);
exit(EXIT_SUCCESS);
- case 'v':
- vlog_set_verbosity(optarg);
- break;
+ VLOG_OPTION_HANDLERS
case '?':
exit(EXIT_FAILURE);
static void
parse_options(int argc, char *argv[])
{
+ enum {
+ OPT_DUMMY = UCHAR_MAX + 1,
+ VLOG_OPTION_ENUMS
+ };
static struct option long_options[] = {
{"timeout", required_argument, 0, 't'},
- {"verbose", optional_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
+ VLOG_LONG_OPTIONS,
{0, 0, 0, 0},
};
char *short_options = long_options_to_short_options(long_options);
OVS_PRINT_VERSION(0, 0);
exit(EXIT_SUCCESS);
- case 'v':
- vlog_set_verbosity(optarg);
- break;
+ VLOG_OPTION_HANDLERS
case '?':
exit(EXIT_FAILURE);
parse_options(int argc, char *argv[], struct settings *s)
{
enum {
- OPT_STRICT = UCHAR_MAX + 1
+ OPT_STRICT = UCHAR_MAX + 1,
+ VLOG_OPTION_ENUMS
};
static struct option long_options[] = {
{"timeout", required_argument, 0, 't'},
- {"verbose", optional_argument, 0, 'v'},
{"strict", no_argument, 0, OPT_STRICT},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
+ VLOG_LONG_OPTIONS,
VCONN_SSL_LONG_OPTIONS
{0, 0, 0, 0},
};
OVS_PRINT_VERSION(OFP_VERSION, OFP_VERSION);
exit(EXIT_SUCCESS);
- case 'v':
- vlog_set_verbosity(optarg);
- break;
-
case OPT_STRICT:
s->strict = true;
break;
+ VLOG_OPTION_HANDLERS
VCONN_SSL_OPTION_HANDLERS
case '?':