summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-02-09 15:10:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-02-09 15:10:59 +0000
commit1b7b828bcba3260462511a413dc672cb8a4db98e (patch)
tree93cd4b2ddec508eb6d2c400cb0f68c98ba89b32a /sbin
parent5d86d618d3c3b175f9627d4f59c408c6f1cfe9f2 (diff)
Introduce HW_PHYSMEM64 and HW_USERMEM64 sysctls, which don't overflow on
machines with more than 4GB of memory. Make sysctl(8) print values obtained using these sysctls for hw.physmem and hw.usermem. ok krw@, miod@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/sysctl/sysctl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index f860888531d..66c28433fa0 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.154 2007/12/14 18:34:26 deraadt Exp $ */
+/* $OpenBSD: sysctl.c,v 1.155 2008/02/09 15:10:58 kettenis Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -40,7 +40,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95";
#else
-static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.154 2007/12/14 18:34:26 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.155 2008/02/09 15:10:58 kettenis Exp $";
#endif
#endif /* not lint */
@@ -467,8 +467,11 @@ parse(char *string, int flags)
break;
case HW_PHYSMEM:
case HW_USERMEM:
- special |= UNSIGNED;
- break;
+ /*
+ * Don't print these; we'll print the 64-bit
+ * variants instead.
+ */
+ return;
}
break;