Reflect latest interface changes; especially all functions now return

appropriate error return values on error.
This commit is contained in:
Martin Baulig
1999-12-25 18:54:52 +00:00
parent 1979cb8104
commit dbb5f9b636
8 changed files with 49 additions and 16 deletions

View File

@@ -45,6 +45,8 @@ glibtop_init_mem_s (glibtop *server)
{
server->sysdeps.mem = _glibtop_sysdeps_mem_os_sysconf +
_glibtop_sysdeps_mem_os_kstat + _glibtop_sysdeps_mem_bunyip;
return 0;
}
/* Provides information about memory usage. */
@@ -67,7 +69,7 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
buf->flags = _glibtop_sysdeps_mem_os_sysconf;
if(!kc)
return;
return -GLIBTOP_ERROR_INCOMPATIBLE_KERNEL;
switch(kstat_chain_update(kc))
{
case -1: assert(0); /* Debugging purposes, shouldn't happen */
@@ -124,4 +126,6 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
#endif
buf->flags += _glibtop_sysdeps_mem_bunyip;
}
return 0;
}