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:
@@ -48,12 +48,6 @@ static int pageshift; /* log base 2 of the pagesize */
|
||||
/* define pagetok in terms of pageshift */
|
||||
#define pagetok(size) ((size) << pageshift)
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
{ "_bufpages" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* MIB array for sysctl */
|
||||
static int vmmeter_mib [] = { CTL_VM, VM_METER };
|
||||
static int uvmexp_mib [] = { CTL_VM, VM_UVMEXP };
|
||||
@@ -62,15 +56,10 @@ static int bcstats_mib [] = { CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT };
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_mem_p (glibtop *server)
|
||||
_glibtop_init_mem_s (glibtop *server)
|
||||
{
|
||||
register int pagesize;
|
||||
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (mem)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* get the page size and calculate pageshift from it */
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
pageshift = 0;
|
||||
@@ -86,7 +75,7 @@ _glibtop_init_mem_p (glibtop *server)
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
|
||||
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||
{
|
||||
struct vmtotal vmt;
|
||||
struct uvmexp uvmexp;
|
||||
|
Reference in New Issue
Block a user