Merge pull request #983 from fewtarius/dev
Patch powertop to use /storage/.cache.
This commit is contained in:
commit
8f19ca45aa
1 changed files with 30 additions and 0 deletions
30
packages/sysutils/powertop/patches/002-cache.patch
Normal file
30
packages/sysutils/powertop/patches/002-cache.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 45aaa58..4607aa2 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -389,8 +389,8 @@ static void powertop_init(int auto_tune)
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
- if (access("/var/cache/", W_OK) == 0)
|
||||
- mkdir("/var/cache/powertop", 0600);
|
||||
+ if (access("/storage/.cache/", W_OK) == 0)
|
||||
+ mkdir("/storage/.cache/powertop", 0600);
|
||||
else
|
||||
mkdir("/data/local/powertop", 0600);
|
||||
|
||||
diff --git a/src/parameters/parameters.cpp b/src/parameters/parameters.cpp
|
||||
index 38e1752..c2529ec 100644
|
||||
--- a/src/parameters/parameters.cpp
|
||||
+++ b/src/parameters/parameters.cpp
|
||||
@@ -453,8 +453,8 @@ char* get_param_directory(const char *filename)
|
||||
{
|
||||
static char tempfilename[PATH_MAX];
|
||||
|
||||
- if (access("/var/cache/powertop", W_OK ) == 0)
|
||||
- snprintf(tempfilename, sizeof(tempfilename), "/var/cache/powertop/%s", filename);
|
||||
+ if (access("/storage/.cache/powertop", W_OK ) == 0)
|
||||
+ snprintf(tempfilename, sizeof(tempfilename), "/storage/.cache/powertop/%s", filename);
|
||||
if (access("/data/local/powertop", W_OK ) == 0)
|
||||
snprintf(tempfilename, sizeof(tempfilename), "/data/local/powertop/%s", filename);
|
||||
|
Loading…
Reference in a new issue