openbsd: merge patches from ports tree
Bring OpenBSD closer to FreeBSD to help checking what is missing/different. Also we make sure to use and build mountlist and fsusage from the sysdeps/openbsd directory instead of the common one. https://bugzilla.gnome.org/show_bug.cgi?id=723521
This commit is contained in:
@@ -37,7 +37,7 @@ static const unsigned long _required_cpu_flags =
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_uptime_p (glibtop *server)
|
||||
_glibtop_init_uptime_s (glibtop *server)
|
||||
{
|
||||
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ _glibtop_init_uptime_p (glibtop *server)
|
||||
/* Provides uptime and idle time. */
|
||||
|
||||
void
|
||||
glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
|
||||
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||
{
|
||||
time_t now;
|
||||
int mib[2];
|
||||
@@ -63,7 +63,7 @@ glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
|
||||
buf->boot_time = boottime.tv_sec;
|
||||
}
|
||||
|
||||
glibtop_get_cpu_p (server, &cpu);
|
||||
glibtop_get_cpu_s (server, &cpu);
|
||||
|
||||
/* Put something clever in buf->idletime: CP_IDLE. */
|
||||
buf->idletime = (double) cpu.idle / (double) cpu.frequency;
|
||||
|
Reference in New Issue
Block a user