diff options
author | anton <anton@cvs.openbsd.org> | 2019-08-14 07:34:50 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2019-08-14 07:34:50 +0000 |
commit | fd1e2c3940032086025dddcc3a88bd68b60a78e5 (patch) | |
tree | cc7f2ea47b483bcbdde5fbf7ccc3eddd9c5bd448 /usr.sbin/vmctl | |
parent | edb34c21723f51d28c4e97cd8762173f7372abed (diff) |
Improve the error message when supplying an invalid template to vmctl
start. Favoring 'invalid template' over 'permission denied' should give
the user a better hint on what went wrong.
ok kn@ mlarkin@
Diffstat (limited to 'usr.sbin/vmctl')
-rw-r--r-- | usr.sbin/vmctl/vmctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/vmctl/vmctl.c b/usr.sbin/vmctl/vmctl.c index 60b028b7809..b5a2fc420a0 100644 --- a/usr.sbin/vmctl/vmctl.c +++ b/usr.sbin/vmctl/vmctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmctl.c,v 1.69 2019/05/22 16:19:21 jasper Exp $ */ +/* $OpenBSD: vmctl.c,v 1.70 2019/08/14 07:34:49 anton Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> @@ -249,6 +249,10 @@ vm_start_complete(struct imsg *imsg, int *ret, int autoconnect) "file"); *ret = ENOENT; break; + case VMD_PARENT_INVALID: + warnx("invalid template"); + *ret = EINVAL; + break; default: errno = res; warn("start vm command failed"); |