summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd/vmd.h
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2017-08-31 06:23:37 +0000
committermlarkin <mlarkin@openbsd.org>2017-08-31 06:23:37 +0000
commit3174964670998524f370b2a532b55f103bda54c0 (patch)
tree9a0e4dc894636e487a54e729412bfdf1f6df1574 /usr.sbin/vmd/vmd.h
parentmatch vmctl.8 vm name constraints (diff)
downloadwireguard-openbsd-3174964670998524f370b2a532b55f103bda54c0.tar.xz
wireguard-openbsd-3174964670998524f370b2a532b55f103bda54c0.zip
vmd/vmctl: disallow use of block or character devices as disks in VMs.
These don't work today and present the user with a confusing error message if an attempt is made to use them. This commit detects attempts to use block or character devices and if detected, presents the user with a better message. ok jasper From Carlos Cardenas, thanks!
Diffstat (limited to 'usr.sbin/vmd/vmd.h')
-rw-r--r--usr.sbin/vmd/vmd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/vmd/vmd.h b/usr.sbin/vmd/vmd.h
index 57bdb71cd5f..22da6d58a7b 100644
--- a/usr.sbin/vmd/vmd.h
+++ b/usr.sbin/vmd/vmd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmd.h,v 1.60 2017/08/20 21:15:32 pd Exp $ */
+/* $OpenBSD: vmd.h,v 1.61 2017/08/31 06:23:37 mlarkin Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -53,6 +53,7 @@
/* vmd -> vmctl error codes */
#define VMD_BIOS_MISSING 1001
#define VMD_DISK_MISSING 1002
+#define VMD_DISK_INVALID 1003
/* 100.64.0.0/10 from rfc6598 (IPv4 Prefix for Shared Address Space) */
#define VMD_DHCP_PREFIX "100.64.0.0/10"