X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhddtemp.c;h=b1ba81ec8b76d7d392b7600c574983eeeb5e6ab5;hb=13188c8b110a8cc94f43bc6c5a37b073e3b78430;hp=5f7edec832ecdfcdf3363b5d56bace12bd1a21c1;hpb=36ebcf347de0faf57841585118f82ef95e5f1e82;p=monky diff --git a/src/hddtemp.c b/src/hddtemp.c index 5f7edec..b1ba81e 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -206,29 +206,30 @@ out_fail: return 1; } -void update_hddtemp(void) { +int update_hddtemp(void) { char *data, *dev, unit, *saveptr; short val; static double last_hddtemp_update = 0.0; /* limit tcp connection overhead */ if (current_update_time - last_hddtemp_update < 5) - return; + return 0; last_hddtemp_update = current_update_time; free_hddtemp_info(); if (!(data = fetch_hddtemp_output())) - return; + return 0; if (read_hdd_val(data, &dev, &val, &unit, &saveptr)) { free(data); - return; + return 0; } do { add_hddtemp_info(dev, val, unit); } while (!read_hdd_val(NULL, &dev, &val, &unit, &saveptr)); free(data); + return 0; } void free_hddtemp(void)