Reflect latest interface changes.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user