Looks good. --Justin
On Apr 3, 2013, at 12:02 PM, Ben Pfaff <b...@nicira.com> wrote: > An upcoming patch will start using the --log-file option with these test > programs, so they need to support it. > > Signed-off-by: Ben Pfaff <b...@nicira.com> > --- > tests/test-netflow.c | 12 +++++------- > tests/test-sflow.c | 13 ++++++------- > 2 files changed, 11 insertions(+), 14 deletions(-) > > diff --git a/tests/test-netflow.c b/tests/test-netflow.c > index 5147a20..6e5b0be 100644 > --- a/tests/test-netflow.c > +++ b/tests/test-netflow.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (c) 2011, 2012 Nicira, Inc. > + * Copyright (c) 2011, 2012, 2013 Nicira, Inc. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > @@ -234,12 +234,13 @@ static void > parse_options(int argc, char *argv[]) > { > enum { > - DAEMON_OPTION_ENUMS > + DAEMON_OPTION_ENUMS, > + VLOG_OPTION_ENUMS > }; > static struct option long_options[] = { > - {"verbose", optional_argument, NULL, 'v'}, > {"help", no_argument, NULL, 'h'}, > DAEMON_LONG_OPTIONS, > + VLOG_LONG_OPTIONS, > {NULL, 0, NULL, 0}, > }; > char *short_options = long_options_to_short_options(long_options); > @@ -254,11 +255,8 @@ parse_options(int argc, char *argv[]) > case 'h': > usage(); > > - case 'v': > - vlog_set_verbosity(optarg); > - break; > - > DAEMON_OPTION_HANDLERS > + VLOG_OPTION_HANDLERS > > case '?': > exit(EXIT_FAILURE); > diff --git a/tests/test-sflow.c b/tests/test-sflow.c > index 3eb93c5b..838fa62 100644 > --- a/tests/test-sflow.c > +++ b/tests/test-sflow.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (c) 2011, 2012 Nicira, Inc. > + * Copyright (c) 2011, 2012, 2013 Nicira, Inc. > * Copyright (c) 2013 InMon Corp. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > @@ -556,12 +556,14 @@ static void > parse_options(int argc, char *argv[]) > { > enum { > - DAEMON_OPTION_ENUMS > + DAEMON_OPTION_ENUMS, > + VLOG_OPTION_ENUMS > }; > static struct option long_options[] = { > {"verbose", optional_argument, NULL, 'v'}, > {"help", no_argument, NULL, 'h'}, > DAEMON_LONG_OPTIONS, > + VLOG_LONG_OPTIONS, > {NULL, 0, NULL, 0}, > }; > char *short_options = long_options_to_short_options(long_options); > @@ -576,11 +578,8 @@ parse_options(int argc, char *argv[]) > case 'h': > usage(); > > - case 'v': > - vlog_set_verbosity(optarg); > - break; > - > - DAEMON_OPTION_HANDLERS > + DAEMON_OPTION_HANDLERS > + VLOG_OPTION_HANDLERS > > case '?': > exit(EXIT_FAILURE); > -- > 1.7.10.4 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev