summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c3
-rw-r--r--sys/kern/kern_sysctl.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index b65ebbc9393..ba5887bdc6f 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.158 2009/03/05 19:52:24 kettenis Exp $ */
+/* $OpenBSD: init_main.c,v 1.159 2009/04/19 17:53:38 deraadt Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -125,6 +125,7 @@ struct vnode *rootvp, *swapdev_vp;
int boothowto;
struct timeval boottime;
int ncpus = 1;
+int ncpusfound = 1; /* number of cpus we find */
__volatile int start_init_exec; /* semaphore for start_init() */
#if !defined(NO_PROPOLICE)
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index c9bbbf61653..322816d1090 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.168 2009/01/21 21:02:40 miod Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.169 2009/04/19 17:53:38 deraadt Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -564,6 +564,8 @@ hw_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
return (sysctl_rdstring(oldp, oldlenp, newp, cpu_model));
case HW_NCPU:
return (sysctl_rdint(oldp, oldlenp, newp, ncpus));
+ case HW_NCPUFOUND:
+ return (sysctl_rdint(oldp, oldlenp, newp, ncpusfound));
case HW_BYTEORDER:
return (sysctl_rdint(oldp, oldlenp, newp, BYTE_ORDER));
case HW_PHYSMEM: