[ovs-dev] [PATCH] unixctl: Improve readability of "help" output for long command names.

Ben Pfaff blp at nicira.com
Mon Jan 2 20:49:15 UTC 2012


Thanks, I pushed this to master.

On Wed, Dec 28, 2011 at 11:51:29PM -0500, Ethan Jackson wrote:
> Looks good.
> 
> Ethan
> 
> On Thu, Dec 22, 2011 at 18:51, Ben Pfaff <blp at nicira.com> wrote:
> > Without this change, if a unixctl command name is 23 character long or
> > longer, no space appeared between the command name and its usage. ?This
> > commit ensures that at least one space always appears.
> >
> > No command yet has a name this long. ?I discovered this issue when I added
> > one that does.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > ?lib/unixctl.c | ? ?2 +-
> > ?1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/lib/unixctl.c b/lib/unixctl.c
> > index 2a2bcf2..caaf252 100644
> > --- a/lib/unixctl.c
> > +++ b/lib/unixctl.c
> > @@ -96,7 +96,7 @@ unixctl_help(struct unixctl_conn *conn, int argc OVS_UNUSED,
> > ? ? ? ? const struct shash_node *node = nodes[i];
> > ? ? ? ? const struct unixctl_command *command = node->data;
> >
> > - ? ? ? ?ds_put_format(&ds, " ?%-23s%s\n", node->name, command->usage);
> > + ? ? ? ?ds_put_format(&ds, " ?%-23s %s\n", node->name, command->usage);
> > ? ? }
> > ? ? free(nodes);
> >
> > --
> > 1.7.2.5
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list