Re: [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark

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

 





On 11.03.19 г. 17:33 ч., Steven Rostedt wrote:
On Mon, 11 Mar 2019 14:20:23 +0200
Slavomir Kaslev <slavomir.kaslev@xxxxxxxxx> wrote:

On Fri, Mar 8, 2019 at 7:16 PM Yordan Karadzhov <ykaradzhov@xxxxxxxxxx> wrote:

By default the "Last session" configuration file will be saved in
${HOME}/.kshark

${HOME}/.config/foobar seems to be the standard path these days for
config files[1]. Wdyt about switching it to ${HOME}/.config/khark?

[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Yeah, I was talking with Patrick McLean (who is a package maintainer
for Gentoo) at SCaLE and was saying that we should look at .config. And
that's the reference he pointed me to as well.

Note, we may need to use both .config and .cache, as I'm thinking
that .cache is better for the saving of last session, and .config
should be the default for user defined sessions (Export Session).


I will rework the patch.
Thanks a lot!
Y.



-- Steve



-- Slavi


Suggested-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Signed-off-by: Yordan Karadzhov <ykaradzhov@xxxxxxxxxx>
---
  Makefile                    | 2 +-
  kernel-shark/CMakeLists.txt | 5 +++--
  2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index b780718..967c364 100644
--- a/Makefile
+++ b/Makefile
@@ -254,7 +254,7 @@ all_cmd: $(CMD_TARGETS)
  CMAKE_COMMAND = /usr/bin/cmake

  $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
-       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) ..
+       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DKS_CONF_DIR=$(HOME)/.kshark ..

  gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
         $(Q)$(MAKE) $(S) -C $(kshark-dir)/build
diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
index 20ced14..3c3beb0 100644
--- a/kernel-shark/CMakeLists.txt
+++ b/kernel-shark/CMakeLists.txt
@@ -14,7 +14,7 @@ set(KS_DIR ${CMAKE_SOURCE_DIR})

  # Make a directory to hold configuration files. To change this do:
  # cmake .. -DKS_CONF_DIR=/your/preferred/path
-set(KS_CONF_DIR "${KS_DIR}/.ksconf" CACHE STRING "Directory for configuration files.")
+set(KS_CONF_DIR "$ENV{HOME}/.kshark" CACHE STRING "Directory for configuration files.")
  file(MAKE_DIRECTORY ${KS_CONF_DIR})

  include(${KS_DIR}/build/FindTraceCmd.cmake)
@@ -59,7 +59,8 @@ include_directories(${KS_DIR}/src/
  message("")
  message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
  message(STATUS "CXX flags    : " ${CMAKE_CXX_FLAGS})
-message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS})
+message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS}\n)
+message(STATUS "config. files saved in ${KS_CONF_DIR}")

  add_subdirectory(${KS_DIR}/src)
  add_subdirectory(${KS_DIR}/examples)
--
2.19.1






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

  Powered by Linux