Commit graph

61 commits

Author SHA1 Message Date
Andrew Gaul
ca52e9cefd Call nanosleep instead of sleep in polling loop
This avoids unnecessary rt_sigprocmask and rt_sigaction system calls.
2018-08-21 03:39:22 +05:30
Andrew Gaul
e8850f682c Plug little leak from reused variable 2018-08-21 03:36:14 +05:30
Daniel Graziotin
8130daa976 Merge branch 'strings' of git://github.com/gaul/mbpfan into gaul-strings 2017-10-04 08:31:12 +00:00
Andrew Gaul
650471a273 Clean up string creation via smprintf and strdup
This fixes some bugs when using the incorrect strlen in strncat.
2017-08-16 18:27:57 -07:00
Andrew Gaul
e95e19a3ea Avoid freeing static strings 2017-07-20 03:50:53 -07:00
Daniel Graziotin
b2cd98448f Merge branch 'reopen-fan' of git://github.com/andrewgaul/mbpfan into andrewgaul-reopen-fan 2017-07-20 12:06:28 +02:00
Daniel Graziotin
f3afd55720 Merge pull request #124 from andrewgaul/kernel-version
Correct kernel version message to >= 3.15.0
2017-07-20 09:29:33 +00:00
Andrew Gaul
399aad782a Do not repeatedly reopen fan and sensor devices
This avoids unnecessary system calls and saves battery.
2017-07-14 21:56:05 -07:00
Andrew Gaul
9034e1f843 Rewrite confusing conditional 2017-07-13 17:23:35 -07:00
Andrew Gaul
12a6bb0daa Correct kernel version message to >= 3.15.0
This agrees with the other message which emits < 3.15.0.
2017-07-12 19:18:13 -07:00
Daniel Graziotin
4730988419 [fix #118] protect macro definitions 2017-06-21 11:26:32 +02:00
Daniel Graziotin
1ee0e1f1fa [fix #92] support for CentOS w/ Linux 3.10.0 but new sensors path 2017-04-02 16:59:50 +00:00
Daniel Graziotin
592895dc61 [Fix #105] fixed memory leak in retrieve_sensors() 2017-04-02 16:50:20 +00:00
Daniel Graziotin
565c5454c3 [Fix #104] support for clang, makefile cleaned from 'rmusial-master' 2017-04-02 16:32:09 +00:00
Daniel Graziotin
c3e1c9c2b7 Reverted to old legacy kernel detection [#92 needs investigation] 2017-04-02 16:31:39 +00:00
Robert Musial
e7dd42e125 changes to legacy kernel detection 2017-03-27 11:44:34 -04:00
Robert Musial
28ca34edb2 Update mbpfan.c 2017-03-26 01:52:09 -04:00
Robert Musial
2f5c736b69 Update mbpfan.c 2017-03-24 18:03:03 -04:00
Robert Musial
75002c0702 Update mbpfan.c 2017-03-22 00:33:58 -04:00
Robert Musial
a7d3eb265d Update mbpfan.c 2017-03-20 14:16:50 -04:00
Robert Musial
a99aaad680 Changes to be committed:
modified:   AUTHORS
Updated personal info.

	modified:   Makefile
Beginning work to clean up Makefile. The original makefile appeared
to be checking if the system was Windows NT. Since this is for GNU/
Linux, that was removed. Also all of the code is C, but the
Makefile was calling the C++ compiler to hide bool issues and
missing typedefs (which C++ is ok with but C is not).

	modified:   src/daemon.c
Added structs, added stdbool.h

	modified:   src/main.c
Added stdbool.h

	modified:   src/mbpfan.c
Added stdbool.h

	modified:   src/minunit.c
Added stdbool.h
2017-03-19 13:43:55 -04:00
Aaron Riekenberg
11ec211b89 Flush standard out before sleeping in verbose mode. 2016-12-28 16:00:32 -06:00
Daniel Graziotin
adccefb1f7 polished authorship status at beginning of files 2016-08-29 10:29:11 +02:00
Andrew Scott
2446a120ee Use only 1 extra character for counter 2016-03-17 12:03:02 +00:00
Andrew Scott
150fcad084 Fix buffer overflow in sprintf 2016-03-14 01:07:20 +00:00
Thomas Burette
976aa809ab Fix execution right mistakenly set on source file 2015-06-18 17:06:32 +02:00
Nicholas Lydeen
e31b272d27 Altered kernel version check to allow 4.x.x kernels 2015-03-27 21:38:48 -05:00
Daniel Graziotin
5e55ebfb99 Initial polling of 2 seconds to gather sufficient delta_temp and set the fans high in case 2014-07-27 17:44:00 +00:00
Daniel Graziotin
43acd4665f Merge branch 'master' of git://github.com/ahyangyi/Fan-Control-Daemon into ahyangyi-master 2014-07-27 17:18:32 +00:00
otilmans@gmail.com
8bb61f8633 Add function to give back fan control to applesmc 2014-07-21 23:44:13 +02:00
otilmans@gmail.com
44d2ad7b82 Expose fans and sensors globally 2014-07-21 23:43:39 +02:00
otilmans@gmail.com
f5f61ccf69 Fix unused variable 2014-07-21 23:43:02 +02:00
otilmans@gmail.com
fff4b50bb2 Remove redundant typedef's 2014-07-21 23:42:37 +02:00
Yi Yang @ Minthe
bb264080a5 Fix makefile: no redundant sudo; Fix mbpfan.c: no more sudden silence when starting. 2014-07-06 23:59:06 -07:00
Daniel Graziotin
42be2d5c76 Correct syslog use for priority codes [fixes #44] 2014-06-29 12:58:53 +02:00
Daniel Graziotin
b037ec210f Handle corner-case where no sensors and fans are detected [fixes #42] 2014-06-29 12:52:55 +02:00
Daniel Graziotin
473a12fd29 correct use of EXIT_SUCCESS and EXIT_FAILURE, fixes #43 2014-06-29 12:42:52 +02:00
Daniel Graziotin
a034b3f03b Fixes #28 2014-06-23 10:24:03 +02:00
Daniel Graziotin
8b63848531 Fixes #33 2014-06-22 18:35:14 +02:00
Daniel Graziotin
033c8b9de5 really fixed conflicts... 2014-06-22 17:14:52 +02:00
Daniel Graziotin
2b1606025e Fixed conflict 2014-06-22 17:13:10 +02:00
Daniel Graziotin
0526fc5ff9 Fixes #38 2014-06-22 17:07:24 +02:00
Daniel Graziotin
d14c7107e8 Almost done with #38. 2014-06-22 16:48:44 +02:00
Daniel Graziotin
6bfe9325c3 Support for kernel >= 3.15 2014-06-21 19:35:56 +02:00
Daniel Graziotin
a2dacfde05 Fixes #4. Adds some tests for #28 2012-11-18 22:16:49 +01:00
Daniel Graziotin
33a3710995 Fixes #27 2012-11-12 11:48:05 +01:00
Daniel Graziotin
3ff1aad95f Taking into account the number of sensors in averaging temp #24 2012-10-24 14:18:11 +02:00
Daniel Graziotin
45755d6228 First attempt to fix #24 2012-10-24 11:13:25 +02:00
Daniel Graziotin
1f8131bd9d Fixes #18. Seems ready for v1.4.0 2012-08-23 22:32:49 +02:00
Daniel Graziotin
37847f39d4 Fixes #15 2012-08-22 16:02:03 +02:00