{
}
-void update_uptime(void)
+int update_uptime(void)
{
int mib[2] = { CTL_KERN, KERN_BOOTTIME };
struct timeval boottime;
fprintf(stderr, "Could not get uptime\n");
info.uptime = 0;
}
+
+ return 0;
}
int check_mount(char *s)
return 0;
}
-void update_meminfo(void)
+int update_meminfo(void)
{
u_int total_pages, inactive_pages, free_pages;
unsigned long swap_avail, swap_free;
info.swap = 0;
info.swapfree = 0;
}
+
+ return 0;
}
-void update_net_stats(void)
+int update_net_stats(void)
{
struct net_stat *ns;
double delta;
/* get delta */
delta = current_update_time - last_update_time;
if (delta <= 0.0001) {
- return;
+ return 0;
}
if (getifaddrs(&ifap) < 0) {
- return;
+ return 0;
}
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
}
freeifaddrs(ifap);
+ return 0;
}
-void update_total_processes(void)
+int update_total_processes(void)
{
int n_processes;
kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
info.procs = n_processes;
+ return 0;
}
-void update_running_processes(void)
+int update_running_processes(void)
{
struct kinfo_proc *p;
int n_processes;
}
info.run_procs = cnt;
+ return 0;
}
void get_cpu_count(void)
long oldused;
};
-void update_cpu_usage(void)
+int update_cpu_usage(void)
{
int i, j = 0;
long used, total;
}
free(cp_time);
+ return 0;
}
-void update_load_average(void)
+int update_load_average(void)
{
double v[3];
info.loadavg[0] = (double) v[0];
info.loadavg[1] = (double) v[1];
info.loadavg[2] = (double) v[2];
+
+ return 0;
}
double get_acpi_temperature(int fd)
return 1;
}
-void update_top(void)
+int update_top(void)
{
proc_find_top(info.cpu, info.memu);
+ return 0;
}
#if 0
}
#endif
-void update_diskio(void)
+int update_diskio(void)
{
int devs_count, num_selected, num_selections, dn;
struct device_selection *dev_select = NULL;
if (devstat_getdevs(NULL, &statinfo_cur) < 0) {
free(statinfo_cur.dinfo);
- return;
+ return 0;
}
devs_count = statinfo_cur.dinfo->numdevs;
}
free(statinfo_cur.dinfo);
+ return 0;
}
/* While topless is obviously better, top is also not bad. */
(void)val;
return 1;
}
-
-/* empty stub so conky links */
-void free_all_processes(void)
-{
-}