diff options
author | Martin Baulig <martin@home-of-linux.org> | 1999-10-24 19:09:32 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1999-10-24 19:09:32 +0000 |
commit | a5dd7e90637581d2e7dbfe6cc479d419971eff5c (patch) | |
tree | 9320e8bca16886c8bdbda21ef19a960765baae8b /sysdeps | |
parent | eae892c9b117e274b64426de837ae9e30e6cf383 (diff) | |
download | libgtop-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.
Diffstat (limited to 'sysdeps')
157 files changed, 283 insertions, 283 deletions
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; |