-/* $OpenBSD: virtio.c,v 1.105 2023/07/15 18:32:21 dv Exp $ */
+/* $OpenBSD: virtio.c,v 1.106 2023/07/27 09:27:43 dv Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
nargv[5] = "-i";
nargv[6] = vmm_fd;
nargv[7] = "-n";
+ nargv[8] = NULL;
- if (env->vmd_verbose) {
- nargv[8] = "-v";
+ if (env->vmd_verbose == 1) {
+ nargv[8] = VMD_VERBOSE_1;
nargv[9] = NULL;
- } else
- nargv[8] = NULL;
+ } else if (env->vmd_verbose > 1) {
+ nargv[8] = VMD_VERBOSE_2;
+ nargv[9] = NULL;
+ }
/* Control resumes in vmd.c:main(). */
execvp(nargv[0], nargv);
imsg_free(&imsg);
if (msg.type == VIODEV_MSG_IO_READ && msg.data_valid) {
+#if DEBUG
log_debug("%s: got sync read response (reg=%s)",
__func__, virtio_reg_name(msg.reg));
+#endif /* DEBUG */
*data = msg.data;
/*
* It's possible we're asked to {de,}assert after the
-/* $OpenBSD: vmd.h,v 1.123 2023/07/13 18:31:59 dv Exp $ */
+/* $OpenBSD: vmd.h,v 1.124 2023/07/27 09:27:43 dv Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
/* Unique local address for IPv6 */
#define VMD_ULA_PREFIX "fd00::/8"
+/* Verbosity arguments for use when caling execvp(2). */
+#define VMD_VERBOSE_1 "-v";
+#define VMD_VERBOSE_2 "-vv";
+
enum imsg_type {
IMSG_VMDOP_START_VM_REQUEST = IMSG_PROC_MAX,
IMSG_VMDOP_START_VM_CDROM,
-/* $OpenBSD: vmm.c,v 1.113 2023/07/13 18:31:59 dv Exp $ */
+/* $OpenBSD: vmm.c,v 1.114 2023/07/27 09:27:43 dv Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
nargv[3] = "-n";
nargv[4] = "-i";
nargv[5] = vmm_fd;
+ nargv[6] = NULL;
- if (env->vmd_verbose) {
- nargv[6] = "-v";
+ if (env->vmd_verbose == 1) {
+ nargv[6] = VMD_VERBOSE_1;
nargv[7] = NULL;
- } else
- nargv[6] = NULL;
+ } else if (env->vmd_verbose > 1) {
+ nargv[6] = VMD_VERBOSE_2;
+ nargv[7] = NULL;
+ }
/* Control resumes in vmd main(). */
execvp(nargv[0], nargv);