-/* $OpenBSD: control.c,v 1.37 2021/06/16 16:55:02 dv Exp $ */
+/* $OpenBSD: control.c,v 1.38 2021/11/29 05:17:35 deraadt Exp $ */
/*
* Copyright (c) 2010-2015 Reyk Floeter <reyk@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/stat.h>
#include <sys/socket.h>
-/* $OpenBSD: priv.c,v 1.18 2021/11/10 20:49:04 sthen Exp $ */
+/* $OpenBSD: priv.c,v 1.19 2021/11/29 05:17:35 deraadt Exp $ */
/*
* Copyright (c) 2016 Reyk Floeter <reyk@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/stat.h>
#include <sys/socket.h>
-/* $OpenBSD: vm.c,v 1.65 2021/09/01 11:08:21 dv Exp $ */
+/* $OpenBSD: vm.c,v 1.66 2021/11/29 05:17:35 deraadt Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/param.h> /* PAGE_SIZE */
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/queue.h>
#include <dev/isa/isareg.h>
#include <dev/pci/pcireg.h>
-#include <machine/param.h>
#include <machine/psl.h>
#include <machine/pte.h>
#include <machine/specialreg.h>
-/* $OpenBSD: vmd.c,v 1.126 2021/07/18 11:55:45 dv Exp $ */
+/* $OpenBSD: vmd.c,v 1.127 2021/11/29 05:17:35 deraadt Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/wait.h>
#include <sys/cdefs.h>
if (!(env->vmd_cfg.cfg_flags & VMD_CFG_STAGGERED_START)) {
env->vmd_cfg.delay.tv_sec = VMD_DEFAULT_STAGGERED_START_DELAY;
- if (sysctl(ncpu_mib, NELEM(ncpu_mib), &ncpus, &ncpus_sz, NULL, 0) == -1)
+ if (sysctl(ncpu_mib, nitems(ncpu_mib), &ncpus, &ncpus_sz, NULL, 0) == -1)
ncpus = 1;
env->vmd_cfg.parallelism = ncpus;
log_debug("%s: setting staggered start configuration to "
-/* $OpenBSD: vmd.h,v 1.106 2021/09/01 11:08:21 dv Exp $ */
+/* $OpenBSD: vmd.h,v 1.107 2021/11/29 05:17:35 deraadt Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
#define SET(_v, _m) ((_v) |= (_m))
#define CLR(_v, _m) ((_v) &= ~(_m))
#define ISSET(_v, _m) ((_v) & (_m))
-#define NELEM(a) (sizeof(a) / sizeof((a)[0]))
+
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#define VMD_USER "_vmd"
#define VMD_CONF "/etc/vm.conf"
-/* $OpenBSD: vmm.c,v 1.101 2021/04/26 22:58:27 dv Exp $ */
+/* $OpenBSD: vmm.c,v 1.102 2021/11/29 05:17:35 deraadt Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
+#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/queue.h>
#include <sys/wait.h>
#include <dev/isa/isareg.h>
#include <dev/pci/pcireg.h>
-#include <machine/param.h>
#include <machine/psl.h>
#include <machine/specialreg.h>
#include <machine/vmmvar.h>