summaryrefslogtreecommitdiff
path: root/sysdeps/sun4
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/sun4
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/sun4')
-rw-r--r--sysdeps/sun4/cpu.c2
-rw-r--r--sysdeps/sun4/loadavg.c2
-rw-r--r--sysdeps/sun4/mem.c2
-rw-r--r--sysdeps/sun4/msg_limits.c2
-rw-r--r--sysdeps/sun4/ppp.c4
-rw-r--r--sysdeps/sun4/prockernel.c2
-rw-r--r--sysdeps/sun4/procmem.c2
-rw-r--r--sysdeps/sun4/procsegment.c2
-rw-r--r--sysdeps/sun4/procsignal.c2
-rw-r--r--sysdeps/sun4/procstate.c2
-rw-r--r--sysdeps/sun4/proctime.c2
-rw-r--r--sysdeps/sun4/procuid.c2
-rw-r--r--sysdeps/sun4/sem_limits.c2
-rw-r--r--sysdeps/sun4/shm_limits.c2
-rw-r--r--sysdeps/sun4/swap.c2
-rw-r--r--sysdeps/sun4/uptime.c2
16 files changed, 17 insertions, 17 deletions
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;