I have the following patch to make temperature module work
on freebsd:
------------------------------------------------------------
--- e_mod_main.c.orig Wed Jun 15 01:21:38 2005
+++ e_mod_main.c Wed Jun 15 01:19:44 2005
@@ -4,6 +4,11 @@
#include "e.h"
#include "e_mod_main.h"
+#if defined(__FreeBSD__)
+# include <sys/types.h>
+# include <sys/sysctl.h>
+#endif
+
/* TODO List:
*
* which options should be in main menu, and which in face menu?
@@ -780,8 +785,13 @@
Evas_List *l;
int temp = 0;
char buf[4096];
+#if defined(__FreeBSD__)
+ static int mib[5] = {-1};
+ int len;
+#endif
ef = data;
+#if defined(linux)
therms = ecore_file_ls("/proc/acpi/thermal_zone");
if (!therms || ecore_list_is_empty(therms))
{
@@ -852,6 +862,20 @@
}
}
if (therms) ecore_list_destroy(therms);
+#elif defined(__FreeBSD__)
+ if (mib[0] == -1) {
+ len = 5;
+ sysctlnametomib("hw.acpi.thermal.tz0.temperature", mib, &len);
+ }
+
+ if (mib[0] != -1) {
+ len = sizeof(temp);
+ if (sysctl(mib, 5, &temp, &len, NULL, 0) != -1) {
+ temp = (temp - 2732) / 10;
+ ret = 1;
+ }
+ }
+#endif
if (ret)
{
if (ef->have_temp != 1)
------------------------------------------------------------
I don't know is it correct place to submit code, but I haven't
find anything else.
Thank you!
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel