summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2018-12-09 12:26:38 +0000
committerclaudio <claudio@openbsd.org>2018-12-09 12:26:38 +0000
commit471d533f4ddf1fbd1eaa7945f54181dce351ca2f (patch)
tree9d44a9c6aacde30be70fd02a12acb5b28030d022 /usr.sbin/vmd
parentstyle; OK otto (diff)
downloadwireguard-openbsd-471d533f4ddf1fbd1eaa7945f54181dce351ca2f.tar.xz
wireguard-openbsd-471d533f4ddf1fbd1eaa7945f54181dce351ca2f.zip
When -B is used to specify a specific boot device also change the reboot
behaviour of vmd to stop / exit at guest reboot. OK ccardenas@
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r--usr.sbin/vmd/vmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c
index ee4481711f8..3f0cfff2f23 100644
--- a/usr.sbin/vmd/vmd.c
+++ b/usr.sbin/vmd/vmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmd.c,v 1.107 2018/12/04 08:15:09 claudio Exp $ */
+/* $OpenBSD: vmd.c,v 1.108 2018/12/09 12:26:38 claudio Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -452,7 +452,8 @@ vmd_dispatch_vmm(int fd, struct privsep_proc *p, struct imsg *imsg)
__func__, vmr.vmr_id);
break;
}
- if (vmr.vmr_result != EAGAIN) {
+ if (vmr.vmr_result != EAGAIN ||
+ vm->vm_params.vmc_bootdevice) {
if (vm->vm_from_config)
vm_stop(vm, 0, __func__);
else