diff options
author | 2019-05-16 06:41:47 +0000 | |
---|---|---|
committer | 2019-05-16 06:41:47 +0000 | |
commit | 1f00b87eeaf4ab7a6b96a536badd7153447e3cd9 (patch) | |
tree | 51dba5c20be04f5c592343525880d6dd0bb2c3e1 | |
parent | unveil "w" on ttys was too strict, introducing a failure condition (diff) | |
download | wireguard-openbsd-1f00b87eeaf4ab7a6b96a536badd7153447e3cd9.tar.xz wireguard-openbsd-1f00b87eeaf4ab7a6b96a536badd7153447e3cd9.zip |
treat vms that are disabled in vm.conf the same as any other vm that's stopped
"disabled" in this context might imply it being broken or otherwise unusable
prompted by and ok mlarkin@
-rw-r--r-- | usr.sbin/vmctl/vmctl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/vmctl/vmctl.c b/usr.sbin/vmctl/vmctl.c index efdc2a23329..a029875dd6a 100644 --- a/usr.sbin/vmctl/vmctl.c +++ b/usr.sbin/vmctl/vmctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmctl.c,v 1.67 2019/05/11 23:07:46 jasper Exp $ */ +/* $OpenBSD: vmctl.c,v 1.68 2019/05/16 06:41:47 jasper Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> @@ -716,7 +716,7 @@ const char * vm_state(unsigned int mask) { /* Presence of absence of other flags */ - if (!mask) + if (!mask || (mask & VM_STATE_DISABLED)) return "stopped"; else if (mask & VM_STATE_PAUSED) return "paused"; @@ -724,8 +724,6 @@ vm_state(unsigned int mask) return "stopping"; else if (mask & VM_STATE_RUNNING) return "running"; - else if (mask & VM_STATE_DISABLED) - return "disabled"; return "unknown"; } |