summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1999-10-24 19:09:32 +0000
committerMartin Baulig <martin@src.gnome.org>1999-10-24 19:09:32 +0000
commita5dd7e90637581d2e7dbfe6cc479d419971eff5c (patch)
tree9320e8bca16886c8bdbda21ef19a960765baae8b
parenteae892c9b117e274b64426de837ae9e30e6cf383 (diff)
downloadlibgtop-a5dd7e90637581d2e7dbfe6cc479d419971eff5c.tar.gz
This is a very big an possibly breaking commit.
It changes the return values of all sysdeps functions which were previosly returning void to int. This is the first step to implement better error handling in LibGTop. Martin 1999-10-24 Martin Baulig <martin@home-of-linux.org> * include/glibtop/*.h (glibtop_get_*, glibtop_init*): Changed the return value of all `glibtop_get_<feature>_* ()' and all `glibtop_init_<feature>_* ()' functions from void to int. * features.def: Reflect changes of the return values. * sysdeps/*/*.c: Reflect changes of the return values.
-rw-r--r--ChangeLog9
-rw-r--r--features.def36
-rw-r--r--include/glibtop/cpu.h10
-rw-r--r--include/glibtop/fsusage.h4
-rw-r--r--include/glibtop/loadavg.h10
-rw-r--r--include/glibtop/mem.h10
-rw-r--r--include/glibtop/msg_limits.h10
-rw-r--r--include/glibtop/netload.h10
-rw-r--r--include/glibtop/ppp.h10
-rw-r--r--include/glibtop/procargs.h4
-rw-r--r--include/glibtop/prockernel.h10
-rw-r--r--include/glibtop/proclist.h4
-rw-r--r--include/glibtop/procmap.h4
-rw-r--r--include/glibtop/procmem.h10
-rw-r--r--include/glibtop/procsegment.h10
-rw-r--r--include/glibtop/procsignal.h10
-rw-r--r--include/glibtop/procstate.h10
-rw-r--r--include/glibtop/proctime.h10
-rw-r--r--include/glibtop/procuid.h10
-rw-r--r--include/glibtop/sem_limits.h10
-rw-r--r--include/glibtop/shm_limits.h10
-rw-r--r--include/glibtop/swap.h10
-rw-r--r--include/glibtop/uptime.h10
-rw-r--r--sysdeps/common/fsusage.c2
-rw-r--r--sysdeps/freebsd/cpu.c4
-rw-r--r--sysdeps/freebsd/loadavg.c4
-rw-r--r--sysdeps/freebsd/mem.c4
-rw-r--r--sysdeps/freebsd/msg_limits.c8
-rw-r--r--sysdeps/freebsd/netload.c4
-rw-r--r--sysdeps/freebsd/ppp.c4
-rw-r--r--sysdeps/freebsd/procargs.c2
-rw-r--r--sysdeps/freebsd/prockernel.c4
-rw-r--r--sysdeps/freebsd/proclist.c2
-rw-r--r--sysdeps/freebsd/procmap.c2
-rw-r--r--sysdeps/freebsd/procmem.c4
-rw-r--r--sysdeps/freebsd/procsegment.c4
-rw-r--r--sysdeps/freebsd/procsignal.c4
-rw-r--r--sysdeps/freebsd/procstate.c4
-rw-r--r--sysdeps/freebsd/proctime.c4
-rw-r--r--sysdeps/freebsd/procuid.c4
-rw-r--r--sysdeps/freebsd/sem_limits.c8
-rw-r--r--sysdeps/freebsd/shm_limits.c8
-rw-r--r--sysdeps/freebsd/swap.c4
-rw-r--r--sysdeps/freebsd/uptime.c4
-rw-r--r--sysdeps/kernel/cpu.c4
-rw-r--r--sysdeps/kernel/loadavg.c4
-rw-r--r--sysdeps/kernel/mem.c4
-rw-r--r--sysdeps/kernel/msg_limits.c4
-rw-r--r--sysdeps/kernel/netload.c4
-rw-r--r--sysdeps/kernel/ppp.c4
-rw-r--r--sysdeps/kernel/procargs.c2
-rw-r--r--sysdeps/kernel/prockernel.c4
-rw-r--r--sysdeps/kernel/proclist.c2
-rw-r--r--sysdeps/kernel/procmap.c2
-rw-r--r--sysdeps/kernel/procmem.c4
-rw-r--r--sysdeps/kernel/procsegment.c4
-rw-r--r--sysdeps/kernel/procsignal.c4
-rw-r--r--sysdeps/kernel/procstate.c4
-rw-r--r--sysdeps/kernel/proctime.c4
-rw-r--r--sysdeps/kernel/procuid.c4
-rw-r--r--sysdeps/kernel/sem_limits.c4
-rw-r--r--sysdeps/kernel/shm_limits.c4
-rw-r--r--sysdeps/kernel/swap.c4
-rw-r--r--sysdeps/kernel/uptime.c4
-rw-r--r--sysdeps/linux/cpu.c4
-rw-r--r--sysdeps/linux/loadavg.c4
-rw-r--r--sysdeps/linux/mem.c4
-rw-r--r--sysdeps/linux/msg_limits.c4
-rw-r--r--sysdeps/linux/netload.c4
-rw-r--r--sysdeps/linux/ppp.c4
-rw-r--r--sysdeps/linux/procargs.c2
-rw-r--r--sysdeps/linux/prockernel.c4
-rw-r--r--sysdeps/linux/proclist.c2
-rw-r--r--sysdeps/linux/procmap.c2
-rw-r--r--sysdeps/linux/procmem.c4
-rw-r--r--sysdeps/linux/procsegment.c4
-rw-r--r--sysdeps/linux/procsignal.c4
-rw-r--r--sysdeps/linux/procstate.c4
-rw-r--r--sysdeps/linux/proctime.c4
-rw-r--r--sysdeps/linux/procuid.c4
-rw-r--r--sysdeps/linux/sem_limits.c4
-rw-r--r--sysdeps/linux/shm_limits.c4
-rw-r--r--sysdeps/linux/swap.c4
-rw-r--r--sysdeps/linux/uptime.c4
-rw-r--r--sysdeps/osf1/cpu.c4
-rw-r--r--sysdeps/osf1/loadavg.c4
-rw-r--r--sysdeps/osf1/mem.c4
-rw-r--r--sysdeps/osf1/msg_limits.c4
-rw-r--r--sysdeps/osf1/netload.c4
-rw-r--r--sysdeps/osf1/ppp.c4
-rw-r--r--sysdeps/osf1/procargs.c2
-rw-r--r--sysdeps/osf1/prockernel.c4
-rw-r--r--sysdeps/osf1/proclist.c2
-rw-r--r--sysdeps/osf1/procmap.c2
-rw-r--r--sysdeps/osf1/procmem.c4
-rw-r--r--sysdeps/osf1/procsegment.c4
-rw-r--r--sysdeps/osf1/procsignal.c4
-rw-r--r--sysdeps/osf1/procstate.c4
-rw-r--r--sysdeps/osf1/proctime.c4
-rw-r--r--sysdeps/osf1/procuid.c4
-rw-r--r--sysdeps/osf1/sem_limits.c4
-rw-r--r--sysdeps/osf1/shm_limits.c4
-rw-r--r--sysdeps/osf1/swap.c4
-rw-r--r--sysdeps/osf1/uptime.c4
-rw-r--r--sysdeps/solaris/cpu.c4
-rw-r--r--sysdeps/solaris/loadavg.c4
-rw-r--r--sysdeps/solaris/mem.c4
-rw-r--r--sysdeps/solaris/msg_limits.c4
-rw-r--r--sysdeps/solaris/netload.c4
-rw-r--r--sysdeps/solaris/ppp.c4
-rw-r--r--sysdeps/solaris/procargs.c2
-rw-r--r--sysdeps/solaris/prockernel.c4
-rw-r--r--sysdeps/solaris/proclist.c2
-rw-r--r--sysdeps/solaris/procmap.c2
-rw-r--r--sysdeps/solaris/procmem.c4
-rw-r--r--sysdeps/solaris/procsegment.c4
-rw-r--r--sysdeps/solaris/procsignal.c4
-rw-r--r--sysdeps/solaris/procstate.c4
-rw-r--r--sysdeps/solaris/proctime.c4
-rw-r--r--sysdeps/solaris/procuid.c4
-rw-r--r--sysdeps/solaris/sem_limits.c4
-rw-r--r--sysdeps/solaris/shm_limits.c4
-rw-r--r--sysdeps/solaris/swap.c4
-rw-r--r--sysdeps/solaris/uptime.c4
-rw-r--r--sysdeps/stub/cpu.c4
-rw-r--r--sysdeps/stub/loadavg.c4
-rw-r--r--sysdeps/stub/mem.c4
-rw-r--r--sysdeps/stub/msg_limits.c4
-rw-r--r--sysdeps/stub/netload.c4
-rw-r--r--sysdeps/stub/ppp.c4
-rw-r--r--sysdeps/stub/procargs.c2
-rw-r--r--sysdeps/stub/prockernel.c4
-rw-r--r--sysdeps/stub/proclist.c2
-rw-r--r--sysdeps/stub/procmap.c2
-rw-r--r--sysdeps/stub/procmem.c4
-rw-r--r--sysdeps/stub/procsegment.c4
-rw-r--r--sysdeps/stub/procsignal.c4
-rw-r--r--sysdeps/stub/procstate.c4
-rw-r--r--sysdeps/stub/proctime.c4
-rw-r--r--sysdeps/stub/procuid.c4
-rw-r--r--sysdeps/stub/sem_limits.c4
-rw-r--r--sysdeps/stub/shm_limits.c4
-rw-r--r--sysdeps/stub/swap.c4
-rw-r--r--sysdeps/stub/uptime.c4
-rw-r--r--sysdeps/stub_suid/cpu.c4
-rw-r--r--sysdeps/stub_suid/loadavg.c4
-rw-r--r--sysdeps/stub_suid/mem.c4
-rw-r--r--sysdeps/stub_suid/msg_limits.c4
-rw-r--r--sysdeps/stub_suid/netload.c4
-rw-r--r--sysdeps/stub_suid/ppp.c4
-rw-r--r--sysdeps/stub_suid/procargs.c2
-rw-r--r--sysdeps/stub_suid/prockernel.c4
-rw-r--r--sysdeps/stub_suid/proclist.c2
-rw-r--r--sysdeps/stub_suid/procmap.c2
-rw-r--r--sysdeps/stub_suid/procmem.c4
-rw-r--r--sysdeps/stub_suid/procsegment.c4
-rw-r--r--sysdeps/stub_suid/procsignal.c4
-rw-r--r--sysdeps/stub_suid/procstate.c4
-rw-r--r--sysdeps/stub_suid/proctime.c4
-rw-r--r--sysdeps/stub_suid/procuid.c4
-rw-r--r--sysdeps/stub_suid/sem_limits.c4
-rw-r--r--sysdeps/stub_suid/shm_limits.c4
-rw-r--r--sysdeps/stub_suid/swap.c4
-rw-r--r--sysdeps/stub_suid/uptime.c4
-rw-r--r--sysdeps/sun4/cpu.c2
-rw-r--r--sysdeps/sun4/loadavg.c2
-rw-r--r--sysdeps/sun4/mem.c2
-rw-r--r--sysdeps/sun4/msg_limits.c2
-rw-r--r--sysdeps/sun4/ppp.c4
-rw-r--r--sysdeps/sun4/prockernel.c2
-rw-r--r--sysdeps/sun4/procmem.c2
-rw-r--r--sysdeps/sun4/procsegment.c2
-rw-r--r--sysdeps/sun4/procsignal.c2
-rw-r--r--sysdeps/sun4/procstate.c2
-rw-r--r--sysdeps/sun4/proctime.c2
-rw-r--r--sysdeps/sun4/procuid.c2
-rw-r--r--sysdeps/sun4/sem_limits.c2
-rw-r--r--sysdeps/sun4/shm_limits.c2
-rw-r--r--sysdeps/sun4/swap.c2
-rw-r--r--sysdeps/sun4/uptime.c2
180 files changed, 403 insertions, 394 deletions
diff --git a/ChangeLog b/ChangeLog
index 63ffb527..d0f13b9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
1999-10-24 Martin Baulig <martin@home-of-linux.org>
+ * include/glibtop/*.h (glibtop_get_*, glibtop_init*): Changed
+ the return value of all `glibtop_get_<feature>_* ()' and all
+ `glibtop_init_<feature>_* ()' functions from void to int.
+
+ * features.def: Reflect changes of the return values.
+ * sysdeps/*/*.c: Reflect changes of the return values.
+
+1999-10-24 Martin Baulig <martin@home-of-linux.org>
+
* acconfig.h (LIBGTOP_USE_GLIB_MALLOC): Added.
* configure.in (--enable-glib-malloc): New configure parameter
to use glib's malloc functions.
diff --git a/features.def b/features.def
index a5530048..c08df124 100644
--- a/features.def
+++ b/features.def
@@ -1,22 +1,22 @@
-void|cpu|ulong(total,user,nice,sys,idle,frequency,xcpu_total[GLIBTOP_NCPU],xcpu_user[GLIBTOP_NCPU],xcpu_nice[GLIBTOP_NCPU],xcpu_sys[GLIBTOP_NCPU],xcpu_idle[GLIBTOP_NCPU],xcpu_flags)
-void|mem|ulong(total,used,free,shared,buffer,cached,user,locked)
-void|swap|ulong(total,used,free,pagein,pageout)
-void|uptime|double(uptime,idletime):ulong(boot_time)
-void|loadavg|double(loadavg[3]):ulong(nr_running,nr_tasks,last_pid)
-void|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall)
-void|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql)
-void|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem)
+int|cpu|ulong(total,user,nice,sys,idle,frequency,xcpu_total[GLIBTOP_NCPU],xcpu_user[GLIBTOP_NCPU],xcpu_nice[GLIBTOP_NCPU],xcpu_sys[GLIBTOP_NCPU],xcpu_idle[GLIBTOP_NCPU],xcpu_flags)
+int|mem|ulong(total,used,free,shared,buffer,cached,user,locked)
+int|swap|ulong(total,used,free,pagein,pageout)
+int|uptime|double(uptime,idletime):ulong(boot_time)
+int|loadavg|double(loadavg[3]):ulong(nr_running,nr_tasks,last_pid)
+int|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall)
+int|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql)
+int|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem)
unsigned *|proclist|ulong(number,size,total)|long(which,arg)
-void|proc_state|str(cmd):unsigned(state):ulong(uid,gid,ruid,rgid,has_cpu,processor,last_processor)|pid_t(pid)
-void|proc_uid|long(uid,euid,gid,egid,suid,sgid,fsuid,fsgid,pid,ppid,pgrp,session,tty,tpgid,priority,nice,ngroups,groups[GLIBTOP_MAX_GROUPS])|pid_t(pid)
-void|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t(pid)
-void|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real_value,frequency,xcpu_utime[GLIBTOP_NCPU],xcpu_stime[GLIBTOP_NCPU],xcpu_flags)|pid_t(pid)
-void|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid)
-void|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):str(wchan)|pid_t(pid)
-void|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid)
+int|proc_state|str(cmd):unsigned(state):ulong(uid,gid,ruid,rgid,has_cpu,processor,last_processor)|pid_t(pid)
+int|proc_uid|long(uid,euid,gid,egid,suid,sgid,fsuid,fsgid,pid,ppid,pgrp,session,tty,tpgid,priority,nice,ngroups,groups[GLIBTOP_MAX_GROUPS])|pid_t(pid)
+int|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t(pid)
+int|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real_value,frequency,xcpu_utime[GLIBTOP_NCPU],xcpu_stime[GLIBTOP_NCPU],xcpu_flags)|pid_t(pid)
+int|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid)
+int|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):str(wchan)|pid_t(pid)
+int|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid)
char *|proc_args|ulong(size)|pid_t(pid):unsigned(max_len)
glibtop_map_entry *|proc_map|ulong(number,size,total)|pid_t(pid)
glibtop_mountentry *|@mountlist|ulong(number,size,total)|int(all_fs)
-void|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string|mount_dir
-void|netload|ulong(if_flags,mtu,subnet,address,packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string|interface
-void|ppp|ulong(state,bytes_in,bytes_out)|ushort(device)
+int|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string|mount_dir
+int|netload|ulong(if_flags,mtu,subnet,address,packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string|interface
+int|ppp|ulong(state,bytes_in,bytes_out)|ushort(device)
diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h
index efdad441..a7e3a15f 100644
--- a/include/glibtop/cpu.h
+++ b/include/glibtop/cpu.h
@@ -74,14 +74,14 @@ struct _glibtop_cpu
#define glibtop_get_cpu_r glibtop_get_cpu_s
#endif
-void glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf);
+int glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf);
#if GLIBTOP_SUID_CPU
-void glibtop_init_cpu_p (glibtop *server);
-void glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf);
+int glibtop_init_cpu_p (glibtop *server);
+int glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf);
#else
-void glibtop_init_cpu_s (glibtop *server);
-void glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf);
+int glibtop_init_cpu_s (glibtop *server);
+int glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/fsusage.h b/include/glibtop/fsusage.h
index cbfade43..97f50929 100644
--- a/include/glibtop/fsusage.h
+++ b/include/glibtop/fsusage.h
@@ -55,8 +55,8 @@ struct _glibtop_fsusage
#define glibtop_get_fsusage_r glibtop_get_fsusage_s
-void glibtop_get_fsusage_l (glibtop *server, glibtop_fsusage *buf, const char *mount_dir);
-void glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, const char *mount_dir);
+int glibtop_get_fsusage_l (glibtop *server, glibtop_fsusage *buf, const char *mount_dir);
+int glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, const char *mount_dir);
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h
index f43642f6..8ebfbec8 100644
--- a/include/glibtop/loadavg.h
+++ b/include/glibtop/loadavg.h
@@ -57,14 +57,14 @@ struct _glibtop_loadavg
#define glibtop_get_loadavg_r glibtop_get_loadavg_s
#endif
-void glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf);
+int glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf);
#if GLIBTOP_SUID_LOADAVG
-void glibtop_init_loadavg_p (glibtop *server);
-void glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf);
+int glibtop_init_loadavg_p (glibtop *server);
+int glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf);
#else
-void glibtop_init_loadavg_s (glibtop *server);
-void glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf);
+int glibtop_init_loadavg_s (glibtop *server);
+int glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h
index 2cf6b3e7..8c28def8 100644
--- a/include/glibtop/mem.h
+++ b/include/glibtop/mem.h
@@ -65,14 +65,14 @@ struct _glibtop_mem
#define glibtop_get_mem_r glibtop_get_mem_s
#endif
-void glibtop_get_mem_l (glibtop *server, glibtop_mem *buf);
+int glibtop_get_mem_l (glibtop *server, glibtop_mem *buf);
#if GLIBTOP_SUID_MEM
-void glibtop_init_mem_p (glibtop *server);
-void glibtop_get_mem_p (glibtop *server, glibtop_mem *buf);
+int glibtop_init_mem_p (glibtop *server);
+int glibtop_get_mem_p (glibtop *server, glibtop_mem *buf);
#else
-void glibtop_init_mem_s (glibtop *server);
-void glibtop_get_mem_s (glibtop *server, glibtop_mem *buf);
+int glibtop_init_mem_s (glibtop *server);
+int glibtop_get_mem_s (glibtop *server, glibtop_mem *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h
index be3cb224..5c566275 100644
--- a/include/glibtop/msg_limits.h
+++ b/include/glibtop/msg_limits.h
@@ -63,14 +63,14 @@ struct _glibtop_msg_limits
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_s
#endif
-void glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf);
+int glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf);
#if GLIBTOP_SUID_MSG_LIMITS
-void glibtop_init_msg_limits_p (glibtop *server);
-void glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf);
+int glibtop_init_msg_limits_p (glibtop *server);
+int glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf);
#else
-void glibtop_init_msg_limits_s (glibtop *server);
-void glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf);
+int glibtop_init_msg_limits_s (glibtop *server);
+int glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h
index 5bb98cae..f4df5ba4 100644
--- a/include/glibtop/netload.h
+++ b/include/glibtop/netload.h
@@ -96,14 +96,14 @@ struct _glibtop_netload
#define glibtop_get_netload_r glibtop_get_netload_s
#endif
-void glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface);
+int glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface);
#if GLIBTOP_SUID_NETLOAD
-void glibtop_init_netload_p (glibtop *server);
-void glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface);
+int glibtop_init_netload_p (glibtop *server);
+int glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface);
#else
-void glibtop_init_netload_s (glibtop *server);
-void glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface);
+int glibtop_init_netload_s (glibtop *server);
+int glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/ppp.h b/include/glibtop/ppp.h
index eb951cf6..348b480a 100644
--- a/include/glibtop/ppp.h
+++ b/include/glibtop/ppp.h
@@ -61,14 +61,14 @@ struct _glibtop_ppp
#define glibtop_get_ppp_r glibtop_get_ppp_s
#endif
-void glibtop_get_ppp_l (glibtop *server, glibtop_ppp *buf, unsigned short device);
+int glibtop_get_ppp_l (glibtop *server, glibtop_ppp *buf, unsigned short device);
#if GLIBTOP_SUID_PPP
-void glibtop_init_ppp_p (glibtop *server);
-void glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device);
+int glibtop_init_ppp_p (glibtop *server);
+int glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device);
#else
-void glibtop_init_ppp_s (glibtop *server);
-void glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device);
+int glibtop_init_ppp_s (glibtop *server);
+int glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/procargs.h b/include/glibtop/procargs.h
index 91039bd6..82447016 100644
--- a/include/glibtop/procargs.h
+++ b/include/glibtop/procargs.h
@@ -56,13 +56,13 @@ glibtop_get_proc_args_l (glibtop *server, glibtop_proc_args *buf,
pid_t pid, unsigned max_len);
#if GLIBTOP_SUID_PROC_ARGS
-void glibtop_init_proc_args_p (glibtop *server);
+int glibtop_init_proc_args_p (glibtop *server);
char *
glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
pid_t pid, unsigned max_len);
#else
-void glibtop_init_proc_args_s (glibtop *server);
+int glibtop_init_proc_args_s (glibtop *server);
char *
glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h
index b9dc0c29..a195ea55 100644
--- a/include/glibtop/prockernel.h
+++ b/include/glibtop/prockernel.h
@@ -85,14 +85,14 @@ struct _glibtop_proc_kernel
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_s
#endif
-void glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
+int glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_KERNEL
-void glibtop_init_proc_kernel_p (glibtop *server);
-void glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
+int glibtop_init_proc_kernel_p (glibtop *server);
+int glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
#else
-void glibtop_init_proc_kernel_s (glibtop *server);
-void glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
+int glibtop_init_proc_kernel_s (glibtop *server);
+int glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h
index 7d2a034e..641cf09d 100644
--- a/include/glibtop/proclist.h
+++ b/include/glibtop/proclist.h
@@ -77,13 +77,13 @@ glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf,
int64_t which, int64_t arg);
#if GLIBTOP_SUID_PROCLIST
-void glibtop_init_proclist_p (glibtop *server);
+int glibtop_init_proclist_p (glibtop *server);
unsigned *
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
int64_t which, int64_t arg);
#else
-void glibtop_init_proclist_s (glibtop *server);
+int glibtop_init_proclist_s (glibtop *server);
unsigned *
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
diff --git a/include/glibtop/procmap.h b/include/glibtop/procmap.h
index 4016e1fb..eceafea5 100644
--- a/include/glibtop/procmap.h
+++ b/include/glibtop/procmap.h
@@ -85,12 +85,12 @@ glibtop_map_entry *
glibtop_get_proc_map_l (glibtop *server, glibtop_proc_map *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_MAP
-void glibtop_init_proc_map_p (glibtop *server);
+int glibtop_init_proc_map_p (glibtop *server);
glibtop_map_entry *
glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid);
#else
-void glibtop_init_proc_map_s (glibtop *server);
+int glibtop_init_proc_map_s (glibtop *server);
glibtop_map_entry *
glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid);
diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h
index aa87239b..dd232f66 100644
--- a/include/glibtop/procmem.h
+++ b/include/glibtop/procmem.h
@@ -65,14 +65,14 @@ struct _glibtop_proc_mem
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_s
#endif
-void glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
+int glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_MEM
-void glibtop_init_proc_mem_p (glibtop *server);
-void glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
+int glibtop_init_proc_mem_p (glibtop *server);
+int glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
#else
-void glibtop_init_proc_mem_s (glibtop *server);
-void glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
+int glibtop_init_proc_mem_s (glibtop *server);
+int glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h
index 1c243528..898ae11d 100644
--- a/include/glibtop/procsegment.h
+++ b/include/glibtop/procsegment.h
@@ -85,14 +85,14 @@ struct _glibtop_proc_segment
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_s
#endif
-void glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
+int glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_SEGMENT
-void glibtop_init_proc_segment_p (glibtop *server);
-void glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
+int glibtop_init_proc_segment_p (glibtop *server);
+int glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
#else
-void glibtop_init_proc_segment_s (glibtop *server);
-void glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
+int glibtop_init_proc_segment_s (glibtop *server);
+int glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h
index 2c610c89..1fe5859d 100644
--- a/include/glibtop/procsignal.h
+++ b/include/glibtop/procsignal.h
@@ -59,14 +59,14 @@ struct _glibtop_proc_signal
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_s
#endif
-void glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
+int glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_SIGNAL
-void glibtop_init_proc_signal_p (glibtop *server);
-void glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
+int glibtop_init_proc_signal_p (glibtop *server);
+int glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
#else
-void glibtop_init_proc_signal_s (glibtop *server);
-void glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
+int glibtop_init_proc_signal_s (glibtop *server);
+int glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h
index d56bd73e..c5eb1ac9 100644
--- a/include/glibtop/procstate.h
+++ b/include/glibtop/procstate.h
@@ -85,14 +85,14 @@ struct _glibtop_proc_state
#define glibtop_get_proc_state_r glibtop_get_proc_state_s
#endif
-void glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf, pid_t pid);
+int glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_STATE
-void glibtop_init_proc_state_p (glibtop *server);
-void glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, pid_t pid);
+int glibtop_init_proc_state_p (glibtop *server);
+int glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, pid_t pid);
#else
-void glibtop_init_proc_state_s (glibtop *server);
-void glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid);
+int glibtop_init_proc_state_s (glibtop *server);
+int glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h
index 9d649f37..fe0ee0cc 100644
--- a/include/glibtop/proctime.h
+++ b/include/glibtop/proctime.h
@@ -82,14 +82,14 @@ struct _glibtop_proc_time
#define glibtop_get_proc_time_r glibtop_get_proc_time_s
#endif
-void glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf, pid_t pid);
+int glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_TIME
-void glibtop_init_proc_time_p (glibtop *server);
-void glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, pid_t pid);
+int glibtop_init_proc_time_p (glibtop *server);
+int glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, pid_t pid);
#else
-void glibtop_init_proc_time_s (glibtop *server);
-void glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid);
+int glibtop_init_proc_time_s (glibtop *server);
+int glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h
index 36906de2..1ec955a5 100644
--- a/include/glibtop/procuid.h
+++ b/include/glibtop/procuid.h
@@ -87,14 +87,14 @@ struct _glibtop_proc_uid
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_s
#endif
-void glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
+int glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
#if GLIBTOP_SUID_PROC_UID
-void glibtop_init_proc_uid_p (glibtop *server);
-void glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
+int glibtop_init_proc_uid_p (glibtop *server);
+int glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
#else
-void glibtop_init_proc_uid_s (glibtop *server);
-void glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
+int glibtop_init_proc_uid_s (glibtop *server);
+int glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h
index f4d21c2c..176781c2 100644
--- a/include/glibtop/sem_limits.h
+++ b/include/glibtop/sem_limits.h
@@ -69,14 +69,14 @@ struct _glibtop_sem_limits
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_s
#endif
-void glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf);
+int glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf);
#if GLIBTOP_SUID_SEM_LIMITS
-void glibtop_init_sem_limits_p (glibtop *server);
-void glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf);
+int glibtop_init_sem_limits_p (glibtop *server);
+int glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf);
#else
-void glibtop_init_sem_limits_s (glibtop *server);
-void glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf);
+int glibtop_init_sem_limits_s (glibtop *server);
+int glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h
index 77a93edf..35405177 100644
--- a/include/glibtop/shm_limits.h
+++ b/include/glibtop/shm_limits.h
@@ -59,14 +59,14 @@ struct _glibtop_shm_limits
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_s
#endif
-void glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf);
+int glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf);
#if GLIBTOP_SUID_SHM_LIMITS
-void glibtop_init_shm_limits_p (glibtop *server);
-void glibtop_get_shm_limits_p (glibtop *, glibtop_shm_limits *buf);
+int glibtop_init_shm_limits_p (glibtop *server);
+int glibtop_get_shm_limits_p (glibtop *, glibtop_shm_limits *buf);
#else
-void glibtop_init_shm_limits_s (glibtop *server);
-void glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf);
+int glibtop_init_shm_limits_s (glibtop *server);
+int glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h
index 540a321e..43b9c5a6 100644
--- a/include/glibtop/swap.h
+++ b/include/glibtop/swap.h
@@ -59,14 +59,14 @@ struct _glibtop_swap
#define glibtop_get_swap_r glibtop_get_swap_s
#endif
-void glibtop_get_swap_l (glibtop *server, glibtop_swap *buf);
+int glibtop_get_swap_l (glibtop *server, glibtop_swap *buf);
#if GLIBTOP_SUID_SWAP
-void glibtop_init_swap_p (glibtop *server);
-void glibtop_get_swap_p (glibtop *server, glibtop_swap *buf);
+int glibtop_init_swap_p (glibtop *server);
+int glibtop_get_swap_p (glibtop *server, glibtop_swap *buf);
#else
-void glibtop_init_swap_s (glibtop *server);
-void glibtop_get_swap_s (glibtop *server, glibtop_swap *buf);
+int glibtop_init_swap_s (glibtop *server);
+int glibtop_get_swap_s (glibtop *server, glibtop_swap *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h
index ef284e13..529e9177 100644
--- a/include/glibtop/uptime.h
+++ b/include/glibtop/uptime.h
@@ -55,14 +55,14 @@ struct _glibtop_uptime
#define glibtop_get_uptime_r glibtop_get_uptime_s
#endif
-void glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf);
+int glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf);
#if GLIBTOP_SUID_UPTIME
-void glibtop_init_uptime_p (glibtop *server);
-void glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf);
+int glibtop_init_uptime_p (glibtop *server);
+int glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf);
#else
-void glibtop_init_uptime_s (glibtop *server);
-void glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf);
+int glibtop_init_uptime_s (glibtop *server);
+int glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf);
#endif
#ifdef GLIBTOP_NAMES
diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c
index c0665523..e1b56b63 100644
--- a/sysdeps/common/fsusage.c
+++ b/sysdeps/common/fsusage.c
@@ -280,7 +280,7 @@ statfs (path, fsb)
#endif /* _AIX && _I386 */
-void
+int
glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
const char *disk)
{
diff --git a/sysdeps/freebsd/cpu.c b/sysdeps/freebsd/cpu.c
index a56106c7..9a53ccbb 100644
--- a/sysdeps/freebsd/cpu.c
+++ b/sysdeps/freebsd/cpu.c
@@ -48,7 +48,7 @@ static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
/* Init function. */
-void
+int
glibtop_init_cpu_p (glibtop *server)
{
if (kvm_nlist (server->machine.kd, nlst) != 0) {
@@ -62,7 +62,7 @@ glibtop_init_cpu_p (glibtop *server)
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
{
long cpts [CPUSTATES];
diff --git a/sysdeps/freebsd/loadavg.c b/sysdeps/freebsd/loadavg.c
index b0530e8a..1c0a7979 100644
--- a/sysdeps/freebsd/loadavg.c
+++ b/sysdeps/freebsd/loadavg.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Init function. */
-void
+int
glibtop_init_loadavg_p (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -40,7 +40,7 @@ glibtop_init_loadavg_p (glibtop *server)
/* Provides load averange. */
-void
+int
glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
{
double ldavg[3];
diff --git a/sysdeps/freebsd/mem.c b/sysdeps/freebsd/mem.c
index 5480cae9..62c19095 100644
--- a/sysdeps/freebsd/mem.c
+++ b/sysdeps/freebsd/mem.c
@@ -87,7 +87,7 @@ static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
/* Init function. */
-void
+int
glibtop_init_mem_p (glibtop *server)
{
register int pagesize;
@@ -112,7 +112,7 @@ glibtop_init_mem_p (glibtop *server)
server->sysdeps.mem = _glibtop_sysdeps_mem;
}
-void
+int
glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
{
struct vmtotal vmt;
diff --git a/sysdeps/freebsd/msg_limits.c b/sysdeps/freebsd/msg_limits.c
index 3c4de8d5..f1428e74 100644
--- a/sysdeps/freebsd/msg_limits.c
+++ b/sysdeps/freebsd/msg_limits.c
@@ -30,11 +30,11 @@
#if (defined __bsdi__) && (_BSDI_VERSION < 199700)
/* Older versions of BSDI don't seem to have this. */
-void
+int
glibtop_init_msg_limits_p (glibtop *server)
{ }
-void
+int
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
@@ -73,7 +73,7 @@ static struct nlist nlst [] = {
/* Init function. */
-void
+int
glibtop_init_msg_limits_p (glibtop *server)
{
if (kvm_nlist (server->machine.kd, nlst) != 0) {
@@ -92,7 +92,7 @@ glibtop_init_msg_limits_p (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
diff --git a/sysdeps/freebsd/netload.c b/sysdeps/freebsd/netload.c
index cc252326..42461aca 100644
--- a/sysdeps/freebsd/netload.c
+++ b/sysdeps/freebsd/netload.c
@@ -62,7 +62,7 @@ static struct nlist nlst [] = {
/* Init function. */
-void
+int
glibtop_init_netload_p (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
@@ -73,7 +73,7 @@ glibtop_init_netload_p (glibtop *server)
/* Provides Network statistics. */
-void
+int
glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/freebsd/ppp.c b/sysdeps/freebsd/ppp.c
index 792a1e7a..cf089486 100644
--- a/sysdeps/freebsd/ppp.c
+++ b/sysdeps/freebsd/ppp.c
@@ -70,7 +70,7 @@ static struct nlist nlst [] = {
/* Init function. */
-void
+int
glibtop_init_ppp_p (glibtop *server)
{
#ifdef HAVE_I4B
@@ -88,7 +88,7 @@ glibtop_init_ppp_p (glibtop *server)
/* Provides information about ppp usage. */
-void
+int
glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
#ifdef HAVE_I4B
diff --git a/sysdeps/freebsd/procargs.c b/sysdeps/freebsd/procargs.c
index 83b6a78b..c6b3a8a5 100644
--- a/sysdeps/freebsd/procargs.c
+++ b/sysdeps/freebsd/procargs.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_proc_args =
/* Init function. */
-void
+int
glibtop_init_proc_args_p (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/freebsd/prockernel.c b/sysdeps/freebsd/prockernel.c
index f0d6884a..c562b728 100644
--- a/sysdeps/freebsd/prockernel.c
+++ b/sysdeps/freebsd/prockernel.c
@@ -64,7 +64,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel_wchan =
/* Init function. */
-void
+int
glibtop_init_proc_kernel_p (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel_pstats |
@@ -72,7 +72,7 @@ glibtop_init_proc_kernel_p (glibtop *server)
_glibtop_sysdeps_proc_kernel_wchan;
}
-void
+int
glibtop_get_proc_kernel_p (glibtop *server,
glibtop_proc_kernel *buf,
pid_t pid)
diff --git a/sysdeps/freebsd/proclist.c b/sysdeps/freebsd/proclist.c
index 20353ec5..2f466c7f 100644
--- a/sysdeps/freebsd/proclist.c
+++ b/sysdeps/freebsd/proclist.c
@@ -52,7 +52,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
/* Init function. */
-void
+int
glibtop_init_proclist_p (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/freebsd/procmap.c b/sysdeps/freebsd/procmap.c
index f29445b5..d39a7a2a 100644
--- a/sysdeps/freebsd/procmap.c
+++ b/sysdeps/freebsd/procmap.c
@@ -67,7 +67,7 @@ static const unsigned long _glibtop_sysdeps_map_entry =
/* Init function. */
-void
+int
glibtop_init_proc_map_p (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/freebsd/procmem.c b/sysdeps/freebsd/procmem.c
index 05f66001..43717b82 100644
--- a/sysdeps/freebsd/procmem.c
+++ b/sysdeps/freebsd/procmem.c
@@ -81,7 +81,7 @@ static int pageshift; /* log base 2 of the pagesize */
/* Init function. */
-void
+int
glibtop_init_proc_mem_p (glibtop *server)
{
register int pagesize;
@@ -104,7 +104,7 @@ glibtop_init_proc_mem_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
diff --git a/sysdeps/freebsd/procsegment.c b/sysdeps/freebsd/procsegment.c
index 915472ef..f14a9d94 100644
--- a/sysdeps/freebsd/procsegment.c
+++ b/sysdeps/freebsd/procsegment.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_proc_segment = 0;
/* Init function. */
-void
+int
glibtop_init_proc_segment_p (glibtop *server)
{
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
@@ -43,7 +43,7 @@ glibtop_init_proc_segment_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_p (glibtop *server,
glibtop_proc_segment *buf,
pid_t pid)
diff --git a/sysdeps/freebsd/procsignal.c b/sysdeps/freebsd/procsignal.c
index 58cc7666..b9d60dfd 100644
--- a/sysdeps/freebsd/procsignal.c
+++ b/sysdeps/freebsd/procsignal.c
@@ -39,13 +39,13 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Init function. */
-void
+int
glibtop_init_proc_signal_p (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
}
-void
+int
glibtop_get_proc_signal_p (glibtop *server,
glibtop_proc_signal *buf,
pid_t pid)
diff --git a/sysdeps/freebsd/procstate.c b/sysdeps/freebsd/procstate.c
index 2357b393..263fe937 100644
--- a/sysdeps/freebsd/procstate.c
+++ b/sysdeps/freebsd/procstate.c
@@ -45,7 +45,7 @@ static const unsigned long _glibtop_sysdeps_proc_state_new =
/* Init function. */
-void
+int
glibtop_init_proc_state_p (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state |
@@ -54,7 +54,7 @@ glibtop_init_proc_state_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_p (glibtop *server,
glibtop_proc_state *buf,
pid_t pid)
diff --git a/sysdeps/freebsd/proctime.c b/sysdeps/freebsd/proctime.c
index 22e7a60c..2c7ebd12 100644
--- a/sysdeps/freebsd/proctime.c
+++ b/sysdeps/freebsd/proctime.c
@@ -43,7 +43,7 @@ static const unsigned long _glibtop_sysdeps_proc_time_user =
/* Init function. */
-void
+int
glibtop_init_proc_time_p (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time |
@@ -119,7 +119,7 @@ calcru(p, up, sp, ip)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/freebsd/procuid.c b/sysdeps/freebsd/procuid.c
index 03c4598a..dffddfb4 100644
--- a/sysdeps/freebsd/procuid.c
+++ b/sysdeps/freebsd/procuid.c
@@ -47,7 +47,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid_groups =
/* Init function. */
-void
+int
glibtop_init_proc_uid_p (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid |
@@ -56,7 +56,7 @@ glibtop_init_proc_uid_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
diff --git a/sysdeps/freebsd/sem_limits.c b/sysdeps/freebsd/sem_limits.c
index 13b36130..64e6befa 100644
--- a/sysdeps/freebsd/sem_limits.c
+++ b/sysdeps/freebsd/sem_limits.c
@@ -30,11 +30,11 @@
#if defined(__bsdi__) && (_BSDI_VERSION < 199700)
/* Older versions of BSDI don't seem to have this. */
-void
+int
glibtop_init_sem_limits_p (glibtop *server)
{ }
-void
+int
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
@@ -75,7 +75,7 @@ static struct nlist nlst [] = {
/* Init function. */
-void
+int
glibtop_init_sem_limits_p (glibtop *server)
{
if (kvm_nlist (server->machine.kd, nlst) != 0) {
@@ -94,7 +94,7 @@ glibtop_init_sem_limits_p (glibtop *server)
/* Provides information about sysv sem limits. */
-void
+int
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
diff --git a/sysdeps/freebsd/shm_limits.c b/sysdeps/freebsd/shm_limits.c
index f8ab72c1..e2429f8e 100644
--- a/sysdeps/freebsd/shm_limits.c
+++ b/sysdeps/freebsd/shm_limits.c
@@ -30,11 +30,11 @@
#if defined(__bsdi__) && (_BSDI_VERSION < 199700)
/* Older versions of BSDI don't seem to have this. */
-void
+int
glibtop_init_shm_limits_p (glibtop *server)
{ }
-void
+int
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
@@ -73,7 +73,7 @@ static struct nlist nlst [] = {
/* Init function. */
-void
+int
glibtop_init_shm_limits_p (glibtop *server)
{
if (kvm_nlist (server->machine.kd, nlst) != 0) {
@@ -92,7 +92,7 @@ glibtop_init_shm_limits_p (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
diff --git a/sysdeps/freebsd/swap.c b/sysdeps/freebsd/swap.c
index da63f19f..de078370 100644
--- a/sysdeps/freebsd/swap.c
+++ b/sysdeps/freebsd/swap.c
@@ -92,7 +92,7 @@ static struct nlist nlst2 [] = {
/* Init function. */
-void
+int
glibtop_init_swap_p (glibtop *server)
{
#if defined(__FreeBSD__) || defined(__bsdi__)
@@ -128,7 +128,7 @@ glibtop_init_swap_p (glibtop *server)
* by Kevin Lahey <kml@rokkaku.atl.ga.us>.
*/
-void
+int
glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
{
#if defined(__FreeBSD__)
diff --git a/sysdeps/freebsd/uptime.c b/sysdeps/freebsd/uptime.c
index 250a72d1..0a0aef66 100644
--- a/sysdeps/freebsd/uptime.c
+++ b/sysdeps/freebsd/uptime.c
@@ -38,7 +38,7 @@ static const unsigned long _required_cpu_flags =
/* Init function. */
-void
+int
glibtop_init_uptime_p (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -46,7 +46,7 @@ glibtop_init_uptime_p (glibtop *server)
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
{
glibtop_cpu cpu;
diff --git a/sysdeps/kernel/cpu.c b/sysdeps/kernel/cpu.c
index 0440497f..c67dae80 100644
--- a/sysdeps/kernel/cpu.c
+++ b/sysdeps/kernel/cpu.c
@@ -38,7 +38,7 @@ static const unsigned long _glibtop_sysdeps_cpu_smp =
/* Init function. */
-void
+int
glibtop_init_cpu_s (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
@@ -49,7 +49,7 @@ glibtop_init_cpu_s (glibtop *server)
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
libgtop_stat_t stat;
diff --git a/sysdeps/kernel/loadavg.c b/sysdeps/kernel/loadavg.c
index ef71baf5..535b485e 100644
--- a/sysdeps/kernel/loadavg.c
+++ b/sysdeps/kernel/loadavg.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Init function. */
-void
+int
glibtop_init_loadavg_s (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -39,7 +39,7 @@ glibtop_init_loadavg_s (glibtop *server)
/* Provides load averange. */
-void
+int
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
libgtop_stat_t stat;
diff --git a/sysdeps/kernel/mem.c b/sysdeps/kernel/mem.c
index 9e922bb1..194dd8ab 100644
--- a/sysdeps/kernel/mem.c
+++ b/sysdeps/kernel/mem.c
@@ -33,7 +33,7 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Init function. */
-void
+int
glibtop_init_mem_s (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem;
@@ -41,7 +41,7 @@ glibtop_init_mem_s (glibtop *server)
/* Provides information about memory usage. */
-void
+int
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
libgtop_mem_t mem;
diff --git a/sysdeps/kernel/msg_limits.c b/sysdeps/kernel/msg_limits.c
index 6ea485af..f9931b7c 100644
--- a/sysdeps/kernel/msg_limits.c
+++ b/sysdeps/kernel/msg_limits.c
@@ -34,7 +34,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Init function. */
-void
+int
glibtop_init_msg_limits_s (glibtop *server)
{
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
@@ -42,7 +42,7 @@ glibtop_init_msg_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
{
struct msginfo msginfo;
diff --git a/sysdeps/kernel/netload.c b/sysdeps/kernel/netload.c
index 3043ef54..ea2f642a 100644
--- a/sysdeps/kernel/netload.c
+++ b/sysdeps/kernel/netload.c
@@ -67,7 +67,7 @@ static const unsigned long _glibtop_sysdeps_netload =
/* Init function. */
-void
+int
glibtop_init_netload_s (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
@@ -75,7 +75,7 @@ glibtop_init_netload_s (glibtop *server)
/* Provides network statistics. */
-void
+int
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/kernel/ppp.c b/sysdeps/kernel/ppp.c
index ca476f8e..754f7486 100644
--- a/sysdeps/kernel/ppp.c
+++ b/sysdeps/kernel/ppp.c
@@ -41,7 +41,7 @@ static const unsigned long _glibtop_sysdeps_ppp =
/* Init function. */
-void
+int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -177,7 +177,7 @@ static int is_ISDN_on (glibtop *server, int *online)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
int in, out, online;
diff --git a/sysdeps/kernel/procargs.c b/sysdeps/kernel/procargs.c
index eba0719c..851dda15 100644
--- a/sysdeps/kernel/procargs.c
+++ b/sysdeps/kernel/procargs.c
@@ -33,7 +33,7 @@ static const unsigned long _glibtop_sysdeps_proc_args =
/* Init function. */
-void
+int
glibtop_init_proc_args_s (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/kernel/prockernel.c b/sysdeps/kernel/prockernel.c
index 28f17db2..8974915b 100644
--- a/sysdeps/kernel/prockernel.c
+++ b/sysdeps/kernel/prockernel.c
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel_kernel =
/* Init function. */
-void
+int
glibtop_init_proc_kernel_s (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel |
@@ -48,7 +48,7 @@ glibtop_init_proc_kernel_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/proclist.c b/sysdeps/kernel/proclist.c
index 8bacb597..5bb26753 100644
--- a/sysdeps/kernel/proclist.c
+++ b/sysdeps/kernel/proclist.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
/* Init function. */
-void
+int
glibtop_init_proclist_s (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/kernel/procmap.c b/sysdeps/kernel/procmap.c
index 152440d1..ac1fb7d8 100644
--- a/sysdeps/kernel/procmap.c
+++ b/sysdeps/kernel/procmap.c
@@ -41,7 +41,7 @@ static const unsigned long _glibtop_sysdeps_map_entry =
/* Init function. */
-void
+int
glibtop_init_proc_map_s (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/kernel/procmem.c b/sysdeps/kernel/procmem.c
index 7b168000..66635a6b 100644
--- a/sysdeps/kernel/procmem.c
+++ b/sysdeps/kernel/procmem.c
@@ -43,7 +43,7 @@ static int pageshift; /* log base 2 of the pagesize */
/* Init function. */
-void
+int
glibtop_init_proc_mem_s (glibtop *server)
{
register int pagesize;
@@ -61,7 +61,7 @@ glibtop_init_proc_mem_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/procsegment.c b/sysdeps/kernel/procsegment.c
index 7250fe65..c257deba 100644
--- a/sysdeps/kernel/procsegment.c
+++ b/sysdeps/kernel/procsegment.c
@@ -50,7 +50,7 @@ static int pageshift; /* log base 2 of the pagesize */
/* Init function. */
-void
+int
glibtop_init_proc_segment_s (glibtop *server)
{
register int pagesize;
@@ -69,7 +69,7 @@ glibtop_init_proc_segment_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/procsignal.c b/sysdeps/kernel/procsignal.c
index 491fad55..6e3f90b4 100644
--- a/sysdeps/kernel/procsignal.c
+++ b/sysdeps/kernel/procsignal.c
@@ -34,7 +34,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Init function. */
-void
+int
glibtop_init_proc_signal_s (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
@@ -42,7 +42,7 @@ glibtop_init_proc_signal_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/procstate.c b/sysdeps/kernel/procstate.c
index a8770b83..ce229889 100644
--- a/sysdeps/kernel/procstate.c
+++ b/sysdeps/kernel/procstate.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_proc_state =
/* Init function. */
-void
+int
glibtop_init_proc_state_s (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
@@ -43,7 +43,7 @@ glibtop_init_proc_state_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/proctime.c b/sysdeps/kernel/proctime.c
index eaca9b2b..d07e9420 100644
--- a/sysdeps/kernel/proctime.c
+++ b/sysdeps/kernel/proctime.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_proc_time_smp =
/* Init function. */
-void
+int
glibtop_init_proc_time_s (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
@@ -47,7 +47,7 @@ glibtop_init_proc_time_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/procuid.c b/sysdeps/kernel/procuid.c
index 8776efb1..20a40a83 100644
--- a/sysdeps/kernel/procuid.c
+++ b/sysdeps/kernel/procuid.c
@@ -43,7 +43,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid =
/* Init function. */
-void
+int
glibtop_init_proc_uid_s (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
@@ -51,7 +51,7 @@ glibtop_init_proc_uid_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
diff --git a/sysdeps/kernel/sem_limits.c b/sysdeps/kernel/sem_limits.c
index 205c2875..d636fec7 100644
--- a/sysdeps/kernel/sem_limits.c
+++ b/sysdeps/kernel/sem_limits.c
@@ -50,7 +50,7 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Init function. */
-void
+int
glibtop_init_sem_limits_s (glibtop *server)
{
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
@@ -58,7 +58,7 @@ glibtop_init_sem_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
{
struct seminfo seminfo;
diff --git a/sysdeps/kernel/shm_limits.c b/sysdeps/kernel/shm_limits.c
index 8b26bc5d..4892abaf 100644
--- a/sysdeps/kernel/shm_limits.c
+++ b/sysdeps/kernel/shm_limits.c
@@ -33,7 +33,7 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Init function. */
-void
+int
glibtop_init_shm_limits_s (glibtop *server)
{
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
@@ -41,7 +41,7 @@ glibtop_init_shm_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
{
struct shminfo shminfo;
diff --git a/sysdeps/kernel/swap.c b/sysdeps/kernel/swap.c
index 7ff8a4fe..4076383a 100644
--- a/sysdeps/kernel/swap.c
+++ b/sysdeps/kernel/swap.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_swap_stat =
/* Init function. */
-void
+int
glibtop_init_swap_s (glibtop *server)
{
server->sysdeps.swap = _glibtop_sysdeps_swap |
@@ -44,7 +44,7 @@ glibtop_init_swap_s (glibtop *server)
/* Provides information about swap usage. */
-void
+int
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
libgtop_stat_t stat;
diff --git a/sysdeps/kernel/uptime.c b/sysdeps/kernel/uptime.c
index ac45dc7f..7a696da1 100644
--- a/sysdeps/kernel/uptime.c
+++ b/sysdeps/kernel/uptime.c
@@ -32,7 +32,7 @@ static unsigned long _glibtop_sysdeps_uptime =
/* Init function. */
-void
+int
glibtop_init_uptime_s (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -40,7 +40,7 @@ glibtop_init_uptime_s (glibtop *server)
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
libgtop_stat_t stat;
diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c
index 012670ad..37caf855 100644
--- a/sysdeps/linux/cpu.c
+++ b/sysdeps/linux/cpu.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_cpu_smp =
/* Init function. */
-void
+int
glibtop_init_cpu_s (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
@@ -50,7 +50,7 @@ glibtop_init_cpu_s (glibtop *server)
#define FILENAME "/proc/stat"
-void
+int
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/loadavg.c b/sysdeps/linux/loadavg.c
index aedff8ca..e4d43c98 100644
--- a/sysdeps/linux/loadavg.c
+++ b/sysdeps/linux/loadavg.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_loadavg_tasks =
/* Init function. */
-void
+int
glibtop_init_loadavg_s (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -45,7 +45,7 @@ glibtop_init_loadavg_s (glibtop *server)
#define FILENAME "/proc/loadavg"
-void
+int
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
char buffer [BUFSIZ], *p, *old;
diff --git a/sysdeps/linux/mem.c b/sysdeps/linux/mem.c
index 732dbe51..317960d8 100644
--- a/sysdeps/linux/mem.c
+++ b/sysdeps/linux/mem.c
@@ -33,7 +33,7 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Init function. */
-void
+int
glibtop_init_mem_s (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem;
@@ -43,7 +43,7 @@ glibtop_init_mem_s (glibtop *server)
#define FILENAME "/proc/meminfo"
-void
+int
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/msg_limits.c b/sysdeps/linux/msg_limits.c
index 81d19c1f..cd691ba8 100644
--- a/sysdeps/linux/msg_limits.c
+++ b/sysdeps/linux/msg_limits.c
@@ -34,7 +34,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Init function. */
-void
+int
glibtop_init_msg_limits_s (glibtop *server)
{
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
@@ -42,7 +42,7 @@ glibtop_init_msg_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
{
struct msginfo msginfo;
diff --git a/sysdeps/linux/netload.c b/sysdeps/linux/netload.c
index f8b1c8ec..a5c3f43a 100644
--- a/sysdeps/linux/netload.c
+++ b/sysdeps/linux/netload.c
@@ -88,7 +88,7 @@ static const unsigned long _glibtop_sysdeps_netload_out =
/* Init function. */
-void
+int
glibtop_init_netload_s (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload |
@@ -99,7 +99,7 @@ glibtop_init_netload_s (glibtop *server)
/* Provides network statistics. */
-void
+int
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c
index ca476f8e..754f7486 100644
--- a/sysdeps/linux/ppp.c
+++ b/sysdeps/linux/ppp.c
@@ -41,7 +41,7 @@ static const unsigned long _glibtop_sysdeps_ppp =
/* Init function. */
-void
+int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -177,7 +177,7 @@ static int is_ISDN_on (glibtop *server, int *online)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
int in, out, online;
diff --git a/sysdeps/linux/procargs.c b/sysdeps/linux/procargs.c
index 6924aee8..66e68fa3 100644
--- a/sysdeps/linux/procargs.c
+++ b/sysdeps/linux/procargs.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_args =
/* Init function. */
-void
+int
glibtop_init_proc_args_s (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/linux/prockernel.c b/sysdeps/linux/prockernel.c
index 46a82ec6..b61afc34 100644
--- a/sysdeps/linux/prockernel.c
+++ b/sysdeps/linux/prockernel.c
@@ -33,7 +33,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel =
/* Init function. */
-void
+int
glibtop_init_proc_kernel_s (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
@@ -41,7 +41,7 @@ glibtop_init_proc_kernel_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/proclist.c b/sysdeps/linux/proclist.c
index d495a973..528ed6a7 100644
--- a/sysdeps/linux/proclist.c
+++ b/sysdeps/linux/proclist.c
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
/* Init function. */
-void
+int
glibtop_init_proclist_s (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/linux/procmap.c b/sysdeps/linux/procmap.c
index 9052c84a..7306ff39 100644
--- a/sysdeps/linux/procmap.c
+++ b/sysdeps/linux/procmap.c
@@ -38,7 +38,7 @@ static const unsigned long _glibtop_sysdeps_map_entry =
/* Init function. */
-void
+int
glibtop_init_proc_map_s (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/linux/procmem.c b/sysdeps/linux/procmem.c
index 3e868ee8..3d5e892e 100644
--- a/sysdeps/linux/procmem.c
+++ b/sysdeps/linux/procmem.c
@@ -45,7 +45,7 @@ static int pageshift; /* log base 2 of the pagesize */
/* Init function. */
-void
+int
glibtop_init_proc_mem_s (glibtop *server)
{
register int pagesize;
@@ -65,7 +65,7 @@ glibtop_init_proc_mem_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/procsegment.c b/sysdeps/linux/procsegment.c
index 3179ae40..bfc01b54 100644
--- a/sysdeps/linux/procsegment.c
+++ b/sysdeps/linux/procsegment.c
@@ -49,7 +49,7 @@ static int pageshift; /* log base 2 of the pagesize */
/* Init function. */
-void
+int
glibtop_init_proc_segment_s (glibtop *server)
{
register int pagesize;
@@ -69,7 +69,7 @@ glibtop_init_proc_segment_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/linux/procsignal.c b/sysdeps/linux/procsignal.c
index 7d8fa56c..e4941fad 100644
--- a/sysdeps/linux/procsignal.c
+++ b/sysdeps/linux/procsignal.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Init function. */
-void
+int
glibtop_init_proc_signal_s (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
@@ -39,7 +39,7 @@ glibtop_init_proc_signal_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/procstate.c b/sysdeps/linux/procstate.c
index ea56b20c..814311f6 100644
--- a/sysdeps/linux/procstate.c
+++ b/sysdeps/linux/procstate.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_proc_state_uid =
/* Init function. */
-void
+int
glibtop_init_proc_state_s (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state |
@@ -44,7 +44,7 @@ glibtop_init_proc_state_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
{
char buffer [BUFSIZ], state, *p;
diff --git a/sysdeps/linux/proctime.c b/sysdeps/linux/proctime.c
index 83ea92b8..daab9501 100644
--- a/sysdeps/linux/proctime.c
+++ b/sysdeps/linux/proctime.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_proc_time_smp =
/* Init function. */
-void
+int
glibtop_init_proc_time_s (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
@@ -47,7 +47,7 @@ glibtop_init_proc_time_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/procuid.c b/sysdeps/linux/procuid.c
index a7585dcc..c8c79c10 100644
--- a/sysdeps/linux/procuid.c
+++ b/sysdeps/linux/procuid.c
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid_stat =
/* Init function. */
-void
+int
glibtop_init_proc_uid_s (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid |
@@ -48,7 +48,7 @@ glibtop_init_proc_uid_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/sem_limits.c b/sysdeps/linux/sem_limits.c
index 531b5f17..4cc29b2d 100644
--- a/sysdeps/linux/sem_limits.c
+++ b/sysdeps/linux/sem_limits.c
@@ -50,7 +50,7 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Init function. */
-void
+int
glibtop_init_sem_limits_s (glibtop *server)
{
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
@@ -58,7 +58,7 @@ glibtop_init_sem_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
{
struct seminfo seminfo;
diff --git a/sysdeps/linux/shm_limits.c b/sysdeps/linux/shm_limits.c
index 859160f1..67c0f87a 100644
--- a/sysdeps/linux/shm_limits.c
+++ b/sysdeps/linux/shm_limits.c
@@ -33,7 +33,7 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Init function. */
-void
+int
glibtop_init_shm_limits_s (glibtop *server)
{
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
@@ -41,7 +41,7 @@ glibtop_init_shm_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
{
struct shminfo shminfo;
diff --git a/sysdeps/linux/swap.c b/sysdeps/linux/swap.c
index 2a7d639b..94714abc 100644
--- a/sysdeps/linux/swap.c
+++ b/sysdeps/linux/swap.c
@@ -36,7 +36,7 @@ static unsigned long _glibtop_sysdeps_swap_paging =
/* Init function. */
-void
+int
glibtop_init_swap_s (glibtop *server)
{
server->sysdeps.swap = _glibtop_sysdeps_swap |
@@ -48,7 +48,7 @@ glibtop_init_swap_s (glibtop *server)
#define MEMINFO "/proc/meminfo"
#define PROC_STAT "/proc/stat"
-void
+int
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/linux/uptime.c b/sysdeps/linux/uptime.c
index f54dd1c8..d8707be6 100644
--- a/sysdeps/linux/uptime.c
+++ b/sysdeps/linux/uptime.c
@@ -30,7 +30,7 @@ static unsigned long _glibtop_sysdeps_uptime =
/* Init function. */
-void
+int
glibtop_init_uptime_s (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -40,7 +40,7 @@ glibtop_init_uptime_s (glibtop *server)
#define FILENAME "/proc/uptime"
-void
+int
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
char buffer [BUFSIZ], *p;
diff --git a/sysdeps/osf1/cpu.c b/sysdeps/osf1/cpu.c
index 680c11f8..26416228 100644
--- a/sysdeps/osf1/cpu.c
+++ b/sysdeps/osf1/cpu.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Init function. */
-void
+int
glibtop_init_cpu_s (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
@@ -40,7 +40,7 @@ glibtop_init_cpu_s (glibtop *server)
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
struct tbl_sysinfo sysinfo;
diff --git a/sysdeps/osf1/loadavg.c b/sysdeps/osf1/loadavg.c
index abf88ec7..6f8f949c 100644
--- a/sysdeps/osf1/loadavg.c
+++ b/sysdeps/osf1/loadavg.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Init function. */
-void
+int
glibtop_init_loadavg_s (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -38,7 +38,7 @@ glibtop_init_loadavg_s (glibtop *server)
/* Provides load averange. */
-void
+int
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
struct tbl_loadavg loadavg;
diff --git a/sysdeps/osf1/mem.c b/sysdeps/osf1/mem.c
index d76e595c..03577a05 100644
--- a/sysdeps/osf1/mem.c
+++ b/sysdeps/osf1/mem.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Init function. */
-void
+int
glibtop_init_mem_s (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem;
@@ -45,7 +45,7 @@ glibtop_init_mem_s (glibtop *server)
/* Provides information about memory usage. */
-void
+int
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
vm_statistics_data_t vmstats;
diff --git a/sysdeps/osf1/msg_limits.c b/sysdeps/osf1/msg_limits.c
index 2b198963..a38b2721 100644
--- a/sysdeps/osf1/msg_limits.c
+++ b/sysdeps/osf1/msg_limits.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Init function. */
-void
+int
glibtop_init_msg_limits_s (glibtop *server)
{
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
@@ -40,7 +40,7 @@ glibtop_init_msg_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
{
int ret, value;
diff --git a/sysdeps/osf1/netload.c b/sysdeps/osf1/netload.c
index bb1226ed..573066be 100644
--- a/sysdeps/osf1/netload.c
+++ b/sysdeps/osf1/netload.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_netload = 0;
/* Init function. */
-void
+int
glibtop_init_netload_p (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
@@ -37,7 +37,7 @@ glibtop_init_netload_p (glibtop *server)
/* Provides Network statistics. */
-void
+int
glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/osf1/ppp.c b/sysdeps/osf1/ppp.c
index 6d0905d5..0d682830 100644
--- a/sysdeps/osf1/ppp.c
+++ b/sysdeps/osf1/ppp.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_ppp = 0;
/* Init function. */
-void
+int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -37,7 +37,7 @@ glibtop_init_ppp_s (glibtop *server)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
memset (buf, 0, sizeof (glibtop_ppp));
diff --git a/sysdeps/osf1/procargs.c b/sysdeps/osf1/procargs.c
index 67c183e8..5576c556 100644
--- a/sysdeps/osf1/procargs.c
+++ b/sysdeps/osf1/procargs.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proc_args = 0;
/* Init function. */
-void
+int
glibtop_init_proc_args_p (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/osf1/prockernel.c b/sysdeps/osf1/prockernel.c
index e7d961a1..6f81f537 100644
--- a/sysdeps/osf1/prockernel.c
+++ b/sysdeps/osf1/prockernel.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
/* Init function. */
-void
+int
glibtop_init_proc_kernel_p (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
@@ -39,7 +39,7 @@ glibtop_init_proc_kernel_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/proclist.c b/sysdeps/osf1/proclist.c
index 607aeeae..36f57421 100644
--- a/sysdeps/osf1/proclist.c
+++ b/sysdeps/osf1/proclist.c
@@ -34,7 +34,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
/* Init function. */
-void
+int
glibtop_init_proclist_p (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/osf1/procmap.c b/sysdeps/osf1/procmap.c
index 0b9bd6e0..a6a0c498 100644
--- a/sysdeps/osf1/procmap.c
+++ b/sysdeps/osf1/procmap.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proc_map = 0;
/* Init function. */
-void
+int
glibtop_init_proc_map_p (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/osf1/procmem.c b/sysdeps/osf1/procmem.c
index 05038c5b..81f089dd 100644
--- a/sysdeps/osf1/procmem.c
+++ b/sysdeps/osf1/procmem.c
@@ -41,7 +41,7 @@ static const unsigned long _glibtop_sysdeps_proc_mem =
/* Init function. */
-void
+int
glibtop_init_proc_mem_p (glibtop *server)
{
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
@@ -49,7 +49,7 @@ glibtop_init_proc_mem_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/procsegment.c b/sysdeps/osf1/procsegment.c
index 935a1b0b..cf553cef 100644
--- a/sysdeps/osf1/procsegment.c
+++ b/sysdeps/osf1/procsegment.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_proc_segment =
/* Init function. */
-void
+int
glibtop_init_proc_segment_p (glibtop *server)
{
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
@@ -45,7 +45,7 @@ glibtop_init_proc_segment_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/procsignal.c b/sysdeps/osf1/procsignal.c
index 36e1e2b9..adeb91d2 100644
--- a/sysdeps/osf1/procsignal.c
+++ b/sysdeps/osf1/procsignal.c
@@ -33,7 +33,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Init function. */
-void
+int
glibtop_init_proc_signal_p (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
@@ -41,7 +41,7 @@ glibtop_init_proc_signal_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/procstate.c b/sysdeps/osf1/procstate.c
index 108291c7..698e5bf3 100644
--- a/sysdeps/osf1/procstate.c
+++ b/sysdeps/osf1/procstate.c
@@ -38,7 +38,7 @@ static const unsigned long _glibtop_sysdeps_proc_state =
/* Init function. */
-void
+int
glibtop_init_proc_state_p (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
@@ -46,7 +46,7 @@ glibtop_init_proc_state_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/proctime.c b/sysdeps/osf1/proctime.c
index dc06da42..fbed9547 100644
--- a/sysdeps/osf1/proctime.c
+++ b/sysdeps/osf1/proctime.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_proc_time =
/* Init function. */
-void
+int
glibtop_init_proc_time_p (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
@@ -44,7 +44,7 @@ glibtop_init_proc_time_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/procuid.c b/sysdeps/osf1/procuid.c
index f5ca4636..acf58ade 100644
--- a/sysdeps/osf1/procuid.c
+++ b/sysdeps/osf1/procuid.c
@@ -44,13 +44,13 @@ static const unsigned long _glibtop_sysdeps_proc_uid =
/* Init function. */
-void
+int
glibtop_init_proc_uid_p (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
}
-void
+int
glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
diff --git a/sysdeps/osf1/sem_limits.c b/sysdeps/osf1/sem_limits.c
index c054c3c2..4b1827da 100644
--- a/sysdeps/osf1/sem_limits.c
+++ b/sysdeps/osf1/sem_limits.c
@@ -32,7 +32,7 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Init function. */
-void
+int
glibtop_init_sem_limits_s (glibtop *server)
{
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
@@ -40,7 +40,7 @@ glibtop_init_sem_limits_s (glibtop *server)
/* Provides information about sysv sem limits. */
-void
+int
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
{
int ret, value;
diff --git a/sysdeps/osf1/shm_limits.c b/sysdeps/osf1/shm_limits.c
index 03069205..ae2182ad 100644
--- a/sysdeps/osf1/shm_limits.c
+++ b/sysdeps/osf1/shm_limits.c
@@ -31,7 +31,7 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Init function. */
-void
+int
glibtop_init_shm_limits_s (glibtop *server)
{
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
@@ -39,7 +39,7 @@ glibtop_init_shm_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
{
int ret, value;
diff --git a/sysdeps/osf1/swap.c b/sysdeps/osf1/swap.c
index db322413..e37aecab 100644
--- a/sysdeps/osf1/swap.c
+++ b/sysdeps/osf1/swap.c
@@ -31,7 +31,7 @@ static unsigned long _glibtop_sysdeps_swap =
/* Init function. */
-void
+int
glibtop_init_swap_s (glibtop *server)
{
server->sysdeps.swap = _glibtop_sysdeps_swap;
@@ -39,7 +39,7 @@ glibtop_init_swap_s (glibtop *server)
/* Provides information about swap usage. */
-void
+int
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
struct tbl_swapinfo swapinfo;
diff --git a/sysdeps/osf1/uptime.c b/sysdeps/osf1/uptime.c
index 4e968a1b..09ac41dc 100644
--- a/sysdeps/osf1/uptime.c
+++ b/sysdeps/osf1/uptime.c
@@ -32,7 +32,7 @@ static unsigned long _glibtop_sysdeps_uptime =
/* Init function. */
-void
+int
glibtop_init_uptime_s (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -40,7 +40,7 @@ glibtop_init_uptime_s (glibtop *server)
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
struct tbl_sysinfo sysinfo;
diff --git a/sysdeps/solaris/cpu.c b/sysdeps/solaris/cpu.c
index 5b34e3b9..ea55ab95 100644
--- a/sysdeps/solaris/cpu.c
+++ b/sysdeps/solaris/cpu.c
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Init function. */
-void
+int
glibtop_init_cpu_s (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
@@ -47,7 +47,7 @@ glibtop_init_cpu_s (glibtop *server)
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
kstat_ctl_t *kc = server->machine.kc;
diff --git a/sysdeps/solaris/loadavg.c b/sysdeps/solaris/loadavg.c
index 9f4d4a37..81cb3bf5 100644
--- a/sysdeps/solaris/loadavg.c
+++ b/sysdeps/solaris/loadavg.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Init function. */
-void
+int
glibtop_init_loadavg_s (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -45,7 +45,7 @@ glibtop_init_loadavg_s (glibtop *server)
/* Provides load average. */
-void
+int
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
#ifndef HAVE_GETLOADAVG
diff --git a/sysdeps/solaris/mem.c b/sysdeps/solaris/mem.c
index 50461992..e551403a 100644
--- a/sysdeps/solaris/mem.c
+++ b/sysdeps/solaris/mem.c
@@ -40,7 +40,7 @@ static const unsigned long _glibtop_sysdeps_mem_bunyip =
/* Init function. */
-void
+int
glibtop_init_mem_s (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem_os_sysconf +
@@ -49,7 +49,7 @@ glibtop_init_mem_s (glibtop *server)
/* Provides information about memory usage. */
-void
+int
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
kstat_ctl_t *kc = server->machine.kc;
diff --git a/sysdeps/solaris/msg_limits.c b/sysdeps/solaris/msg_limits.c
index 2614e7d8..aca82113 100644
--- a/sysdeps/solaris/msg_limits.c
+++ b/sysdeps/solaris/msg_limits.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Init function. */
-void
+int
glibtop_init_msg_limits_p (glibtop *server)
{
kvm_t *kd = server->machine.kd;
@@ -49,7 +49,7 @@ glibtop_init_msg_limits_p (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
kvm_t *kd = server->machine.kd;
diff --git a/sysdeps/solaris/netload.c b/sysdeps/solaris/netload.c
index beebedba..9fd3a81d 100644
--- a/sysdeps/solaris/netload.c
+++ b/sysdeps/solaris/netload.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_netload = 0;
/* Init function. */
-void
+int
glibtop_init_netload_s (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
@@ -37,7 +37,7 @@ glibtop_init_netload_s (glibtop *server)
/* Provides network statistics. */
-void
+int
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/solaris/ppp.c b/sysdeps/solaris/ppp.c
index 6d0905d5..0d682830 100644
--- a/sysdeps/solaris/ppp.c
+++ b/sysdeps/solaris/ppp.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_ppp = 0;
/* Init function. */
-void
+int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -37,7 +37,7 @@ glibtop_init_ppp_s (glibtop *server)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
memset (buf, 0, sizeof (glibtop_ppp));
diff --git a/sysdeps/solaris/procargs.c b/sysdeps/solaris/procargs.c
index ac2721d3..7e0bcec5 100644
--- a/sysdeps/solaris/procargs.c
+++ b/sysdeps/solaris/procargs.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_args =
/* Init function. */
-void
+int
glibtop_init_proc_args_s (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/solaris/prockernel.c b/sysdeps/solaris/prockernel.c
index d06f6cab..885f8851 100644
--- a/sysdeps/solaris/prockernel.c
+++ b/sysdeps/solaris/prockernel.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
/* Init function. */
-void
+int
glibtop_init_proc_kernel_s (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
@@ -36,7 +36,7 @@ glibtop_init_proc_kernel_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
diff --git a/sysdeps/solaris/proclist.c b/sysdeps/solaris/proclist.c
index 956ab0a0..e6089cba 100644
--- a/sysdeps/solaris/proclist.c
+++ b/sysdeps/solaris/proclist.c
@@ -38,7 +38,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
/* Init function. */
-void
+int
glibtop_init_proclist_s (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/solaris/procmap.c b/sysdeps/solaris/procmap.c
index daa2ba00..30ef4933 100644
--- a/sysdeps/solaris/procmap.c
+++ b/sysdeps/solaris/procmap.c
@@ -45,7 +45,7 @@ static const unsigned long _glibtop_sysdeps_map_device =
/* Init function. */
-void
+int
glibtop_init_proc_map_s (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/solaris/procmem.c b/sysdeps/solaris/procmem.c
index 6452f0f7..ae9afc47 100644
--- a/sysdeps/solaris/procmem.c
+++ b/sysdeps/solaris/procmem.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proc_mem =
/* Init function. */
-void
+int
glibtop_init_proc_mem_s (glibtop *server)
{
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
@@ -38,7 +38,7 @@ glibtop_init_proc_mem_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
{
#ifdef HAVE_PROCFS_H
diff --git a/sysdeps/solaris/procsegment.c b/sysdeps/solaris/procsegment.c
index b03709d4..cff57511 100644
--- a/sysdeps/solaris/procsegment.c
+++ b/sysdeps/solaris/procsegment.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_segment = 0;
/* Init function. */
-void
+int
glibtop_init_proc_segment_s (glibtop *server)
{
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
@@ -36,7 +36,7 @@ glibtop_init_proc_segment_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/solaris/procsignal.c b/sysdeps/solaris/procsignal.c
index 5b4d06a7..1096a57c 100644
--- a/sysdeps/solaris/procsignal.c
+++ b/sysdeps/solaris/procsignal.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Init function. */
-void
+int
glibtop_init_proc_signal_s (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
@@ -39,7 +39,7 @@ glibtop_init_proc_signal_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
diff --git a/sysdeps/solaris/procstate.c b/sysdeps/solaris/procstate.c
index 98ef2fdf..dd10e802 100644
--- a/sysdeps/solaris/procstate.c
+++ b/sysdeps/solaris/procstate.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_proc_state =
/* Init function. */
-void
+int
glibtop_init_proc_state_s (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
@@ -45,7 +45,7 @@ glibtop_init_proc_state_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
{
#ifdef HAVE_PROCFS_H
diff --git a/sysdeps/solaris/proctime.c b/sysdeps/solaris/proctime.c
index 6fef5169..9e9bf001 100644
--- a/sysdeps/solaris/proctime.c
+++ b/sysdeps/solaris/proctime.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_proc_time =
/* Init function. */
-void
+int
glibtop_init_proc_time_s (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
@@ -40,7 +40,7 @@ glibtop_init_proc_time_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/solaris/procuid.c b/sysdeps/solaris/procuid.c
index 9238e88b..cf33e84f 100644
--- a/sysdeps/solaris/procuid.c
+++ b/sysdeps/solaris/procuid.c
@@ -41,7 +41,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid_prcred =
(1L << GLIBTOP_PROC_UID_NGROUPS);
/* Init function. */
-void
+int
glibtop_init_proc_uid_s (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid_psinfo +
@@ -50,7 +50,7 @@ glibtop_init_proc_uid_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
{
struct prcred prcred;
diff --git a/sysdeps/solaris/sem_limits.c b/sysdeps/solaris/sem_limits.c
index c7927638..2b156452 100644
--- a/sysdeps/solaris/sem_limits.c
+++ b/sysdeps/solaris/sem_limits.c
@@ -37,7 +37,7 @@ static const unsigned long _glibtop_sysdeps_sem_limits =
/* Init function. */
-void
+int
glibtop_init_sem_limits_p (glibtop *server)
{
kvm_t *kd = server->machine.kd;
@@ -50,7 +50,7 @@ glibtop_init_sem_limits_p (glibtop *server)
/* Provides information about sysv sem limits. */
-void
+int
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
kvm_t *kd = server->machine.kd;
diff --git a/sysdeps/solaris/shm_limits.c b/sysdeps/solaris/shm_limits.c
index 24854b33..3fd8dd1c 100644
--- a/sysdeps/solaris/shm_limits.c
+++ b/sysdeps/solaris/shm_limits.c
@@ -34,7 +34,7 @@ static const unsigned long _glibtop_sysdeps_shm_limits =
/* Init function. */
-void
+int
glibtop_init_shm_limits_p (glibtop *server)
{
kvm_t *kd = server->machine.kd;
@@ -47,7 +47,7 @@ glibtop_init_shm_limits_p (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
kvm_t *kd = server->machine.kd;
diff --git a/sysdeps/solaris/swap.c b/sysdeps/solaris/swap.c
index b2e4721d..2f9c591d 100644
--- a/sysdeps/solaris/swap.c
+++ b/sysdeps/solaris/swap.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_swap =
/* Init function. */
-void
+int
glibtop_init_swap_s (glibtop *server)
{
server->sysdeps.swap = _glibtop_sysdeps_swap;
@@ -44,7 +44,7 @@ glibtop_init_swap_s (glibtop *server)
/* Provides information about swap usage. */
-void
+int
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
kstat_ctl_t *kc = server->machine.kc;
diff --git a/sysdeps/solaris/uptime.c b/sysdeps/solaris/uptime.c
index 5c313e9e..1891adfd 100644
--- a/sysdeps/solaris/uptime.c
+++ b/sysdeps/solaris/uptime.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_uptime =
/* Init function. */
-void
+int
glibtop_init_uptime_s (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -39,7 +39,7 @@ glibtop_init_uptime_s (glibtop *server)
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
memset (buf, 0, sizeof (glibtop_uptime));
diff --git a/sysdeps/stub/cpu.c b/sysdeps/stub/cpu.c
index 3ddfdfb8..982e2ec8 100644
--- a/sysdeps/stub/cpu.c
+++ b/sysdeps/stub/cpu.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_cpu = 0;
/* Init function. */
-void
+int
glibtop_init_cpu_s (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
@@ -36,7 +36,7 @@ glibtop_init_cpu_s (glibtop *server)
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
memset (buf, 0, sizeof (glibtop_cpu));
diff --git a/sysdeps/stub/loadavg.c b/sysdeps/stub/loadavg.c
index 9bf900f5..d85a1437 100644
--- a/sysdeps/stub/loadavg.c
+++ b/sysdeps/stub/loadavg.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_loadavg = 0;
/* Init function. */
-void
+int
glibtop_init_loadavg_s (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -36,7 +36,7 @@ glibtop_init_loadavg_s (glibtop *server)
/* Provides load averange. */
-void
+int
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
memset (buf, 0, sizeof (glibtop_loadavg));
diff --git a/sysdeps/stub/mem.c b/sysdeps/stub/mem.c
index 8a2c31a5..f6e22e5d 100644
--- a/sysdeps/stub/mem.c
+++ b/sysdeps/stub/mem.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_mem = 0;
/* Init function. */
-void
+int
glibtop_init_mem_s (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem;
@@ -36,7 +36,7 @@ glibtop_init_mem_s (glibtop *server)
/* Provides information about memory usage. */
-void
+int
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
memset (buf, 0, sizeof (glibtop_mem));
diff --git a/sysdeps/stub/msg_limits.c b/sysdeps/stub/msg_limits.c
index adee0dae..af59729f 100644
--- a/sysdeps/stub/msg_limits.c
+++ b/sysdeps/stub/msg_limits.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits = 0;
/* Init function. */
-void
+int
glibtop_init_msg_limits_s (glibtop *server)
{
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
@@ -36,7 +36,7 @@ glibtop_init_msg_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
{
memset (buf, 0, sizeof (glibtop_msg_limits));
diff --git a/sysdeps/stub/netload.c b/sysdeps/stub/netload.c
index beebedba..9fd3a81d 100644
--- a/sysdeps/stub/netload.c
+++ b/sysdeps/stub/netload.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_netload = 0;
/* Init function. */
-void
+int
glibtop_init_netload_s (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
@@ -37,7 +37,7 @@ glibtop_init_netload_s (glibtop *server)
/* Provides network statistics. */
-void
+int
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/stub/ppp.c b/sysdeps/stub/ppp.c
index 6d0905d5..0d682830 100644
--- a/sysdeps/stub/ppp.c
+++ b/sysdeps/stub/ppp.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_ppp = 0;
/* Init function. */
-void
+int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -37,7 +37,7 @@ glibtop_init_ppp_s (glibtop *server)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
memset (buf, 0, sizeof (glibtop_ppp));
diff --git a/sysdeps/stub/procargs.c b/sysdeps/stub/procargs.c
index 7d010d5e..e2160d51 100644
--- a/sysdeps/stub/procargs.c
+++ b/sysdeps/stub/procargs.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proc_args = 0;
/* Init function. */
-void
+int
glibtop_init_proc_args_s (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/stub/prockernel.c b/sysdeps/stub/prockernel.c
index d06f6cab..885f8851 100644
--- a/sysdeps/stub/prockernel.c
+++ b/sysdeps/stub/prockernel.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
/* Init function. */
-void
+int
glibtop_init_proc_kernel_s (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
@@ -36,7 +36,7 @@ glibtop_init_proc_kernel_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/proclist.c b/sysdeps/stub/proclist.c
index 7794cdba..830f8fb9 100644
--- a/sysdeps/stub/proclist.c
+++ b/sysdeps/stub/proclist.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proclist = 0;
/* Init function. */
-void
+int
glibtop_init_proclist_s (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/stub/procmap.c b/sysdeps/stub/procmap.c
index 5a6c479a..2744feb0 100644
--- a/sysdeps/stub/procmap.c
+++ b/sysdeps/stub/procmap.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_map = 0;
/* Init function. */
-void
+int
glibtop_init_proc_map_s (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/stub/procmem.c b/sysdeps/stub/procmem.c
index ab0c4170..310c3657 100644
--- a/sysdeps/stub/procmem.c
+++ b/sysdeps/stub/procmem.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_mem = 0;
/* Init function. */
-void
+int
glibtop_init_proc_mem_s (glibtop *server)
{
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
@@ -36,7 +36,7 @@ glibtop_init_proc_mem_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/procsegment.c b/sysdeps/stub/procsegment.c
index b03709d4..cff57511 100644
--- a/sysdeps/stub/procsegment.c
+++ b/sysdeps/stub/procsegment.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_segment = 0;
/* Init function. */
-void
+int
glibtop_init_proc_segment_s (glibtop *server)
{
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
@@ -36,7 +36,7 @@ glibtop_init_proc_segment_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/procsignal.c b/sysdeps/stub/procsignal.c
index 540960f5..dc7db28c 100644
--- a/sysdeps/stub/procsignal.c
+++ b/sysdeps/stub/procsignal.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal = 0;
/* Init function. */
-void
+int
glibtop_init_proc_signal_s (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
@@ -36,7 +36,7 @@ glibtop_init_proc_signal_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/procstate.c b/sysdeps/stub/procstate.c
index 227f52ee..9dc0e5a3 100644
--- a/sysdeps/stub/procstate.c
+++ b/sysdeps/stub/procstate.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_state = 0;
/* Init function. */
-void
+int
glibtop_init_proc_state_s (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
@@ -36,7 +36,7 @@ glibtop_init_proc_state_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/proctime.c b/sysdeps/stub/proctime.c
index 4c060235..374849ff 100644
--- a/sysdeps/stub/proctime.c
+++ b/sysdeps/stub/proctime.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_time = 0;
/* Init function. */
-void
+int
glibtop_init_proc_time_s (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
@@ -36,7 +36,7 @@ glibtop_init_proc_time_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/procuid.c b/sysdeps/stub/procuid.c
index f9f68311..498790a1 100644
--- a/sysdeps/stub/procuid.c
+++ b/sysdeps/stub/procuid.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid = 0;
/* Init function. */
-void
+int
glibtop_init_proc_uid_s (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
@@ -36,7 +36,7 @@ glibtop_init_proc_uid_s (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
diff --git a/sysdeps/stub/sem_limits.c b/sysdeps/stub/sem_limits.c
index 474ce8c7..5c45abe0 100644
--- a/sysdeps/stub/sem_limits.c
+++ b/sysdeps/stub/sem_limits.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_sem_limits = 0;
/* Init function. */
-void
+int
glibtop_init_sem_limits_s (glibtop *server)
{
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
@@ -36,7 +36,7 @@ glibtop_init_sem_limits_s (glibtop *server)
/* Provides information about sysv sem limits. */
-void
+int
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
{
memset (buf, 0, sizeof (glibtop_sem_limits));
diff --git a/sysdeps/stub/shm_limits.c b/sysdeps/stub/shm_limits.c
index 8a024b4a..7ccd807e 100644
--- a/sysdeps/stub/shm_limits.c
+++ b/sysdeps/stub/shm_limits.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_shm_limits = 0;
/* Init function. */
-void
+int
glibtop_init_shm_limits_s (glibtop *server)
{
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
@@ -36,7 +36,7 @@ glibtop_init_shm_limits_s (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
{
memset (buf, 0, sizeof (glibtop_shm_limits));
diff --git a/sysdeps/stub/swap.c b/sysdeps/stub/swap.c
index 4731b8e3..eca227f3 100644
--- a/sysdeps/stub/swap.c
+++ b/sysdeps/stub/swap.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_swap = 0;
/* Init function. */
-void
+int
glibtop_init_swap_s (glibtop *server)
{
server->sysdeps.swap = _glibtop_sysdeps_swap;
@@ -36,7 +36,7 @@ glibtop_init_swap_s (glibtop *server)
/* Provides information about swap usage. */
-void
+int
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
memset (buf, 0, sizeof (glibtop_swap));
diff --git a/sysdeps/stub/uptime.c b/sysdeps/stub/uptime.c
index a6189448..8b346e5e 100644
--- a/sysdeps/stub/uptime.c
+++ b/sysdeps/stub/uptime.c
@@ -28,7 +28,7 @@ static const unsigned long _glibtop_sysdeps_uptime = 0;
/* Init function. */
-void
+int
glibtop_init_uptime_s (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -36,7 +36,7 @@ glibtop_init_uptime_s (glibtop *server)
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
memset (buf, 0, sizeof (glibtop_uptime));
diff --git a/sysdeps/stub_suid/cpu.c b/sysdeps/stub_suid/cpu.c
index 7f05c827..420a799f 100644
--- a/sysdeps/stub_suid/cpu.c
+++ b/sysdeps/stub_suid/cpu.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_cpu = 0;
/* Init function. */
-void
+int
glibtop_init_cpu_p (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
@@ -39,7 +39,7 @@ glibtop_init_cpu_p (glibtop *server)
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_CPU, 0);
diff --git a/sysdeps/stub_suid/loadavg.c b/sysdeps/stub_suid/loadavg.c
index 6118d614..63fc9fd9 100644
--- a/sysdeps/stub_suid/loadavg.c
+++ b/sysdeps/stub_suid/loadavg.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_loadavg = 0;
/* Init function. */
-void
+int
glibtop_init_loadavg_p (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
@@ -39,7 +39,7 @@ glibtop_init_loadavg_p (glibtop *server)
/* Provides load averange. */
-void
+int
glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_LOADAVG, 0);
diff --git a/sysdeps/stub_suid/mem.c b/sysdeps/stub_suid/mem.c
index 85c4fc5d..d5a86e61 100644
--- a/sysdeps/stub_suid/mem.c
+++ b/sysdeps/stub_suid/mem.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_mem = 0;
/* Init function. */
-void
+int
glibtop_init_mem_p (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem;
@@ -39,7 +39,7 @@ glibtop_init_mem_p (glibtop *server)
/* Provides information about memory usage. */
-void
+int
glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_MEM, 0);
diff --git a/sysdeps/stub_suid/msg_limits.c b/sysdeps/stub_suid/msg_limits.c
index 7a2b8f93..01f9298f 100644
--- a/sysdeps/stub_suid/msg_limits.c
+++ b/sysdeps/stub_suid/msg_limits.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits = 0;
/* Init function. */
-void
+int
glibtop_init_msg_limits_p (glibtop *server)
{
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
@@ -39,7 +39,7 @@ glibtop_init_msg_limits_p (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
diff --git a/sysdeps/stub_suid/netload.c b/sysdeps/stub_suid/netload.c
index bb1226ed..573066be 100644
--- a/sysdeps/stub_suid/netload.c
+++ b/sysdeps/stub_suid/netload.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_netload = 0;
/* Init function. */
-void
+int
glibtop_init_netload_p (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
@@ -37,7 +37,7 @@ glibtop_init_netload_p (glibtop *server)
/* Provides Network statistics. */
-void
+int
glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
const char *interface)
{
diff --git a/sysdeps/stub_suid/ppp.c b/sysdeps/stub_suid/ppp.c
index 67d01fcf..41c38950 100644
--- a/sysdeps/stub_suid/ppp.c
+++ b/sysdeps/stub_suid/ppp.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_ppp = 0;
/* Init function. */
-void
+int
glibtop_init_ppp_p (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -37,7 +37,7 @@ glibtop_init_ppp_p (glibtop *server)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
memset (buf, 0, sizeof (glibtop_ppp));
diff --git a/sysdeps/stub_suid/procargs.c b/sysdeps/stub_suid/procargs.c
index 67c183e8..5576c556 100644
--- a/sysdeps/stub_suid/procargs.c
+++ b/sysdeps/stub_suid/procargs.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proc_args = 0;
/* Init function. */
-void
+int
glibtop_init_proc_args_p (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
diff --git a/sysdeps/stub_suid/prockernel.c b/sysdeps/stub_suid/prockernel.c
index e7d961a1..6f81f537 100644
--- a/sysdeps/stub_suid/prockernel.c
+++ b/sysdeps/stub_suid/prockernel.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
/* Init function. */
-void
+int
glibtop_init_proc_kernel_p (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
@@ -39,7 +39,7 @@ glibtop_init_proc_kernel_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/proclist.c b/sysdeps/stub_suid/proclist.c
index 908dadb9..a17b77c8 100644
--- a/sysdeps/stub_suid/proclist.c
+++ b/sysdeps/stub_suid/proclist.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proclist = 0;
/* Init function. */
-void
+int
glibtop_init_proclist_p (glibtop *server)
{
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
diff --git a/sysdeps/stub_suid/procmap.c b/sysdeps/stub_suid/procmap.c
index 0b9bd6e0..a6a0c498 100644
--- a/sysdeps/stub_suid/procmap.c
+++ b/sysdeps/stub_suid/procmap.c
@@ -30,7 +30,7 @@ static const unsigned long _glibtop_sysdeps_proc_map = 0;
/* Init function. */
-void
+int
glibtop_init_proc_map_p (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
diff --git a/sysdeps/stub_suid/procmem.c b/sysdeps/stub_suid/procmem.c
index 6084aa66..caded400 100644
--- a/sysdeps/stub_suid/procmem.c
+++ b/sysdeps/stub_suid/procmem.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_mem = 0;
/* Init function. */
-void
+int
glibtop_init_proc_mem_p (glibtop *server)
{
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
@@ -39,7 +39,7 @@ glibtop_init_proc_mem_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/procsegment.c b/sysdeps/stub_suid/procsegment.c
index 38499f83..a4205a7a 100644
--- a/sysdeps/stub_suid/procsegment.c
+++ b/sysdeps/stub_suid/procsegment.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_segment = 0;
/* Init function. */
-void
+int
glibtop_init_proc_segment_p (glibtop *server)
{
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
@@ -39,7 +39,7 @@ glibtop_init_proc_segment_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/procsignal.c b/sysdeps/stub_suid/procsignal.c
index 9a89e8ab..ff3fae67 100644
--- a/sysdeps/stub_suid/procsignal.c
+++ b/sysdeps/stub_suid/procsignal.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal = 0;
/* Init function. */
-void
+int
glibtop_init_proc_signal_p (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
@@ -39,7 +39,7 @@ glibtop_init_proc_signal_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/procstate.c b/sysdeps/stub_suid/procstate.c
index 576889c1..5f3536da 100644
--- a/sysdeps/stub_suid/procstate.c
+++ b/sysdeps/stub_suid/procstate.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_state = 0;
/* Init function. */
-void
+int
glibtop_init_proc_state_p (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
@@ -39,7 +39,7 @@ glibtop_init_proc_state_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/proctime.c b/sysdeps/stub_suid/proctime.c
index bc6c6c09..e73b4202 100644
--- a/sysdeps/stub_suid/proctime.c
+++ b/sysdeps/stub_suid/proctime.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_time = 0;
/* Init function. */
-void
+int
glibtop_init_proc_time_p (glibtop *server)
{
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
@@ -39,7 +39,7 @@ glibtop_init_proc_time_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/procuid.c b/sysdeps/stub_suid/procuid.c
index e487375e..b0cdd67f 100644
--- a/sysdeps/stub_suid/procuid.c
+++ b/sysdeps/stub_suid/procuid.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid = 0;
/* Init function. */
-void
+int
glibtop_init_proc_uid_p (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
@@ -39,7 +39,7 @@ glibtop_init_proc_uid_p (glibtop *server)
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
diff --git a/sysdeps/stub_suid/sem_limits.c b/sysdeps/stub_suid/sem_limits.c
index b1aa85cd..2a7d40e1 100644
--- a/sysdeps/stub_suid/sem_limits.c
+++ b/sysdeps/stub_suid/sem_limits.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_sem_limits = 0;
/* Init function. */
-void
+int
glibtop_init_sem_limits_p (glibtop *server)
{
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
@@ -39,7 +39,7 @@ glibtop_init_sem_limits_p (glibtop *server)
/* Provides information about sysv sem limits. */
-void
+int
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0);
diff --git a/sysdeps/stub_suid/shm_limits.c b/sysdeps/stub_suid/shm_limits.c
index 9aa3574c..289b3e75 100644
--- a/sysdeps/stub_suid/shm_limits.c
+++ b/sysdeps/stub_suid/shm_limits.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_shm_limits = 0;
/* Init function. */
-void
+int
glibtop_init_shm_limits_p (glibtop *server)
{
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
@@ -39,7 +39,7 @@ glibtop_init_shm_limits_p (glibtop *server)
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0);
diff --git a/sysdeps/stub_suid/swap.c b/sysdeps/stub_suid/swap.c
index 2c97ebc6..5233cc5d 100644
--- a/sysdeps/stub_suid/swap.c
+++ b/sysdeps/stub_suid/swap.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_swap = 0;
/* Init function. */
-void
+int
glibtop_init_swap_p (glibtop *server)
{
server->sysdeps.swap = _glibtop_sysdeps_swap;
@@ -39,7 +39,7 @@ glibtop_init_swap_p (glibtop *server)
/* Provides information about swap usage. */
-void
+int
glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_SWAP, 0);
diff --git a/sysdeps/stub_suid/uptime.c b/sysdeps/stub_suid/uptime.c
index 76a1d5b6..1067541f 100644
--- a/sysdeps/stub_suid/uptime.c
+++ b/sysdeps/stub_suid/uptime.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_uptime = 0;
/* Init function. */
-void
+int
glibtop_init_uptime_p (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
@@ -39,7 +39,7 @@ glibtop_init_uptime_p (glibtop *server)
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_UPTIME, 0);
diff --git a/sysdeps/sun4/cpu.c b/sysdeps/sun4/cpu.c
index a0f40b1e..8621f0fd 100644
--- a/sysdeps/sun4/cpu.c
+++ b/sysdeps/sun4/cpu.c
@@ -33,7 +33,7 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Provides information about cpu usage. */
-void
+int
glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
{
long cp_time [CPUSTATES], mp_time [NCPU][CPUSTATES];
diff --git a/sysdeps/sun4/loadavg.c b/sysdeps/sun4/loadavg.c
index 6b36e9eb..3ae42100 100644
--- a/sysdeps/sun4/loadavg.c
+++ b/sysdeps/sun4/loadavg.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Provides load averange. */
-void
+int
glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
{
load_avg avenrun [3];
diff --git a/sysdeps/sun4/mem.c b/sysdeps/sun4/mem.c
index b83b8200..9362eaa2 100644
--- a/sysdeps/sun4/mem.c
+++ b/sysdeps/sun4/mem.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Provides information about memory usage. */
-void
+int
glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MEM), 0);
diff --git a/sysdeps/sun4/msg_limits.c b/sysdeps/sun4/msg_limits.c
index 6af95b6b..a2e4b87e 100644
--- a/sysdeps/sun4/msg_limits.c
+++ b/sysdeps/sun4/msg_limits.c
@@ -40,7 +40,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
struct msginfo msginfo;
diff --git a/sysdeps/sun4/ppp.c b/sysdeps/sun4/ppp.c
index 6d0905d5..0d682830 100644
--- a/sysdeps/sun4/ppp.c
+++ b/sysdeps/sun4/ppp.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_ppp = 0;
/* Init function. */
-void
+int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
@@ -37,7 +37,7 @@ glibtop_init_ppp_s (glibtop *server)
/* Provides PPP/ISDN information. */
-void
+int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
memset (buf, 0, sizeof (glibtop_ppp));
diff --git a/sysdeps/sun4/prockernel.c b/sysdeps/sun4/prockernel.c
index 1b350d8a..378d8d12 100644
--- a/sysdeps/sun4/prockernel.c
+++ b/sysdeps/sun4/prockernel.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_kernel =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/procmem.c b/sysdeps/sun4/procmem.c
index d9fa2233..86e22123 100644
--- a/sysdeps/sun4/procmem.c
+++ b/sysdeps/sun4/procmem.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_proc_mem =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/procsegment.c b/sysdeps/sun4/procsegment.c
index a0a91c6d..b0a4cc32 100644
--- a/sysdeps/sun4/procsegment.c
+++ b/sysdeps/sun4/procsegment.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_proc_segment =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/procsignal.c b/sysdeps/sun4/procsignal.c
index 3aa48cc2..c09166cb 100644
--- a/sysdeps/sun4/procsignal.c
+++ b/sysdeps/sun4/procsignal.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/procstate.c b/sysdeps/sun4/procstate.c
index 5e8bcdaa..e6635bd1 100644
--- a/sysdeps/sun4/procstate.c
+++ b/sysdeps/sun4/procstate.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_state =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/proctime.c b/sysdeps/sun4/proctime.c
index e2a77689..9f44a878 100644
--- a/sysdeps/sun4/proctime.c
+++ b/sysdeps/sun4/proctime.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_proc_time =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/procuid.c b/sysdeps/sun4/procuid.c
index fd0e3af7..f8a8dec8 100644
--- a/sysdeps/sun4/procuid.c
+++ b/sysdeps/sun4/procuid.c
@@ -35,7 +35,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid =
/* Provides detailed information about a process. */
-void
+int
glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
diff --git a/sysdeps/sun4/sem_limits.c b/sysdeps/sun4/sem_limits.c
index 7c4825c6..d956b0f0 100644
--- a/sysdeps/sun4/sem_limits.c
+++ b/sysdeps/sun4/sem_limits.c
@@ -42,7 +42,7 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Provides information about sysv sem limits. */
-void
+int
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
struct seminfo seminfo;
diff --git a/sysdeps/sun4/shm_limits.c b/sysdeps/sun4/shm_limits.c
index fe622242..249dd414 100644
--- a/sysdeps/sun4/shm_limits.c
+++ b/sysdeps/sun4/shm_limits.c
@@ -40,7 +40,7 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Provides information about sysv ipc limits. */
-void
+int
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
struct shminfo shminfo;
diff --git a/sysdeps/sun4/swap.c b/sysdeps/sun4/swap.c
index fd90ad15..d15202d6 100644
--- a/sysdeps/sun4/swap.c
+++ b/sysdeps/sun4/swap.c
@@ -28,7 +28,7 @@
/* Provides information about swap usage. */
-void
+int
glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SWAP), 0);
diff --git a/sysdeps/sun4/uptime.c b/sysdeps/sun4/uptime.c
index 2b89afcc..7148f935 100644
--- a/sysdeps/sun4/uptime.c
+++ b/sysdeps/sun4/uptime.c
@@ -32,7 +32,7 @@ static const unsigned long _glibtop_sysdeps_uptime =
/* Provides uptime and idle time. */
-void
+int
glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
{
glibtop_cpu cpu;