[libvirt] [PATCH] virsh: Remove redundant optional option for cmdHelp

Eric Blake eblake at redhat.com
Fri Dec 3 15:24:51 UTC 2010


On 12/03/2010 12:34 AM, Osier Yang wrote:
> Remove the optional option "group", as cmdHelp should accepts
> only one option, and rename option "command" as "command-or-group",
> ("virsh help" supports both command and command group now, and user
> nealy uses the options, so it doesn't matter much for it being longer,
> :-)
> 
> * tools/virsh.c
> ---
>  tools/virsh.c |    8 ++------
>  1 files changed, 2 insertions(+), 6 deletions(-)

Given the ensuing discussion, I'm pushing with this squashed in.

diff --git i/tools/virsh.c w/tools/virsh.c
index c2d717f..3e1bde1 100644
--- i/tools/virsh.c
+++ w/tools/virsh.c
@@ -569,7 +569,7 @@ static const vshCmdInfo info_help[] = {
 };

 static const vshCmdOptDef opts_help[] = {
-    {"command-or-group", VSH_OT_DATA, 0, N_("Prints global help,
command specific help, or help for a group of related commands")},
+    {"command", VSH_OT_DATA, 0, N_("Prints global help, command
specific help, or help for a group of related commands")},
     {NULL, 0, 0, NULL}
 };

@@ -580,7 +580,7 @@ cmdHelp(vshControl *ctl, const vshCmd *cmd)
     const vshCmdGrp *g;
     const char *name;

-    name = vshCommandOptString(cmd, "command-or-group", NULL);
+    name = vshCommandOptString(cmd, "command", NULL);

     if (!name) {
         const vshCmdGrp *grp;

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101203/256799cf/attachment-0001.sig>


More information about the libvir-list mailing list