summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@humppa.nl>2011-07-09 10:19:18 +0200
committerJasper Lievisse Adriaanse <jasper@humppa.nl>2011-07-09 10:19:18 +0200
commit4e24854dbf648efb9fa18e6249af3dbb4107efd4 (patch)
treebd99cb7dd11182e2c16f6fde3f4e42d699a0abac
parent08fd95d2536d95776e89c6d0e4fe0b6938d8112d (diff)
downloadlibgtop-4e24854dbf648efb9fa18e6249af3dbb4107efd4.tar.gz
Two small tweaks to the OpenBSD backend:
- correct sysctl names in two warning messages - rename a few variables for clarity
-rw-r--r--sysdeps/openbsd/mem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/openbsd/mem.c b/sysdeps/openbsd/mem.c
index 3d90b97f..dd9cb047 100644
--- a/sysdeps/openbsd/mem.c
+++ b/sysdeps/openbsd/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.8 2011/05/26 08:07:22 jasper Exp $ */
+/* $OpenBSD: mem.c,v 1.9 2011/07/09 08:04:14 jasper Exp $ */
/* Copyright (C) 1998 Joshua Sled
This file is part of LibGTop 1.0.
@@ -57,8 +57,8 @@ static struct nlist nlst [] = {
};
/* MIB array for sysctl */
-static int mib [] = { CTL_VM, VM_METER };
-static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
+static int vmmeter_mib [] = { CTL_VM, VM_METER };
+static int uvmexp_mib [] = { CTL_VM, VM_UVMEXP };
/* Init function. */
@@ -106,14 +106,14 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
/* Get the data from sysctl */
length_vmt = sizeof (vmt);
- if (sysctl (mib, 2, &vmt, &length_vmt, NULL, 0)) {
- glibtop_warn_io_r (server, "sysctl (vm.meter)");
+ if (sysctl (vmmeter_mib, 2, &vmt, &length_vmt, NULL, 0)) {
+ glibtop_warn_io_r (server, "sysctl (vm.vmmeter)");
return;
}
length_uvmexp = sizeof (uvmexp);
- if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
- glibtop_warn_io_r (server, "sysctl (uvmexp)");
+ if (sysctl (uvmexp_mib, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
+ glibtop_warn_io_r (server, "sysctl (vm.uvmexp)");
return;
}