On Wednesday 17 October 2007 13:44:30 Mathieu Rochette wrote:
>Hello,
>
>I updated my kernel recently, and the battery e_modules wasn't working
>anymore.
>I find that in the kernel menuconfig:
>(option Deprecated /proc/acpi files)
>
I didn't have time to take a better look at the code, but it seems that is
quite easy to modify the module to support the new interface:
Looking at battery source code:
===
if (battery_config->battery_check_mode == 0)
{
if (ecore_file_is_dir("/proc/acpi"))
battery_config->battery_check_mode = CHECK_ACPI;
else if (ecore_file_exists("/proc/apm"))
battery_config->battery_check_mode = CHECK_APM;
else if (ecore_file_is_dir("/proc/pmu"))
battery_config->battery_check_mode = CHECK_PMU;
}
switch (battery_config->battery_check_mode)
{
case CHECK_ACPI:
ret = _battery_linux_acpi_check();
break;
case CHECK_APM:
ret = _battery_linux_apm_check();
break;
case CHECK_PMU:
ret = _battery_linux_powerbook_check();
break;
default:
break;
}
===
Probably you'll need to check if the /sys stuff is there and create a function
to return a Status structure (please someone correct me if I'm wrong).
--
Ricardo Salveti
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users