diff mbox

[ovs-dev] dpctl: Fix usage for most dpctl commands.

Message ID 20161206194029.11514-1-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff Dec. 6, 2016, 7:40 p.m. UTC
The usage should not repeat the command name, but most of the dpctl
commands' usage did repeat it.  This fixes the problem.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 lib/dpctl.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Aaron Conole Dec. 6, 2016, 8:23 p.m. UTC | #1
Ben Pfaff <blp@ovn.org> writes:

> The usage should not repeat the command name, but most of the dpctl
> commands' usage did repeat it.  This fixes the problem.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>  lib/dpctl.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

I didn't build this, but it looks good to me; so a big 'ol

  Reviewed-by: Aaron Conole <aconole@redhat.com>
Ben Pfaff Dec. 6, 2016, 8:48 p.m. UTC | #2
On Tue, Dec 06, 2016 at 03:23:45PM -0500, Aaron Conole wrote:
> Ben Pfaff <blp@ovn.org> writes:
> 
> > The usage should not repeat the command name, but most of the dpctl
> > commands' usage did repeat it.  This fixes the problem.
> >
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > ---
> >  lib/dpctl.c | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> I didn't build this, but it looks good to me; so a big 'ol
> 
>   Reviewed-by: Aaron Conole <aconole@redhat.com>

Thanks, applied to master.

I got a weird error from github, though, what's up with this?

    blp@sigabrt:~/nicira/ovs/_build(0)$ git push ovs HEAD:master
    Counting objects: 4, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (4/4), done.
    Writing objects: 100% (4/4), 546 bytes | 0 bytes/s, done.
    Total 4 (delta 3), reused 0 (delta 0)
    remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
    remote: Unexpected system error after push was received.
    remote: These changes may not be reflected on github.com!
    remote: Your unique error code: 9839a5cbeadcbe7405c75da1f9a965fe
    To github.com:openvswitch/ovs.git
       31b418c..1ed90a9  HEAD -> master

And, indeed, another "git push" says "everything up to date", but the
commit doesn't show up on the website...
Aaron Conole Dec. 7, 2016, 3:09 p.m. UTC | #3
Ben Pfaff <blp@ovn.org> writes:

> On Tue, Dec 06, 2016 at 03:23:45PM -0500, Aaron Conole wrote:
>> Ben Pfaff <blp@ovn.org> writes:
>> 
>> > The usage should not repeat the command name, but most of the dpctl
>> > commands' usage did repeat it.  This fixes the problem.
>> >
>> > Signed-off-by: Ben Pfaff <blp@ovn.org>
>> > ---
>> >  lib/dpctl.c | 20 ++++++++++----------
>> >  1 file changed, 10 insertions(+), 10 deletions(-)
>> 
>> I didn't build this, but it looks good to me; so a big 'ol
>> 
>>   Reviewed-by: Aaron Conole <aconole@redhat.com>
>
> Thanks, applied to master.
>
> I got a weird error from github, though, what's up with this?
>
>     blp@sigabrt:~/nicira/ovs/_build(0)$ git push ovs HEAD:master
>     Counting objects: 4, done.
>     Delta compression using up to 8 threads.
>     Compressing objects: 100% (4/4), done.
>     Writing objects: 100% (4/4), 546 bytes | 0 bytes/s, done.
>     Total 4 (delta 3), reused 0 (delta 0)
>     remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
>     remote: Unexpected system error after push was received.
>     remote: These changes may not be reflected on github.com!
>     remote: Your unique error code: 9839a5cbeadcbe7405c75da1f9a965fe
>     To github.com:openvswitch/ovs.git
>        31b418c..1ed90a9  HEAD -> master
>
> And, indeed, another "git push" says "everything up to date", but the
> commit doesn't show up on the website...

I knew I should have tested this clearly nefarious change.
Now OvS has broken GitHub.
diff mbox

Patch

diff --git a/lib/dpctl.c b/lib/dpctl.c
index bdccce7..7011b18 100644
--- a/lib/dpctl.c
+++ b/lib/dpctl.c
@@ -1,5 +1,5 @@ 
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -1615,18 +1615,18 @@  out:
 }
 
 static const struct dpctl_command all_commands[] = {
-    { "add-dp", "add-dp dp [iface...]", 1, INT_MAX, dpctl_add_dp, DP_RW },
-    { "del-dp", "del-dp dp", 1, 1, dpctl_del_dp, DP_RW },
-    { "add-if", "add-if dp iface...", 2, INT_MAX, dpctl_add_if, DP_RW },
-    { "del-if", "del-if dp iface...", 2, INT_MAX, dpctl_del_if, DP_RW },
-    { "set-if", "set-if dp iface...", 2, INT_MAX, dpctl_set_if, DP_RW },
+    { "add-dp", "dp [iface...]", 1, INT_MAX, dpctl_add_dp, DP_RW },
+    { "del-dp", "dp", 1, 1, dpctl_del_dp, DP_RW },
+    { "add-if", "dp iface...", 2, INT_MAX, dpctl_add_if, DP_RW },
+    { "del-if", "dp iface...", 2, INT_MAX, dpctl_del_if, DP_RW },
+    { "set-if", "dp iface...", 2, INT_MAX, dpctl_set_if, DP_RW },
     { "dump-dps", "", 0, 0, dpctl_dump_dps, DP_RO },
     { "show", "[dp...]", 0, INT_MAX, dpctl_show, DP_RO },
     { "dump-flows", "[dp]", 0, 2, dpctl_dump_flows, DP_RO },
-    { "add-flow", "add-flow [dp] flow actions", 2, 3, dpctl_add_flow, DP_RW },
-    { "mod-flow", "mod-flow [dp] flow actions", 2, 3, dpctl_mod_flow, DP_RW },
-    { "get-flow", "get-flow [dp] ufid", 1, 2, dpctl_get_flow, DP_RO },
-    { "del-flow", "del-flow [dp] flow", 1, 2, dpctl_del_flow, DP_RW },
+    { "add-flow", "[dp] flow actions", 2, 3, dpctl_add_flow, DP_RW },
+    { "mod-flow", "[dp] flow actions", 2, 3, dpctl_mod_flow, DP_RW },
+    { "get-flow", "[dp] ufid", 1, 2, dpctl_get_flow, DP_RO },
+    { "del-flow", "[dp] flow", 1, 2, dpctl_del_flow, DP_RW },
     { "del-flows", "[dp]", 0, 1, dpctl_del_flows, DP_RW },
     { "dump-conntrack", "[dp] [zone=N]", 0, 2, dpctl_dump_conntrack, DP_RO },
     { "flush-conntrack", "[dp] [zone=N]", 0, 2, dpctl_flush_conntrack, DP_RW },