On Wed, Oct 15, 2014 at 09:51:54AM -0700, Alex Wang wrote: > I'm changing the 'struct command' like this: > > diff --git a/lib/command-line.h b/lib/command-line.h > index 157cb58..57fdff5 100644 > --- a/lib/command-line.h > +++ b/lib/command-line.h > @@ -27,7 +27,7 @@ struct command { > const char *name; > + const char *usage; > int min_args; > int max_args; > - void (*handler)(int argc, char *argv[]); > + void (*handler)(int argc, char *argv[], void *aux); > }; > > The 'usage' will record the format of cmds. (e.g. the 'usage' in 'struct > unixctl_command'). The 'help' subcommand will print the command with > usage and bash completion script will parse it. > > The 'handler()' change is for eliminating the 'struct dpctl_command'. > > I saw this will affect a ton of cmd source files e.g. ovsdb-tool, > ovs-benchmark > which uses 'struct command'. > > So, want to know what you think about doing this.
I think it could be a nice step forward but I worry that it will make the --help output harder to read. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev