Reflect latest interface changes.

This commit is contained in:
Martin Baulig
1999-12-18 18:11:27 +00:00
parent 9b245d8113
commit a0056665ae
23 changed files with 349 additions and 110 deletions

View File

@@ -35,6 +35,8 @@ int
glibtop_init_loadavg_s (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
return 0;
}
/* Provides load averange. */
@@ -43,15 +45,19 @@ int
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
libgtop_stat_t stat;
int retval;
memset (buf, 0, sizeof (glibtop_loadavg));
if (glibtop_get_proc_data_stat_s (server, &stat))
return;
retval = glibtop_get_proc_data_stat_s (server, &stat);
if (retval)
return retval;
buf->loadavg [0] = stat.loadavg [0];
buf->loadavg [1] = stat.loadavg [1];
buf->loadavg [2] = stat.loadavg [2];
buf->flags = _glibtop_sysdeps_loadavg;
return 0;
}