summaryrefslogtreecommitdiff
path: root/community/powertop
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-05-28 17:20:00 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-05-28 17:20:00 -0300
commit6575af67294a57126aa9408ee255db0e7be47bcd (patch)
tree0ebeb47514aec8981445ad7404d961ade8a41dc7 /community/powertop
parent15715eb69d409c77752f91aa6d8080ecc0262af6 (diff)
parentedec45419def1b81bd663a2859684ef55ba56269 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-testing/collectd/PKGBUILD community-testing/collectd/install community-testing/collectd/libperl.patch community-testing/collectd/rc.d community-testing/collectd/rtnl_dump_filter.patch community-testing/freeradius/PKGBUILD community-testing/freeradius/freeradius.install community-testing/freeradius/krb5-build-fix.patch community-testing/freeradius/radiusd community-testing/inn/PKGBUILD community-testing/inn/inn.install community-testing/inn/innd.conf community-testing/inn/innd.rc community-testing/inn/nnrpd.conf community-testing/inn/nnrpd.rc community-testing/inn/site.make.patch community-testing/libvirt/PKGBUILD community-testing/linux-tools/PKGBUILD community-testing/linux-tools/cpupower.conf community-testing/linux-tools/cpupower.rc community-testing/linux-tools/cpupower.service community-testing/perl-berkeleydb/PKGBUILD community-testing/perl-class-methodmaker/PKGBUILD community-testing/perl-clone/PKGBUILD community-testing/perl-crypt-blowfish/PKGBUILD community-testing/perl-crypt-des/PKGBUILD community-testing/perl-curses/PKGBUILD community-testing/perl-data-structure-util/PKGBUILD community-testing/perl-datetime/PKGBUILD community-testing/perl-device-serialport/PKGBUILD community-testing/perl-file-rsyncp/PKGBUILD community-testing/perl-fuse/PKGBUILD community-testing/perl-gd/PKGBUILD community-testing/perl-gssapi/PKGBUILD community-testing/perl-html-strip/PKGBUILD community-testing/perl-inline-java/PKGBUILD community-testing/perl-io-dirent/PKGBUILD community-testing/perl-io-tty/PKGBUILD community-testing/perl-json-xs/PKGBUILD community-testing/perl-libapreq2/PKGBUILD community-testing/perl-mail-box-parser-c/PKGBUILD community-testing/perl-mail-transport-dbx/PKGBUILD community-testing/perl-net-dbus/PKGBUILD community-testing/perl-net-libidn/PKGBUILD community-testing/perl-params-classify/PKGBUILD community-testing/perl-params-validate/PKGBUILD community-testing/perl-string-crc32/PKGBUILD community-testing/perl-text-charwidth/PKGBUILD community-testing/perl-text-kakasi/ChangeLog community-testing/perl-text-kakasi/PKGBUILD community-testing/perl-tie-hash-indexed/PKGBUILD community-testing/perl-www-curl/PKGBUILD community-testing/perl-xmms/PKGBUILD community-testing/pork/PKGBUILD community-testing/rxvt-unicode/PKGBUILD community-testing/rxvt-unicode/urxvt-tabbed.desktop community-testing/rxvt-unicode/urxvt.desktop community-testing/rxvt-unicode/urxvtc.desktop community-testing/znc/PKGBUILD community/blackbox/PKGBUILD community/ccrtp/PKGBUILD community/gambas2/poppler-0.20.patch community/gambas3/poppler-0-20.patch community/libunistring/PKGBUILD community/libzrtpcpp/PKGBUILD community/mplayer2/PKGBUILD community/pdf2djvu/poppler-0.20.patch community/sword/PKGBUILD community/xiphos/PKGBUILD core/procps/PKGBUILD extra/dvdrip/PKGBUILD extra/gstreamer0.10-good/PKGBUILD extra/inkscape/poppler20.patch extra/iperf/PKGBUILD extra/libreoffice/PKGBUILD extra/libreoffice/fix_broken_hebrew_wordwrapping.diff extra/libreoffice/libreoffice-base.install extra/libreoffice/libreoffice-calc.install extra/libreoffice/libreoffice-common.install extra/libreoffice/libreoffice-draw.install extra/libreoffice/libreoffice-impress.install extra/libreoffice/libreoffice-writer.install extra/mail-notification/PKGBUILD extra/nxserver/PKGBUILD extra/php-suhosin/PKGBUILD extra/poppler/PKGBUILD extra/streamtuner/PKGBUILD extra/systemd/PKGBUILD extra/tunepimp/PKGBUILD mozilla-testing/iceweasel-libre/iceweasel.install multilib/wine/PKGBUILD staging/gimp-devel/gimp-devel.install testing/consolekit/PKGBUILD testing/cryptsetup/PKGBUILD testing/cryptsetup/encrypt_hook testing/cryptsetup/encrypt_install testing/dmraid/PKGBUILD testing/dmraid/dmraid_install testing/graphviz/PKGBUILD testing/imagemagick/PKGBUILD testing/imagemagick/perlmagick.rpath.patch testing/irssi/PKGBUILD testing/kdebindings-perlkde/PKGBUILD testing/kdebindings-perlqt/PKGBUILD testing/lvm2/PKGBUILD testing/lvm2/lvm2_hook testing/lvm2/lvm2_install testing/mdadm/PKGBUILD testing/mdadm/mdadm_install testing/mdadm/mdadm_udev_install testing/mkinitcpio-nfs-utils/PKGBUILD testing/net-snmp/snmpd.rc testing/perl-bit-vector/PKGBUILD testing/perl-compress-bzip2/PKGBUILD testing/perl-crypt-openssl-bignum/PKGBUILD testing/perl-crypt-openssl-random/PKGBUILD testing/perl-crypt-openssl-rsa/PKGBUILD testing/perl-crypt-ssleay/PKGBUILD testing/perl-dbd-mysql/PKGBUILD testing/perl-dbi/PKGBUILD testing/perl-fcgi/PKGBUILD testing/perl-locale-gettext/PKGBUILD testing/perl-locale-gettext/compatibility-with-POSIX-module.patch testing/perl-net-ssleay/PKGBUILD testing/perl-time-hires/PKGBUILD testing/perl/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch testing/perl/ChangeLog testing/perl/PKGBUILD testing/perl/digest_eval_hole.diff testing/perl/fix-h2ph-and-tests.patch testing/perl/perl.install testing/perl/perlbin.csh testing/perl/perlbin.sh testing/perl/provides.pl testing/php/PKGBUILD testing/php/logrotate.d.php-fpm testing/php/rc.d.php-fpm testing/pidgin/pidgin.install testing/pinentry/pinentry.install testing/postgresql/postgresql.pam testing/slim/logrotate testing/subversion/PKGBUILD testing/vim/PKGBUILD testing/vim/archlinux.vim testing/vim/gvim.desktop testing/vim/gvim.install testing/vim/vimrc testing/weechat/PKGBUILD testing/xf86-video-ati/PKGBUILD testing/xf86-video-intel/PKGBUILD testing/xf86-video-nouveau/PKGBUILD testing/xorg-server/PKGBUILD
Diffstat (limited to 'community/powertop')
-rw-r--r--community/powertop/powertop-1.13-with-3.0.6.patch142
1 files changed, 0 insertions, 142 deletions
diff --git a/community/powertop/powertop-1.13-with-3.0.6.patch b/community/powertop/powertop-1.13-with-3.0.6.patch
deleted file mode 100644
index fc61913a8..000000000
--- a/community/powertop/powertop-1.13-with-3.0.6.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-Common subdirectories: powertop-1.13/kernel-patches and powertop-patched/kernel-patches
-Common subdirectories: powertop-1.13/po and powertop-patched/po
-diff -u powertop-1.13/powertop.c powertop-patched/powertop.c
---- powertop-1.13/powertop.c 2010-07-20 01:08:21.000000000 +0200
-+++ powertop-patched/powertop.c 2011-10-20 14:34:41.163951192 +0200
-@@ -547,95 +547,6 @@
- qsort (lines, linehead, sizeof (struct line), line_compare);
- }
-
--
--
--int print_battery_proc_acpi(void)
--{
-- DIR *dir;
-- struct dirent *dirent;
-- FILE *file;
-- double rate = 0;
-- double cap = 0;
--
-- char filename[256];
--
-- dir = opendir("/proc/acpi/battery");
-- if (!dir)
-- return 0;
--
-- while ((dirent = readdir(dir))) {
-- int dontcount = 0;
-- double voltage = 0.0;
-- double amperes_drawn = 0.0;
-- double watts_drawn = 0.0;
-- double amperes_left = 0.0;
-- double watts_left = 0.0;
-- char line[1024];
--
-- if (strlen(dirent->d_name) < 3)
-- continue;
--
-- sprintf(filename, "/proc/acpi/battery/%s/state", dirent->d_name);
-- file = fopen(filename, "r");
-- if (!file)
-- continue;
-- memset(line, 0, 1024);
-- while (fgets(line, 1024, file) != NULL) {
-- char *c;
-- if (strstr(line, "present:") && strstr(line, "no"))
-- break;
--
-- if (strstr(line, "charging state:")
-- && !strstr(line, "discharging"))
-- dontcount = 1;
-- c = strchr(line, ':');
-- if (!c)
-- continue;
-- c++;
--
-- if (strstr(line, "present voltage"))
-- voltage = strtoull(c, NULL, 10) / 1000.0;
--
-- if (strstr(line, "remaining capacity") && strstr(c, "mW"))
-- watts_left = strtoull(c, NULL, 10) / 1000.0;
--
-- if (strstr(line, "remaining capacity") && strstr(c, "mAh"))
-- amperes_left = strtoull(c, NULL, 10) / 1000.0;
--
-- if (strstr(line, "present rate") && strstr(c, "mW"))
-- watts_drawn = strtoull(c, NULL, 10) / 1000.0 ;
--
-- if (strstr(line, "present rate") && strstr(c, "mA"))
-- amperes_drawn = strtoull(c, NULL, 10) / 1000.0;
--
-- }
-- fclose(file);
--
-- if (!dontcount) {
-- rate += watts_drawn + voltage * amperes_drawn;
-- }
-- cap += watts_left + voltage * amperes_left;
--
--
-- }
-- closedir(dir);
-- if (prev_bat_cap - cap < 0.001 && rate < 0.001)
-- last_bat_time = 0;
-- if (!last_bat_time) {
-- last_bat_time = prev_bat_time = time(NULL);
-- last_bat_cap = prev_bat_cap = cap;
-- }
-- if (time(NULL) - last_bat_time >= 400) {
-- prev_bat_cap = last_bat_cap;
-- prev_bat_time = last_bat_time;
-- last_bat_time = time(NULL);
-- last_bat_cap = cap;
-- }
--
-- show_acpi_power_line(rate, cap, prev_bat_cap - cap, time(NULL) - prev_bat_time);
-- return 1;
--}
--
- int print_battery_proc_pmu(void)
- {
- char line[80];
-@@ -719,9 +630,6 @@
-
- char filename[256];
-
-- if (print_battery_proc_acpi())
-- return;
--
- if (print_battery_proc_pmu())
- return;
-
-@@ -733,7 +641,6 @@
- while ((dirent = readdir(dir))) {
- int dontcount = 0;
- double voltage = 0.0;
-- double amperes_drawn = 0.0;
- double watts_drawn = 0.0;
- double watts_left = 0.0;
- char line[1024];
-@@ -790,8 +697,12 @@
- watts_left *= strtoull(line, NULL, 10) / 1000000.0;
- fclose(file);
-
-- sprintf(filename, "/sys/class/power_supply/%s/current_now", dirent->d_name);
-+ sprintf(filename, "/sys/class/power_supply/%s/power_now", dirent->d_name);
- file = fopen(filename, "r");
-+ if (!file) {
-+ sprintf(filename, "/sys/class/power_supply/%s/current_now", dirent->d_name);
-+ file = fopen(filename, "r");
-+ }
- if (!file)
- continue;
- memset(line, 0, 1024);
-@@ -801,7 +712,7 @@
- fclose(file);
-
- if (!dontcount) {
-- rate += watts_drawn + voltage * amperes_drawn;
-+ rate += watts_drawn;
- }
- cap += watts_left;
-