powertop: fix --auto-tune

See https://lists.01.org/pipermail/powertop/2014-December/001727.html
This commit is contained in:
Charles Strahan 2015-10-15 14:25:43 -04:00
parent 194357ad20
commit b1edc7909a
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,11 @@
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
index d2e56e3..4de5c9b 100644
--- a/src/devices/devfreq.cpp
+++ b/src/devices/devfreq.cpp
@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void)
fprintf(stderr, "Devfreq not enabled\n");
is_enabled = false;
closedir(dir);
+ dir = NULL;
return;
}

View File

@ -10,7 +10,11 @@ stdenv.mkDerivation rec {
buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ];
patchPhase = ''
# Fix --auto-tune bug:
# https://lists.01.org/pipermail/powertop/2014-December/001727.html
patches = [ ./auto-tune.patch ];
postPatch = ''
substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
'';