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

@@ -43,6 +43,8 @@ int
glibtop_init_cpu_s (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
return 0;
}
/* Provides information about cpu usage. */
@@ -59,7 +61,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
memset (buf, 0, sizeof (glibtop_cpu));
if(!kc)
return;
return -GLIBTOP_ERROR_INCOMPATIBLE_KERNEL;
switch(kstat_chain_update(kc))
{
case -1: assert(0); /* Debugging purposes, shouldn't happen */
@@ -103,4 +105,6 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->frequency = server->_priv->machine.ticks;
buf->flags = _glibtop_sysdeps_cpu;
return 0;
}