/* CURRENT: we prefer the average if it exists, although present is still pretty good */
if (!hal_util_get_int_from_file (path, "current_avg", ¤t, 10)) {
should be:
/* CURRENT: we prefer the average if it exists, although present is still pretty good */
if (hal_util_get_int_from_file (path, "current_avg", ¤t, 10)) {
(i.e., negate the condition otherwise rate is not ever updated.)
there is a typo in hal-0.5. 10/hald/ linux/device. c
line 3181:
/* CURRENT: we prefer the average if it exists, although present is still pretty good */ get_int_ from_file (path, "current_avg", ¤t, 10)) {
if (!hal_util_
should be:
/* CURRENT: we prefer the average if it exists, although present is still pretty good */ get_int_ from_file (path, "current_avg", ¤t, 10)) {
if (hal_util_
(i.e., negate the condition otherwise rate is not ever updated.)