lkml.org 
[lkml]   [2013]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] perf completion: complete 'perf kvm'
On 12/12/13, 2:09 AM, Ramkumar Ramachandra wrote:
> David Ahern wrote:
>> I don't like the command list being embedded in the completion script. It
>> will get outdated quickly.
>
> I could introduce a
>
> $ perf kvm --list-cmds
>
> but that would mean a
>
> printf("record report stat ..")
>
> in builtin-kvm.c, because the commands aren't in any sort of array.
>

That would work -- perhaps a #define or string near

const char * const kvm_usage[] = {
"perf kvm [<options>] {top|record|report|diff|buildid-list|stat}",
NULL
};

Building kvm_usage from the string would better - only 1 place listing
the commands.

David


\
 
 \ /
  Last update: 2013-12-12 18:41    [W:1.727 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site