[libgtop] Two small tweaks to the OpenBSD backend: - correct sysctl names in two warning messages - rename a f



commit 4e24854dbf648efb9fa18e6249af3dbb4107efd4
Author: Jasper Lievisse Adriaanse <jasper humppa nl>
Date:   Sat Jul 9 10:19:18 2011 +0200

    Two small tweaks to the OpenBSD backend:
    - correct sysctl names in two warning messages
    - rename a few variables for clarity

 sysdeps/openbsd/mem.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/sysdeps/openbsd/mem.c b/sysdeps/openbsd/mem.c
index 3d90b97..dd9cb04 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;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]