Re: [PATCH 06/12] kernel-shark: Load Last Session from command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Mar 2019 17:10:06 +0200
Yordan Karadzhov <ykaradzhov@xxxxxxxxxx> wrote:

> ./kernelshark -l  will load directly the Last Session
> 
> Signed-off-by : Yordan Karadzhov <ykaradzhov@xxxxxxxxxx>
> ---
>  kernel-shark/src/kernelshark.cpp | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel-shark/src/kernelshark.cpp b/kernel-shark/src/kernelshark.cpp
> index 2ec91de..1ec6678 100644
> --- a/kernel-shark/src/kernelshark.cpp
> +++ b/kernel-shark/src/kernelshark.cpp
> @@ -28,6 +28,7 @@ void usage(const char *prog)
>  	printf("  -p	register plugin, use plugin name, absolute or relative path\n");
>  	printf("  -u	unregister plugin, use plugin name or absolute path\n");
>  	printf("  -s	import a session\n");
> +	printf("  -l	import the last session\n");
>  }
>  
>  int main(int argc, char **argv)
> @@ -40,7 +41,7 @@ int main(int argc, char **argv)
>  	int c;
>  	bool fromSession = false;
>  
> -	while ((c = getopt(argc, argv, "hvi:p:u:s:")) != -1) {
> +	while ((c = getopt(argc, argv, "hvi:p:u:s:l")) != -1) {
>  		switch(c) {
>  		case 'h':
>  			usage(argv[0]);
> @@ -65,6 +66,12 @@ int main(int argc, char **argv)
>  		case 's':
>  			ks.loadSession(QString(optarg));
>  			fromSession = true;
> +			break;
> +
> +		case 'l':
> +			ks.loadSession(ks.lastSessionFile());
> +			fromSession = true;
> +			break;

This produces:

[ 69%] Building CXX object src/CMakeFiles/kernelshark.dir/kernelshark.cpp.o
/work/git/trace-cmd.git/kernel-shark/src/kernelshark.cpp: In function ‘int main(int, char**)’:
/work/git/trace-cmd.git/kernel-shark/src/kernelshark.cpp:72:22: error: ‘class KsMainWindow’ has no member named ‘lastSessionFile’; did you mean ‘loadSession’?
    ks.loadSession(ks.lastSessionFile());
                      ^~~~~~~~~~~~~~~
                      loadSession


Am I missing something?

-- Steve

>  
>  		default:
>  			break;




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux