From 2b3f577015e8271c2a193044f6f33a5da367461c Mon Sep 17 00:00:00 2001 From: kn Date: Sat, 30 Jul 2022 14:17:42 +0000 Subject: [PATCH] vmctl create accepts exactly one argument Make "vmctl create -s3G 1.img 2.img" fail instead of just creating 1.img and ignoring 2.img. OK dv cheloha --- usr.sbin/vmctl/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c index c244d8c142c..1182e58e39a 100644 --- a/usr.sbin/vmctl/main.c +++ b/usr.sbin/vmctl/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.71 2022/05/13 00:17:20 yasuoka Exp $ */ +/* $OpenBSD: main.c,v 1.72 2022/07/30 14:17:42 kn Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -587,7 +587,7 @@ ctl_create(struct parse_result *res, int argc, char *argv[]) argc -= optind; argv += optind; - if (argc < 1) + if (argc != 1) ctl_usage(res->ctl); type = parse_disktype(argv[0], &disk); -- 2.20.1