Re: [PATCH 1/4] kernel-shark: Configuration information in ${HOME}/.cache/kernelshark

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

 



On Mon, 8 Apr 2019 18:01:03 +0300
Slavomir Kaslev <kaslevs@xxxxxxxxxx> wrote:

> > +++ b/Makefile
> > @@ -254,7 +254,10 @@ all_cmd: $(CMD_TARGETS)
> >  CMAKE_COMMAND = /usr/bin/cmake
> >  
> >  $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
> > -	$(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -D_INSTALL_PREFIX=$(prefix) ..
> > +
> > +	$(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) \
> > +		-D_KS_CACHE_DIR=$(HOME)/.cache/kernelshark \  
>                                 ^
> Which $HOME would that be? The one for the user who built kernelshark and not the user who runs it.
> 
> 
> > +		-D_INSTALL_PREFIX=$(prefix) ..

Correct, this needs to be the HOME from the run time environment. Which
is taken as the third parameter from main!

#include <stdio.h>
#include <string.h>
int main(int argc, char **argv, **envp)
{
	int i;
	for (i = 0; env[i]; i++) {
		if (strncmp(env[i], "HOME=", 5) == 0)
			printf("home is %s\n", env[i] + 5);
	}
	return 0;
}


-- Steve



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

  Powered by Linux