diff options
Diffstat (limited to 'tools/perf/util/header.c')
| -rw-r--r-- | tools/perf/util/header.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 3a6d2044333..74ea3c2f813 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -174,6 +174,15 @@ perf_header__set_cmdline(int argc, const char **argv)  {  	int i; +	/* +	 * If header_argv has already been set, do not override it. +	 * This allows a command to set the cmdline, parse args and +	 * then call another builtin function that implements a +	 * command -- e.g, cmd_kvm calling cmd_record. +	 */ +	if (header_argv) +		return 0; +  	header_argc = (u32)argc;  	/* do not include NULL termination */  |