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.
This commit is contained in:
Martin Baulig
1999-10-24 19:09:32 +00:00
committed by Martin Baulig
parent eae892c9b1
commit a5dd7e9063
180 changed files with 403 additions and 394 deletions

View File

@@ -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];

View File

@@ -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];

View File

@@ -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);

View File

@@ -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;

View File

@@ -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));

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;