linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yordan Karadzhov <ykaradzhov@vmware.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH 4/4] kernel-shark: Configuration file directory to be created by the executable
Date: Thu,  4 Apr 2019 17:56:03 +0300	[thread overview]
Message-ID: <20190404145603.13592-5-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20190404145603.13592-1-ykaradzhov@vmware.com>

The build process should not make the directory that will contain
KernelShark configuration files. This directory should be made by
the application itself.

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark/CMakeLists.txt       | 2 --
 kernel-shark/src/KsMainWindow.cpp | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
index 14d73f5..c6a4abf 100644
--- a/kernel-shark/CMakeLists.txt
+++ b/kernel-shark/CMakeLists.txt
@@ -17,8 +17,6 @@ set(KS_DIR ${CMAKE_SOURCE_DIR})
 set(_KS_CACHE_DIR "$ENV{HOME}/.cache/kernelshark"
     CACHE STRING "Directory for cached configuration files.")
 
-file(MAKE_DIRECTORY ${_KS_CACHE_DIR})
-
 include(${KS_DIR}/build/FindTraceCmd.cmake)
 include(${KS_DIR}/build/FindJSONC.cmake)
 
diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 39b06d6..898e598 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -127,6 +127,9 @@ KsMainWindow::KsMainWindow(QWidget *parent)
 		this,		&KsMainWindow::_deselectB);
 
 	_resizeEmpty();
+
+	if (!QDir(KS_CACHE_DIR).exists())
+		QDir().mkdir(KS_CACHE_DIR);
 }
 
 /** Destroy KernelShark Main window. */
-- 
2.19.1


  parent reply	other threads:[~2019-04-04 14:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 14:55 [PATCH 0/4] Various modifications and fixes toward KS 1.0 Yordan Karadzhov
2019-04-04 14:56 ` [PATCH 1/4] kernel-shark: Configuration information in ${HOME}/.cache/kernelshark Yordan Karadzhov
2019-04-08 15:01   ` Slavomir Kaslev
2019-04-08 15:13     ` Steven Rostedt
2019-04-09 12:23       ` Yordan Karadzhov (VMware)
2019-04-09 13:11         ` Slavomir Kaslev
2019-04-09 13:23         ` Steven Rostedt
2019-04-09 13:33           ` Yordan Karadzhov
2019-04-09 14:59           ` Slavomir Kaslev
2019-04-09 15:11             ` Steven Rostedt
2019-04-09 15:44               ` Slavomir Kaslev
2019-04-09 17:02                 ` Steven Rostedt
2019-04-15 11:05                 ` Yordan Karadzhov (VMware)
2019-04-15 13:11                   ` Slavomir Kaslev
2019-04-15 13:58                     ` Yordan Karadzhov (VMware)
2019-04-15 11:16                 ` Yordan Karadzhov (VMware)
2019-04-15 20:04                   ` Steven Rostedt
2019-04-04 14:56 ` [PATCH 2/4] kernel-shark: Set the configuration cache directory via env. variable Yordan Karadzhov
2019-04-04 14:56 ` [PATCH 3/4] kernel-shark: Load Last Session from command line Yordan Karadzhov
2019-04-04 14:56 ` Yordan Karadzhov [this message]
2019-04-08 15:03   ` [PATCH 4/4] kernel-shark: Configuration file directory to be created by the executable Slavomir Kaslev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190404145603.13592-5-ykaradzhov@vmware.com \
    --to=ykaradzhov@vmware.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).