Skip to content

Instantly share code, notes, and snippets.

--- src/cpufreqd_governor_parameters.c
+++ src/cpufreqd_governor_parameters.c
@@ -61,7 +61,8 @@
struct sysfs_device *govdev = NULL;
/* Construct sysfs path string for governor device of this cpu */
- snprintf(govdev_path, SYSFS_PATH_MAX, "%s/cpu%u/cpufreq/%s", syspath_cpu, cpu, governor);
+ //snprintf(govdev_path, SYSFS_PATH_MAX, "%s/cpu%u/cpufreq/%s", syspath_cpu, cpu, governor);
+ snprintf(govdev_path, SYSFS_PATH_MAX, "%s/cpufreq/%s", syspath_cpu, governor);
clog(LOG_DEBUG, "sysfs path governor device = %s\n", govdev_path);
@kekh
kekh / cpupower.patch
Created October 23, 2016 15:54
CPUfreqd w/ CPUpower compatibility
--- configure.in 2010-04-18 17:57:30.000000000 +0400
+++ configure.in 2013-01-04 14:37:44.687427237 +0400
@@ -4,7 +4,7 @@
AM_INIT_AUTOMAKE(1.8 dist-bzip2 foreign)
AC_CONFIG_SRCDIR([config.h.in])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
# libtool
@kekh
kekh / file-roller2-nn-tmp.patch
Created May 23, 2016 20:57
An additional patch for file-roller GTK2 to put temporary files in /tmp instead of ~/.cache (and thus to reduce the amount of writes to SSDs). Backported from https://aur.archlinux.org/packages/file-roller-tmp/.
--- a/src/file-utils.c
+++ b/src/file-utils.c
@@ -886,26 +886,6 @@
}
-static const char *try_folder[] = { "cache", "~", "tmp", NULL };
-
-
-static char *
@kekh
kekh / sendmail-whois-lines.local
Last active November 25, 2015 01:06
KISS Fail2Ban send mail action with temporisation. This allows to not beiing spammed on each bans after system (re)boot or Fail2Ban service (re)start... Rely on "gracetime" script in https://github.com/kekh/Fail2Ban-Tweaks.
[Definition]
actionstart =
actionstop =
actionban = GRACE_CMD="/usr/bin/gracetime all 10"
if [ "$(${GRACE_CMD})" = "NO" ]
then
printf %%b "Hi,\n