[libvirt] [PATCH] virsh: trim aliases from -h output

Eric Blake eblake at redhat.com
Sat Mar 17 04:37:28 UTC 2012


On 03/16/2012 09:24 PM, Osier Yang wrote:
> On 2012年03月17日 03:23, Eric Blake wrote:
>> Commit af3f9aab taught 'virsh help' to ignore command aliases,
>> but forgot 'virsh -h'.
>>
>> * tools/virsh.c (vshUsage): Handle aliases.
>> ---
>>   tools/virsh.c |    5 ++++-
>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/virsh.c b/tools/virsh.c
>> index 19f9bbe..e48c56a 100644
>> --- a/tools/virsh.c
>> +++ b/tools/virsh.c
>> @@ -19721,8 +19721,11 @@ vshUsage(void)
>>           fprintf(stdout, _(" %s (help keyword '%s')\n"), grp->name,
>> grp->keyword);
>>
>>           for (cmd = grp->commands; cmd->name; cmd++)
>> +            if (cmd->flags&  VSH_CMD_FLAG_ALIAS)
>> +                continue;
>>               fprintf(stdout,
>> -                    "    %-30s %s\n", cmd->name,
>> _(vshCmddefGetInfo(cmd, "help")));
>> +                    "    %-30s %s\n", cmd->name,
>> +                    _(vshCmddefGetInfo(cmd, "help")));
>>

Oh my - I completely missed the {} (emailed the wrong version).

>>           fprintf(stdout, "\n");
>>       }
> 
> ACK

I've pushed the corrected patch.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list