summaryrefslogtreecommitdiff
path: root/sysdeps/stub
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 /sysdeps/stub
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.
Diffstat (limited to 'sysdeps/stub')
-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
20 files changed, 37 insertions, 37 deletions
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));